diff --git a/types/pbf/index.d.ts b/types/pbf/index.d.ts index fdcb9b53ce..692ca491bf 100644 --- a/types/pbf/index.d.ts +++ b/types/pbf/index.d.ts @@ -9,7 +9,7 @@ declare class Pbf { type: number; length: number; - constructor(buffer?: Uint8Array); + constructor(buffer?: Uint8Array|ArrayBuffer); destroy(): void; readFields(readField: (tag: number, result?: T, pbf?: Pbf) => void, result?: T, end?: number): T; diff --git a/types/pbf/pbf-tests.ts b/types/pbf/pbf-tests.ts index c0a8556c42..f6914f5e13 100644 --- a/types/pbf/pbf-tests.ts +++ b/types/pbf/pbf-tests.ts @@ -2,6 +2,7 @@ import Pbf = require('pbf'); const pbf = new Pbf(new Uint8Array(1)); new Pbf(); +new Pbf(new ArrayBuffer(8)); pbf.buf; pbf.pos; pbf.type;