Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tfjs-backend-wasm/src/backend_wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import {backend_util, BackendTimingInfo, DataStorage, DataType, engine, KernelBackend, registerBackend, TensorInfo, util} from '@tensorflow/tfjs-core';

import wasmFactory from '../wasm-out/tfjs-backend-wasm';
import {BackendWasmModule} from '../wasm-out/tfjs-backend-wasm';
type BackendWasmModule = ReturnType<typeof wasmFactory>;

const WASM_PRIORITY = 2;

Expand Down
3 changes: 2 additions & 1 deletion tfjs-backend-wasm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"node_modules/"
],
"compilerOptions": {
"outDir": "./dist"
"outDir": "./dist",
"esModuleInterop": true
}
}
4 changes: 2 additions & 2 deletions tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* =============================================================================
*/

export interface BackendWasmModule extends EmscriptenModule {
interface BackendWasmModule extends EmscriptenModule {
onRuntimeInitialized: () => void;
// Using the tfjs namespace to avoid conflict with emscripten's API.
tfjs: {
Expand All @@ -29,4 +29,4 @@ export interface BackendWasmModule extends EmscriptenModule {
}

declare var moduleFactory: () => BackendWasmModule;
export default moduleFactory;
export = moduleFactory;