From: ranbochen Date: Thu, 26 Jul 2018 13:20:10 +0000 (+0800) Subject: Update index.d.ts X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=86db8e30fe6e87b41823b5b304e75c0d0db08bec;p=buffer.git Update index.d.ts Buffer is a subclass of Uint8Array --- diff --git a/index.d.ts b/index.d.ts index 8814356..48d3c3c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,5 @@ declare module 'buffer' { - export class Buffer { + export class Buffer extends Uint8Array { length: number write(string: string, offset?: number, length?: number, encoding?: string): number; toString(encoding?: string, start?: number, end?: number): string; @@ -184,4 +184,4 @@ declare module 'buffer' { */ static allocUnsafeSlow(size: number): Buffer; } -} \ No newline at end of file +}