File tree Expand file tree Collapse file tree 5 files changed +9
-6
lines changed Expand file tree Collapse file tree 5 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ async function loadModule() {
63
63
mod = await WebAssembly . compile ( bytes ) ;
64
64
}
65
65
66
- /** @type {{exports: typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d")} } */
66
+ /** @type {{exports: typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts ")} } */
67
67
// @ts -expect-error: Typescript doesn't know what the instance exports exactly
68
68
const instance = new WebAssembly . Instance ( mod , {
69
69
// @ts -expect-error: The bindings don't exactly match the 'ExportValue' type
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ async function loadModule() {
63
63
mod = await WebAssembly . compile ( bytes ) ;
64
64
}
65
65
66
- /** @type {{exports: typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d")} } */
66
+ /** @type {{exports: typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts ")} } */
67
67
// @ts -expect-error: Typescript doesn't know what the instance exports exactly
68
68
const instance = new WebAssembly . Instance ( mod , {
69
69
// @ts -expect-error: The bindings don't exactly match the 'ExportValue' type
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ bindings.__wbg_set_wasm(
35
35
{
36
36
get ( _target , prop ) {
37
37
const mod = loadModuleSync ( ) ;
38
+ // @ts -expect-error: This results to an `any` type, which is fine
38
39
return initInstance ( mod ) [ prop ] ;
39
40
} ,
40
41
} ,
@@ -85,7 +86,7 @@ async function loadModule() {
85
86
function initInstance ( mod ) {
86
87
if ( initialised ) throw new Error ( "initInstance called twice" ) ;
87
88
88
- /** @type {{exports: typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d")} } */
89
+ /** @type {{exports: typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts ")} } */
89
90
// @ts -expect-error: Typescript doesn't know what the instance exports exactly
90
91
const instance = new WebAssembly . Instance ( mod , {
91
92
// @ts -expect-error: The bindings don't exactly match the 'ExportValue' type
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ bindings.__wbg_set_wasm(
35
35
{
36
36
get ( _target , prop ) {
37
37
const mod = loadModuleSync ( ) ;
38
+ // @ts -expect-error: This results to an `any` type, which is fine
38
39
return initInstance ( mod ) [ prop ] ;
39
40
} ,
40
41
} ,
@@ -80,12 +81,12 @@ async function loadModule() {
80
81
* Initializes the WASM module and returns the exports from the WASM module.
81
82
*
82
83
* @param {WebAssembly.Module } mod
83
- * @returns {typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d") }
84
+ * @returns {typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts ") }
84
85
*/
85
86
function initInstance ( mod ) {
86
87
if ( initialised ) throw new Error ( "initInstance called twice" ) ;
87
88
88
- /** @type {{exports: typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d")} } */
89
+ /** @type {{exports: typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts ")} } */
89
90
// @ts -expect-error: Typescript doesn't know what the instance exports exactly
90
91
const instance = new WebAssembly . Instance ( mod , {
91
92
// @ts -expect-error: The bindings don't exactly match the 'ExportValue' type
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " @tsconfig/node18/tsconfig.json" ,
3
3
"compilerOptions" : {
4
- "lib" : [" DOM" ]
4
+ "lib" : [" DOM" ],
5
+ "allowJs" : true
5
6
},
6
7
"typedocOptions" : {
7
8
"entryPoints" : [" index.d.ts" ],
You can’t perform that action at this time.
0 commit comments