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:
Michael Telatynski 2022-11-21 11:24:59 +00:00 committed by GitHub
parent 0b54699829
commit 8c0d202df4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 188 additions and 68 deletions

View file

@ -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);
}