feat: init
This commit is contained in:
32
node_modules/unwasm/dist/plugin/index.d.mts
generated
vendored
Normal file
32
node_modules/unwasm/dist/plugin/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { Plugin } from "rollup";
|
||||
|
||||
//#region src/plugin/shared.d.ts
|
||||
interface UnwasmPluginOptions {
|
||||
/**
|
||||
* Directly import the `.wasm` files instead of bundling as base64 string.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
esmImport?: boolean;
|
||||
/**
|
||||
* Avoid using top level await and always use a proxy.
|
||||
*
|
||||
* Useful for compatibility with environments that don't support top level await.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
lazy?: boolean;
|
||||
/**
|
||||
* Suppress all warnings from the plugin.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
silent?: boolean;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/plugin/index.d.ts
|
||||
declare function unwasm(opts: UnwasmPluginOptions): Plugin;
|
||||
/** @deprecated use unwasm export */
|
||||
declare const rollup: typeof unwasm;
|
||||
//#endregion
|
||||
export { type UnwasmPluginOptions, rollup, unwasm };
|
||||
5915
node_modules/unwasm/dist/plugin/index.mjs
generated
vendored
Normal file
5915
node_modules/unwasm/dist/plugin/index.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
28
node_modules/unwasm/dist/tools/index.d.mts
generated
vendored
Normal file
28
node_modules/unwasm/dist/tools/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
//#region src/tools/parser.d.ts
|
||||
type ParsedWasmModule = {
|
||||
id?: string;
|
||||
imports: ModuleImport[];
|
||||
exports: ModuleExport[];
|
||||
};
|
||||
type ModuleImport = {
|
||||
module: string;
|
||||
name: string;
|
||||
returnType?: string;
|
||||
params?: {
|
||||
id?: string;
|
||||
type: string;
|
||||
}[];
|
||||
};
|
||||
type ModuleExport = {
|
||||
name: string;
|
||||
id: string | number;
|
||||
type: "Func" | "Memory";
|
||||
};
|
||||
type ParseResult = {
|
||||
modules: ParsedWasmModule[];
|
||||
};
|
||||
declare function parseWasm(source: Buffer | ArrayBuffer, opts?: {
|
||||
name?: string;
|
||||
}): ParseResult;
|
||||
//#endregion
|
||||
export { ModuleExport, ModuleImport, ParseResult, ParsedWasmModule, parseWasm };
|
||||
5560
node_modules/unwasm/dist/tools/index.mjs
generated
vendored
Normal file
5560
node_modules/unwasm/dist/tools/index.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user