@swf2es/codegen 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/LICENSE.third-party +142 -0
- package/README.md +26 -2
- package/dist/codegen.d.ts +289 -0
- package/dist/codegen.js +308 -0
- package/dist/codegen.wasm +0 -0
- package/dist/index.d.ts +315 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +406 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -3
- package/src/index.ts +738 -0
- package/src/webassembly.d.ts +30 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// The ES2022 lib has no WebAssembly types, this package deliberately loads
|
|
2
|
+
// neither DOM nor node types, and @types/node does not declare them either.
|
|
3
|
+
// These are the parts the wrapper, the asc bindings and the tests use;
|
|
4
|
+
// consumers get the real ones from their own environment.
|
|
5
|
+
declare namespace WebAssembly {
|
|
6
|
+
// biome-ignore lint/suspicious/noEmptyInterface: an opaque handle, like the real Module type
|
|
7
|
+
interface Module {}
|
|
8
|
+
interface ModuleImportDescriptor {
|
|
9
|
+
module: string;
|
|
10
|
+
name: string;
|
|
11
|
+
kind: "function" | "global" | "memory" | "table" | "tag";
|
|
12
|
+
}
|
|
13
|
+
interface ModuleExportDescriptor {
|
|
14
|
+
name: string;
|
|
15
|
+
kind: "function" | "global" | "memory" | "table" | "tag";
|
|
16
|
+
}
|
|
17
|
+
var Module: {
|
|
18
|
+
imports(module: Module): ModuleImportDescriptor[];
|
|
19
|
+
exports(module: Module): ModuleExportDescriptor[];
|
|
20
|
+
customSections(module: Module, name: string): ArrayBuffer[];
|
|
21
|
+
};
|
|
22
|
+
function compile(bytes: ArrayBufferView | ArrayBuffer): Promise<Module>;
|
|
23
|
+
interface Memory {
|
|
24
|
+
readonly buffer: ArrayBuffer;
|
|
25
|
+
}
|
|
26
|
+
interface Instance {
|
|
27
|
+
readonly exports: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
function instantiate(module: Module, imports?: object): Promise<Instance>;
|
|
30
|
+
}
|