diff options
author | 2022-12-05 14:11:23 -0800 | |
---|---|---|
committer | 2022-12-05 14:11:23 -0800 | |
commit | 159ee8ddfc2fd367dc7b551afcbc893667fd5afd (patch) | |
tree | 2c7626a1bd882fa382f71bbcb5b88252676dcbff | |
parent | 84634117a9aaa844550cb7bb403efee8cfdca2cb (diff) | |
download | bun-159ee8ddfc2fd367dc7b551afcbc893667fd5afd.tar.gz bun-159ee8ddfc2fd367dc7b551afcbc893667fd5afd.tar.zst bun-159ee8ddfc2fd367dc7b551afcbc893667fd5afd.zip |
indexOfLine type
-rw-r--r-- | packages/bun-types/bun.d.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index ea72c2a85..e4d95e715 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -2929,6 +2929,16 @@ declare module "bun" { * "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2" */ export const revision: string; + + /** + * Find the index of a newline character in potentially ill-formed UTF-8 text. + * + * This is sort of like readline() except without the IO. + */ + export function indexOfLine( + buffer: ArrayBufferView | ArrayBufferLike, + offset?: number, + ): number; } type TypedArray = |