-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tsgen] Fix modularize definition for sync compilation. (#21766)
Fixes #21760
- Loading branch information
1 parent
ebc7938
commit 9f19ec9
Showing
4 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// TypeScript bindings for emscripten-generated code. Automatically generated at compile time. | ||
declare namespace RuntimeExports { | ||
let HEAPF64: any; | ||
let HEAP_DATA_VIEW: any; | ||
let HEAP8: any; | ||
let HEAPU8: any; | ||
let HEAP16: any; | ||
let HEAPU16: any; | ||
let HEAP32: any; | ||
let HEAPU32: any; | ||
let HEAP64: any; | ||
let HEAPU64: any; | ||
} | ||
interface WasmModule { | ||
_fooVoid(): void; | ||
_fooInt(_0: number, _1: number): number; | ||
_main(_0: number, _1: number): number; | ||
} | ||
|
||
export type MainModule = WasmModule & typeof RuntimeExports; | ||
export default function MainModuleFactory (options?: unknown): MainModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import moduleFactory from './test_emit_tsd_sync.js' | ||
|
||
const module = moduleFactory(); | ||
module._fooVoid(); | ||
module._fooInt(7, 8); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters