@swc/wasm-web 1.3.44 → 1.3.46
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 +39 -39
- package/wasm-web.js +67 -67
- package/wasm-web_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm-web.d.ts
CHANGED
|
@@ -7,6 +7,42 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function browserslist(query: string, opts: any): any;
|
|
9
9
|
|
|
10
|
+
export function minify(src: string, opts?: JsMinifyOptions): Promise<Output>;
|
|
11
|
+
export function minifySync(code: string, opts?: JsMinifyOptions): Output;
|
|
12
|
+
|
|
13
|
+
export function parse(src: string, options: ParseOptions & {
|
|
14
|
+
isModule: false;
|
|
15
|
+
}): Promise<Script>;
|
|
16
|
+
export function parse(src: string, options?: ParseOptions): Promise<Module>;
|
|
17
|
+
export function parseSync(src: string, options: ParseOptions & {
|
|
18
|
+
isModule: false;
|
|
19
|
+
}): Script;
|
|
20
|
+
export function parseSync(src: string, options?: ParseOptions): Module;
|
|
21
|
+
|
|
22
|
+
export function print(m: Program, options?: Options): Promise<Output>;
|
|
23
|
+
export function printSync(m: Program, options?: Options): Output
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Note: this interface currently does not do _actual_ async work, only provides
|
|
27
|
+
* a corresponding async interfaces to the `@swc/core`'s interface.
|
|
28
|
+
*/
|
|
29
|
+
export function transform(
|
|
30
|
+
code: string | Program,
|
|
31
|
+
options?: Options,
|
|
32
|
+
experimental_plugin_bytes_resolver?: any
|
|
33
|
+
): Promise<Output>;
|
|
34
|
+
/**
|
|
35
|
+
* @param {string} code
|
|
36
|
+
* @param {Options} opts
|
|
37
|
+
* @param {Record<string, ArrayBuffer>} experimental_plugin_bytes_resolver An object contains bytes array for the plugin
|
|
38
|
+
* specified in config. Key of record represents the name of the plugin specified in config. Note this is an experimental
|
|
39
|
+
* interface, likely will change.
|
|
40
|
+
* @returns {Output}
|
|
41
|
+
*/
|
|
42
|
+
export function transformSync(code: string | Program, opts?: Options, experimental_plugin_bytes_resolver?: any): Output;
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
10
46
|
export interface Plugin {
|
|
11
47
|
(module: Program): Program;
|
|
12
48
|
}
|
|
@@ -996,11 +1032,11 @@ export interface BaseModuleConfig {
|
|
|
996
1032
|
*
|
|
997
1033
|
* "use strict";
|
|
998
1034
|
*
|
|
999
|
-
* function
|
|
1035
|
+
* function _interop_require_default(obj) {
|
|
1000
1036
|
* return obj && obj.__esModule ? obj : { default: obj };
|
|
1001
1037
|
* }
|
|
1002
1038
|
*
|
|
1003
|
-
* var _foo =
|
|
1039
|
+
* var _foo = _interop_require_default(require("foo"));
|
|
1004
1040
|
* var _bar = require("bar");
|
|
1005
1041
|
*
|
|
1006
1042
|
* _foo.default;
|
|
@@ -1040,7 +1076,7 @@ export interface BaseModuleConfig {
|
|
|
1040
1076
|
* - `none`
|
|
1041
1077
|
*
|
|
1042
1078
|
* If you know that the imported file has been transformed with a compiler that stores the `default` export on
|
|
1043
|
-
* `exports.default` (such as swc or Babel), you can safely omit the `
|
|
1079
|
+
* `exports.default` (such as swc or Babel), you can safely omit the `_interop_require_default` helper.
|
|
1044
1080
|
*
|
|
1045
1081
|
* ```javascript
|
|
1046
1082
|
* import foo from "foo";
|
|
@@ -2802,42 +2838,6 @@ export interface Invalid extends Node, HasSpan {
|
|
|
2802
2838
|
|
|
2803
2839
|
|
|
2804
2840
|
|
|
2805
|
-
export function minify(src: string, opts?: JsMinifyOptions): Promise<Output>;
|
|
2806
|
-
export function minifySync(code: string, opts?: JsMinifyOptions): Output;
|
|
2807
|
-
|
|
2808
|
-
export function parse(src: string, options: ParseOptions & {
|
|
2809
|
-
isModule: false;
|
|
2810
|
-
}): Promise<Script>;
|
|
2811
|
-
export function parse(src: string, options?: ParseOptions): Promise<Module>;
|
|
2812
|
-
export function parseSync(src: string, options: ParseOptions & {
|
|
2813
|
-
isModule: false;
|
|
2814
|
-
}): Script;
|
|
2815
|
-
export function parseSync(src: string, options?: ParseOptions): Module;
|
|
2816
|
-
|
|
2817
|
-
export function print(m: Program, options?: Options): Promise<Output>;
|
|
2818
|
-
export function printSync(m: Program, options?: Options): Output
|
|
2819
|
-
|
|
2820
|
-
/**
|
|
2821
|
-
* Note: this interface currently does not do _actual_ async work, only provides
|
|
2822
|
-
* a corresponding async interfaces to the `@swc/core`'s interface.
|
|
2823
|
-
*/
|
|
2824
|
-
export function transform(
|
|
2825
|
-
code: string | Program,
|
|
2826
|
-
options?: Options,
|
|
2827
|
-
experimental_plugin_bytes_resolver?: any
|
|
2828
|
-
): Promise<Output>;
|
|
2829
|
-
/**
|
|
2830
|
-
* @param {string} code
|
|
2831
|
-
* @param {Options} opts
|
|
2832
|
-
* @param {Record<string, ArrayBuffer>} experimental_plugin_bytes_resolver An object contains bytes array for the plugin
|
|
2833
|
-
* specified in config. Key of record represents the name of the plugin specified in config. Note this is an experimental
|
|
2834
|
-
* interface, likely will change.
|
|
2835
|
-
* @returns {Output}
|
|
2836
|
-
*/
|
|
2837
|
-
export function transformSync(code: string | Program, opts?: Options, experimental_plugin_bytes_resolver?: any): Output;
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
2841
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
2842
2842
|
|
|
2843
2843
|
export interface InitOutput {
|
package/wasm-web.js
CHANGED
|
@@ -469,18 +469,6 @@ function getImports() {
|
|
|
469
469
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
470
470
|
return ret;
|
|
471
471
|
};
|
|
472
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
473
|
-
const ret = arg0;
|
|
474
|
-
return addHeapObject(ret);
|
|
475
|
-
};
|
|
476
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
477
|
-
const obj = getObject(arg1);
|
|
478
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
479
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
480
|
-
var len0 = WASM_VECTOR_LEN;
|
|
481
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
482
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
483
|
-
};
|
|
484
472
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
485
473
|
const val = getObject(arg0);
|
|
486
474
|
const ret = typeof(val) === 'object' && val !== null;
|
|
@@ -498,6 +486,64 @@ function getImports() {
|
|
|
498
486
|
const ret = getObject(arg0) in getObject(arg1);
|
|
499
487
|
return ret;
|
|
500
488
|
};
|
|
489
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
490
|
+
const obj = getObject(arg1);
|
|
491
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
492
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
493
|
+
var len0 = WASM_VECTOR_LEN;
|
|
494
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
495
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
496
|
+
};
|
|
497
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
498
|
+
const ret = arg0;
|
|
499
|
+
return addHeapObject(ret);
|
|
500
|
+
};
|
|
501
|
+
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
502
|
+
const ret = getObject(arg0) === null;
|
|
503
|
+
return ret;
|
|
504
|
+
};
|
|
505
|
+
imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
|
|
506
|
+
try {
|
|
507
|
+
var state0 = {a: arg0, b: arg1};
|
|
508
|
+
var cb0 = (arg0, arg1) => {
|
|
509
|
+
const a = state0.a;
|
|
510
|
+
state0.a = 0;
|
|
511
|
+
try {
|
|
512
|
+
return __wbg_adapter_110(a, state0.b, arg0, arg1);
|
|
513
|
+
} finally {
|
|
514
|
+
state0.a = a;
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
const ret = new Promise(cb0);
|
|
518
|
+
return addHeapObject(ret);
|
|
519
|
+
} finally {
|
|
520
|
+
state0.a = state0.b = 0;
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
imports.wbg.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
|
|
524
|
+
const ret = getObject(arg0).next();
|
|
525
|
+
return addHeapObject(ret);
|
|
526
|
+
}, arguments) };
|
|
527
|
+
imports.wbg.__wbg_done_1ebec03bbd919843 = function(arg0) {
|
|
528
|
+
const ret = getObject(arg0).done;
|
|
529
|
+
return ret;
|
|
530
|
+
};
|
|
531
|
+
imports.wbg.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
|
|
532
|
+
const ret = getObject(arg0).value;
|
|
533
|
+
return addHeapObject(ret);
|
|
534
|
+
};
|
|
535
|
+
imports.wbg.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
|
|
536
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
537
|
+
return addHeapObject(ret);
|
|
538
|
+
};
|
|
539
|
+
imports.wbg.__wbg_entries_4e1315b774245952 = function(arg0) {
|
|
540
|
+
const ret = Object.entries(getObject(arg0));
|
|
541
|
+
return addHeapObject(ret);
|
|
542
|
+
};
|
|
543
|
+
imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
|
|
544
|
+
const ret = getObject(arg0).length;
|
|
545
|
+
return ret;
|
|
546
|
+
};
|
|
501
547
|
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
502
548
|
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
503
549
|
return ret;
|
|
@@ -530,10 +576,6 @@ function getImports() {
|
|
|
530
576
|
const ret = Array.isArray(getObject(arg0));
|
|
531
577
|
return ret;
|
|
532
578
|
};
|
|
533
|
-
imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
|
|
534
|
-
const ret = getObject(arg0).length;
|
|
535
|
-
return ret;
|
|
536
|
-
};
|
|
537
579
|
imports.wbg.__wbg_iterator_55f114446221aa5a = function() {
|
|
538
580
|
const ret = Symbol.iterator;
|
|
539
581
|
return addHeapObject(ret);
|
|
@@ -542,52 +584,10 @@ function getImports() {
|
|
|
542
584
|
const ret = BigInt.asUintN(64, arg0);
|
|
543
585
|
return addHeapObject(ret);
|
|
544
586
|
};
|
|
545
|
-
imports.wbg.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
|
|
546
|
-
const ret = getObject(arg0).next();
|
|
547
|
-
return addHeapObject(ret);
|
|
548
|
-
}, arguments) };
|
|
549
|
-
imports.wbg.__wbg_done_1ebec03bbd919843 = function(arg0) {
|
|
550
|
-
const ret = getObject(arg0).done;
|
|
551
|
-
return ret;
|
|
552
|
-
};
|
|
553
|
-
imports.wbg.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
|
|
554
|
-
const ret = getObject(arg0).value;
|
|
555
|
-
return addHeapObject(ret);
|
|
556
|
-
};
|
|
557
|
-
imports.wbg.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
|
|
558
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
559
|
-
return addHeapObject(ret);
|
|
560
|
-
};
|
|
561
587
|
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
562
588
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
563
589
|
return addHeapObject(ret);
|
|
564
590
|
};
|
|
565
|
-
imports.wbg.__wbg_entries_4e1315b774245952 = function(arg0) {
|
|
566
|
-
const ret = Object.entries(getObject(arg0));
|
|
567
|
-
return addHeapObject(ret);
|
|
568
|
-
};
|
|
569
|
-
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
570
|
-
const ret = getObject(arg0) === null;
|
|
571
|
-
return ret;
|
|
572
|
-
};
|
|
573
|
-
imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
|
|
574
|
-
try {
|
|
575
|
-
var state0 = {a: arg0, b: arg1};
|
|
576
|
-
var cb0 = (arg0, arg1) => {
|
|
577
|
-
const a = state0.a;
|
|
578
|
-
state0.a = 0;
|
|
579
|
-
try {
|
|
580
|
-
return __wbg_adapter_110(a, state0.b, arg0, arg1);
|
|
581
|
-
} finally {
|
|
582
|
-
state0.a = a;
|
|
583
|
-
}
|
|
584
|
-
};
|
|
585
|
-
const ret = new Promise(cb0);
|
|
586
|
-
return addHeapObject(ret);
|
|
587
|
-
} finally {
|
|
588
|
-
state0.a = state0.b = 0;
|
|
589
|
-
}
|
|
590
|
-
};
|
|
591
591
|
imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
|
|
592
592
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
593
593
|
return addHeapObject(ret);
|
|
@@ -680,13 +680,6 @@ imports.wbg.__wbg_new_537b7341ce90bb31 = function(arg0) {
|
|
|
680
680
|
imports.wbg.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
|
|
681
681
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
682
682
|
};
|
|
683
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
684
|
-
const ret = debugString(getObject(arg1));
|
|
685
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
686
|
-
const len0 = WASM_VECTOR_LEN;
|
|
687
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
688
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
689
|
-
};
|
|
690
683
|
imports.wbg.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
|
|
691
684
|
let result;
|
|
692
685
|
try {
|
|
@@ -714,6 +707,13 @@ imports.wbg.__wbg_String_91fba7ded13ba54c = function(arg0, arg1) {
|
|
|
714
707
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
715
708
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
716
709
|
};
|
|
710
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
711
|
+
const ret = debugString(getObject(arg1));
|
|
712
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
713
|
+
const len0 = WASM_VECTOR_LEN;
|
|
714
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
715
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
716
|
+
};
|
|
717
717
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
718
718
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
719
719
|
};
|
|
@@ -734,8 +734,8 @@ imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
|
734
734
|
const ret = false;
|
|
735
735
|
return ret;
|
|
736
736
|
};
|
|
737
|
-
imports.wbg.
|
|
738
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
737
|
+
imports.wbg.__wbindgen_closure_wrapper18908 = function(arg0, arg1, arg2) {
|
|
738
|
+
const ret = makeMutClosure(arg0, arg1, 239, __wbg_adapter_50);
|
|
739
739
|
return addHeapObject(ret);
|
|
740
740
|
};
|
|
741
741
|
|
package/wasm-web_bg.wasm
CHANGED
|
Binary file
|