Enable tsc alwaysStrict, strictBindCallApply, noImplicitThis (#9600)
* Enable tsc alwaysStrict * Enable tsc strictBindCallApply * Enable tsc noImplicitThis * Add d.ts * Improve types * Add ? * Increase coverage * Improve coverage
This commit is contained in:
parent
0b54699829
commit
8c0d202df4
23 changed files with 188 additions and 68 deletions
|
@ -31,7 +31,7 @@ function arrayBufferReadInt(arr: ArrayBuffer, start: number): number {
|
|||
}
|
||||
|
||||
function arrayBufferReadStr(arr: ArrayBuffer, start: number, len: number): string {
|
||||
return String.fromCharCode.apply(null, arrayBufferRead(arr, start, len));
|
||||
return String.fromCharCode.apply(null, Array.from(arrayBufferRead(arr, start, len)));
|
||||
}
|
||||
|
||||
export async function blobIsAnimated(mimeType: string | undefined, blob: Blob): Promise<boolean> {
|
||||
|
|
|
@ -356,7 +356,7 @@ function packMegolmKeyFile(data: Uint8Array): ArrayBuffer {
|
|||
function encodeBase64(uint8Array: Uint8Array): string {
|
||||
// Misinterpt the Uint8Array as Latin-1.
|
||||
// window.btoa expects a unicode string with codepoints in the range 0-255.
|
||||
const latin1String = String.fromCharCode.apply(null, uint8Array);
|
||||
const latin1String = String.fromCharCode.apply(null, Array.from(uint8Array));
|
||||
// Use the builtin base64 encoder.
|
||||
return window.btoa(latin1String);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue