Typescript update

This commit is contained in:
Adhiraj Singh
2020-07-01 13:25:08 +05:30
parent e50c1cbaf1
commit 4d83f6dd53
14 changed files with 144 additions and 124 deletions

View File

@@ -17,7 +17,7 @@ export default class Encoder {
this.pushBytes([(value >> 16) & 0x0f, (value >> 8) & 0xff, value & 0xff])
}
pushBytes(bytes: Uint8Array | Array<number>) {
this.data.push(...bytes)
this.data.push.apply(this.data, bytes)
}
pushString(str: string) {
const bytes = new TextEncoder().encode(str)