mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
minor typing fixes
This commit is contained in:
parent
9820e0fc57
commit
a4518139e0
4 changed files with 790 additions and 480 deletions
1266
package-lock.json
generated
1266
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -45,7 +45,7 @@ export function ParseCreateStringTable(stream: BitStream): CreateStringTablePack
|
||||||
throw new Error('Incorrect length of decompressed stringtable');
|
throw new Error('Incorrect length of decompressed stringtable');
|
||||||
}
|
}
|
||||||
|
|
||||||
data = new BitStream(decompressedData.buffer);
|
data = new BitStream(decompressedData.buffer as ArrayBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
const table: StringTable = {
|
const table: StringTable = {
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,10 @@ function writeEntities(name: string) {
|
||||||
|
|
||||||
const resultData = getResultData(parser.getPackets());
|
const resultData = getResultData(parser.getPackets());
|
||||||
|
|
||||||
const writeStream = createWriteStream(targetFile, 'utf8');
|
const writeStream = createWriteStream(targetFile);
|
||||||
|
|
||||||
for (const result of resultData) {
|
for (const result of resultData) {
|
||||||
writeStream.write(JSON.stringify(result) + '\n');
|
writeStream.write(JSON.stringify(result) + '\n', 'utf8');
|
||||||
}
|
}
|
||||||
|
|
||||||
writeStream.end();
|
writeStream.end();
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export function getStream(data: string | number[]) {
|
||||||
return new BitStream(buffer);
|
return new BitStream(buffer);
|
||||||
} else {
|
} else {
|
||||||
const array = new Uint8Array(data as number[]);
|
const array = new Uint8Array(data as number[]);
|
||||||
return new BitStream(array.buffer);
|
return new BitStream(array.buffer as ArrayBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue