@swc/wasm-web 1.2.231 → 1.2.234
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/package.json +1 -1
- package/wasm-web.d.ts +38 -38
- package/wasm-web.js +23 -23
- package/wasm-web_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm-web.d.ts
CHANGED
|
@@ -1,42 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
-
export function minify(src: string, opts?: JsMinifyOptions): Promise<Output>;
|
|
5
|
-
export function minifySync(code: string, opts?: JsMinifyOptions): Output;
|
|
6
|
-
|
|
7
|
-
export function parse(src: string, options: ParseOptions & {
|
|
8
|
-
isModule: false;
|
|
9
|
-
}): Promise<Script>;
|
|
10
|
-
export function parse(src: string, options?: ParseOptions): Promise<Module>;
|
|
11
|
-
export function parseSync(src: string, options: ParseOptions & {
|
|
12
|
-
isModule: false;
|
|
13
|
-
}): Script;
|
|
14
|
-
export function parseSync(src: string, options?: ParseOptions): Module;
|
|
15
|
-
|
|
16
|
-
export function print(m: Program, options?: Options): Promise<Output>;
|
|
17
|
-
export function printSync(m: Program, options?: Options): Output
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Note: this interface currently does not do _actual_ async work, only provides
|
|
21
|
-
* a corresponding async interfaces to the `@swc/core`'s interface.
|
|
22
|
-
*/
|
|
23
|
-
export function transform(
|
|
24
|
-
code: string | Program,
|
|
25
|
-
options?: Options,
|
|
26
|
-
experimental_plugin_bytes_resolver?: any
|
|
27
|
-
): Promise<Output>;
|
|
28
|
-
/**
|
|
29
|
-
* @param {string} code
|
|
30
|
-
* @param {Options} opts
|
|
31
|
-
* @param {Record<string, ArrayBuffer>} experimental_plugin_bytes_resolver An object contains bytes array for the plugin
|
|
32
|
-
* specified in config. Key of record represents the name of the plugin specified in config. Note this is an experimental
|
|
33
|
-
* interface, likely will change.
|
|
34
|
-
* @returns {Output}
|
|
35
|
-
*/
|
|
36
|
-
export function transformSync(code: string | Program, opts?: Options, experimental_plugin_bytes_resolver?: any): Output;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
4
|
export interface Plugin {
|
|
41
5
|
(module: Program): Program;
|
|
42
6
|
}
|
|
@@ -2826,6 +2790,42 @@ export interface Invalid extends Node, HasSpan {
|
|
|
2826
2790
|
|
|
2827
2791
|
|
|
2828
2792
|
|
|
2793
|
+
export function minify(src: string, opts?: JsMinifyOptions): Promise<Output>;
|
|
2794
|
+
export function minifySync(code: string, opts?: JsMinifyOptions): Output;
|
|
2795
|
+
|
|
2796
|
+
export function parse(src: string, options: ParseOptions & {
|
|
2797
|
+
isModule: false;
|
|
2798
|
+
}): Promise<Script>;
|
|
2799
|
+
export function parse(src: string, options?: ParseOptions): Promise<Module>;
|
|
2800
|
+
export function parseSync(src: string, options: ParseOptions & {
|
|
2801
|
+
isModule: false;
|
|
2802
|
+
}): Script;
|
|
2803
|
+
export function parseSync(src: string, options?: ParseOptions): Module;
|
|
2804
|
+
|
|
2805
|
+
export function print(m: Program, options?: Options): Promise<Output>;
|
|
2806
|
+
export function printSync(m: Program, options?: Options): Output
|
|
2807
|
+
|
|
2808
|
+
/**
|
|
2809
|
+
* Note: this interface currently does not do _actual_ async work, only provides
|
|
2810
|
+
* a corresponding async interfaces to the `@swc/core`'s interface.
|
|
2811
|
+
*/
|
|
2812
|
+
export function transform(
|
|
2813
|
+
code: string | Program,
|
|
2814
|
+
options?: Options,
|
|
2815
|
+
experimental_plugin_bytes_resolver?: any
|
|
2816
|
+
): Promise<Output>;
|
|
2817
|
+
/**
|
|
2818
|
+
* @param {string} code
|
|
2819
|
+
* @param {Options} opts
|
|
2820
|
+
* @param {Record<string, ArrayBuffer>} experimental_plugin_bytes_resolver An object contains bytes array for the plugin
|
|
2821
|
+
* specified in config. Key of record represents the name of the plugin specified in config. Note this is an experimental
|
|
2822
|
+
* interface, likely will change.
|
|
2823
|
+
* @returns {Output}
|
|
2824
|
+
*/
|
|
2825
|
+
export function transformSync(code: string | Program, opts?: Options, experimental_plugin_bytes_resolver?: any): Output;
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
|
|
2829
2829
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
2830
2830
|
|
|
2831
2831
|
export interface InitOutput {
|
|
@@ -2841,11 +2841,11 @@ export interface InitOutput {
|
|
|
2841
2841
|
readonly __wbindgen_malloc: (a: number) => number;
|
|
2842
2842
|
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
2843
2843
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
2844
|
-
readonly
|
|
2844
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9390839e260d8a06: (a: number, b: number, c: number) => void;
|
|
2845
2845
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
2846
2846
|
readonly __wbindgen_free: (a: number, b: number) => void;
|
|
2847
2847
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
2848
|
-
readonly
|
|
2848
|
+
readonly wasm_bindgen__convert__closures__invoke2_mut__h6ded4c0b361bd0cb: (a: number, b: number, c: number, d: number) => void;
|
|
2849
2849
|
}
|
|
2850
2850
|
|
|
2851
2851
|
/**
|
package/wasm-web.js
CHANGED
|
@@ -85,6 +85,10 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
85
85
|
return ptr;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
function isLikeNone(x) {
|
|
89
|
+
return x === undefined || x === null;
|
|
90
|
+
}
|
|
91
|
+
|
|
88
92
|
let cachedInt32Memory0 = new Int32Array();
|
|
89
93
|
|
|
90
94
|
function getInt32Memory0() {
|
|
@@ -94,10 +98,6 @@ function getInt32Memory0() {
|
|
|
94
98
|
return cachedInt32Memory0;
|
|
95
99
|
}
|
|
96
100
|
|
|
97
|
-
function isLikeNone(x) {
|
|
98
|
-
return x === undefined || x === null;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
101
|
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
102
102
|
|
|
103
103
|
cachedTextDecoder.decode();
|
|
@@ -140,7 +140,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
140
140
|
return real;
|
|
141
141
|
}
|
|
142
142
|
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
143
|
-
wasm.
|
|
143
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9390839e260d8a06(arg0, arg1, addHeapObject(arg2));
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
@@ -285,7 +285,7 @@ function handleError(f, args) {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
function __wbg_adapter_45(arg0, arg1, arg2, arg3) {
|
|
288
|
-
wasm.
|
|
288
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h6ded4c0b361bd0cb(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
async function load(module, imports) {
|
|
@@ -325,6 +325,18 @@ function getImports() {
|
|
|
325
325
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
326
326
|
takeObject(arg0);
|
|
327
327
|
};
|
|
328
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
329
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
330
|
+
return ret;
|
|
331
|
+
};
|
|
332
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
333
|
+
const obj = getObject(arg1);
|
|
334
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
335
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
336
|
+
var len0 = WASM_VECTOR_LEN;
|
|
337
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
338
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
339
|
+
};
|
|
328
340
|
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
329
341
|
const ret = getObject(arg0) === null;
|
|
330
342
|
return ret;
|
|
@@ -341,22 +353,10 @@ function getImports() {
|
|
|
341
353
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
342
354
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
343
355
|
};
|
|
344
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
345
|
-
const obj = getObject(arg1);
|
|
346
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
347
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
348
|
-
var len0 = WASM_VECTOR_LEN;
|
|
349
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
350
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
351
|
-
};
|
|
352
356
|
imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
|
|
353
357
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
354
358
|
return addHeapObject(ret);
|
|
355
359
|
};
|
|
356
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
357
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
358
|
-
return ret;
|
|
359
|
-
};
|
|
360
360
|
imports.wbg.__wbg_call_65af9f665ab6ade5 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
361
361
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
362
362
|
return addHeapObject(ret);
|
|
@@ -387,14 +387,14 @@ function getImports() {
|
|
|
387
387
|
const ret = new Date();
|
|
388
388
|
return addHeapObject(ret);
|
|
389
389
|
};
|
|
390
|
-
imports.wbg.__wbg_getTime_58b0bdbebd4ef11d = function(arg0) {
|
|
391
|
-
const ret = getObject(arg0).getTime();
|
|
392
|
-
return ret;
|
|
393
|
-
};
|
|
394
390
|
imports.wbg.__wbg_getTimezoneOffset_8a39b51acb4f52c9 = function(arg0) {
|
|
395
391
|
const ret = getObject(arg0).getTimezoneOffset();
|
|
396
392
|
return ret;
|
|
397
393
|
};
|
|
394
|
+
imports.wbg.__wbg_getTime_58b0bdbebd4ef11d = function(arg0) {
|
|
395
|
+
const ret = getObject(arg0).getTime();
|
|
396
|
+
return ret;
|
|
397
|
+
};
|
|
398
398
|
imports.wbg.__wbg_new_693216e109162396 = function() {
|
|
399
399
|
const ret = new Error();
|
|
400
400
|
return addHeapObject(ret);
|
|
@@ -431,7 +431,7 @@ imports.wbg.__wbg_then_18da6e5453572fc8 = function(arg0, arg1) {
|
|
|
431
431
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
432
432
|
return addHeapObject(ret);
|
|
433
433
|
};
|
|
434
|
-
imports.wbg.
|
|
434
|
+
imports.wbg.__wbindgen_closure_wrapper14559 = function(arg0, arg1, arg2) {
|
|
435
435
|
const ret = makeMutClosure(arg0, arg1, 153, __wbg_adapter_22);
|
|
436
436
|
return addHeapObject(ret);
|
|
437
437
|
};
|
package/wasm-web_bg.wasm
CHANGED
|
Binary file
|