@swc/wasm 1.2.233 → 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.d.ts +36 -36
- package/wasm.js +25 -25
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm.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
|
}
|
|
@@ -2825,3 +2789,39 @@ export interface Invalid extends Node, HasSpan {
|
|
|
2825
2789
|
}
|
|
2826
2790
|
|
|
2827
2791
|
|
|
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
|
+
|
package/wasm.js
CHANGED
|
@@ -87,6 +87,10 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
87
87
|
return ptr;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
function isLikeNone(x) {
|
|
91
|
+
return x === undefined || x === null;
|
|
92
|
+
}
|
|
93
|
+
|
|
90
94
|
let cachedInt32Memory0 = new Int32Array();
|
|
91
95
|
|
|
92
96
|
function getInt32Memory0() {
|
|
@@ -96,10 +100,6 @@ function getInt32Memory0() {
|
|
|
96
100
|
return cachedInt32Memory0;
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
function isLikeNone(x) {
|
|
100
|
-
return x === undefined || x === null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
103
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
104
104
|
|
|
105
105
|
cachedTextDecoder.decode();
|
|
@@ -142,7 +142,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
142
142
|
return real;
|
|
143
143
|
}
|
|
144
144
|
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
145
|
-
wasm.
|
|
145
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9390839e260d8a06(arg0, arg1, addHeapObject(arg2));
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
/**
|
|
@@ -287,13 +287,27 @@ function handleError(f, args) {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
function __wbg_adapter_45(arg0, arg1, arg2, arg3) {
|
|
290
|
-
wasm.
|
|
290
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h6ded4c0b361bd0cb(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
294
294
|
takeObject(arg0);
|
|
295
295
|
};
|
|
296
296
|
|
|
297
|
+
module.exports.__wbindgen_is_string = function(arg0) {
|
|
298
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
299
|
+
return ret;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
303
|
+
const obj = getObject(arg1);
|
|
304
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
305
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
306
|
+
var len0 = WASM_VECTOR_LEN;
|
|
307
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
308
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
309
|
+
};
|
|
310
|
+
|
|
297
311
|
module.exports.__wbindgen_is_null = function(arg0) {
|
|
298
312
|
const ret = getObject(arg0) === null;
|
|
299
313
|
return ret;
|
|
@@ -313,25 +327,11 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
|
313
327
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
314
328
|
};
|
|
315
329
|
|
|
316
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
317
|
-
const obj = getObject(arg1);
|
|
318
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
319
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
|
-
var len0 = WASM_VECTOR_LEN;
|
|
321
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
322
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
323
|
-
};
|
|
324
|
-
|
|
325
330
|
module.exports.__wbindgen_json_parse = function(arg0, arg1) {
|
|
326
331
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
327
332
|
return addHeapObject(ret);
|
|
328
333
|
};
|
|
329
334
|
|
|
330
|
-
module.exports.__wbindgen_is_string = function(arg0) {
|
|
331
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
332
|
-
return ret;
|
|
333
|
-
};
|
|
334
|
-
|
|
335
335
|
module.exports.__wbg_call_65af9f665ab6ade5 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
336
336
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
337
337
|
return addHeapObject(ret);
|
|
@@ -366,13 +366,13 @@ module.exports.__wbg_new0_adda2d4bcb124f0a = function() {
|
|
|
366
366
|
return addHeapObject(ret);
|
|
367
367
|
};
|
|
368
368
|
|
|
369
|
-
module.exports.
|
|
370
|
-
const ret = getObject(arg0).
|
|
369
|
+
module.exports.__wbg_getTimezoneOffset_8a39b51acb4f52c9 = function(arg0) {
|
|
370
|
+
const ret = getObject(arg0).getTimezoneOffset();
|
|
371
371
|
return ret;
|
|
372
372
|
};
|
|
373
373
|
|
|
374
|
-
module.exports.
|
|
375
|
-
const ret = getObject(arg0).
|
|
374
|
+
module.exports.__wbg_getTime_58b0bdbebd4ef11d = function(arg0) {
|
|
375
|
+
const ret = getObject(arg0).getTime();
|
|
376
376
|
return ret;
|
|
377
377
|
};
|
|
378
378
|
|
|
@@ -419,7 +419,7 @@ module.exports.__wbg_then_18da6e5453572fc8 = function(arg0, arg1) {
|
|
|
419
419
|
return addHeapObject(ret);
|
|
420
420
|
};
|
|
421
421
|
|
|
422
|
-
module.exports.
|
|
422
|
+
module.exports.__wbindgen_closure_wrapper14559 = function(arg0, arg1, arg2) {
|
|
423
423
|
const ret = makeMutClosure(arg0, arg1, 153, __wbg_adapter_22);
|
|
424
424
|
return addHeapObject(ret);
|
|
425
425
|
};
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|