mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #29965 from fredj/pbf_constructor_type
[pbf] Add ArrayBuffer to the constructor argument type
This commit is contained in:
Vendored
+1
-1
@@ -9,7 +9,7 @@ declare class Pbf {
|
||||
type: number;
|
||||
length: number;
|
||||
|
||||
constructor(buffer?: Uint8Array);
|
||||
constructor(buffer?: Uint8Array|ArrayBuffer);
|
||||
|
||||
destroy(): void;
|
||||
readFields<T>(readField: (tag: number, result?: T, pbf?: Pbf) => void, result?: T, end?: number): T;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user