File tree 9 files changed +115
-7
lines changed
vercel/loader-only/next-39460/output
swc_ecma_compat_es2015/src
9 files changed +115
-7
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "jsc" : {
3
+ "parser" : {
4
+ "syntax" : " typescript" ,
5
+ "tsx" : false
6
+ },
7
+ "target" : " es5" ,
8
+ "transform" : {
9
+ "react" : {
10
+ "runtime" : " automatic" ,
11
+ "useBuiltins" : true
12
+ }
13
+ },
14
+ "minify" : {
15
+ "compress" : false ,
16
+ "mangle" : false
17
+ },
18
+ "loose" : false
19
+ },
20
+ "module" : {
21
+ "type" : " es6"
22
+ },
23
+ "minify" : false
24
+ }
Original file line number Diff line number Diff line change
1
+ class Foo {
2
+ bar ( v = this . a ?. b ?. c ) { }
3
+ }
4
+
5
+ new Foo ( ) . bar ( ) ;
Original file line number Diff line number Diff line change
1
+ import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check" ;
2
+ import { _ as _create_class } from "@swc/helpers/_/_create_class" ;
3
+ var Foo = function ( ) {
4
+ "use strict" ;
5
+ function Foo ( ) {
6
+ _class_call_check ( this , Foo ) ;
7
+ }
8
+ _create_class ( Foo , [
9
+ {
10
+ key : "bar" ,
11
+ value : function bar ( ) {
12
+ var _this = this ;
13
+ var v = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : function ( ) {
14
+ var _this_a_b , _this_a ;
15
+ return ( _this_a = _this . a ) === null || _this_a === void 0 ? void 0 : ( _this_a_b = _this_a . b ) === null || _this_a_b === void 0 ? void 0 : _this_a_b . c ;
16
+ } ( ) ;
17
+ }
18
+ }
19
+ ] ) ;
20
+ return Foo ;
21
+ } ( ) ;
22
+ new Foo ( ) . bar ( ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "jsc" : {
3
+ "parser" : {
4
+ "syntax" : " ecmascript"
5
+ },
6
+ "target" : " es5"
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ function f1 ( x = this ) { }
2
+ function f2 ( x = ( ) => this ) { }
3
+ function f3 (
4
+ x = ( ) => {
5
+ return this ;
6
+ } ,
7
+ ) { }
8
+
9
+ function bar ( ) {
10
+ function b1 ( x = this ) { }
11
+ function b2 ( x = ( ) => this ) { }
12
+ function b3 (
13
+ x = ( ) => {
14
+ return this ;
15
+ } ,
16
+ ) { }
17
+ }
Original file line number Diff line number Diff line change
1
+ function f1 ( ) {
2
+ var x = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : this ;
3
+ }
4
+ function f2 ( ) {
5
+ var _this = this ;
6
+ var x = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : function ( ) {
7
+ return _this ;
8
+ } ;
9
+ }
10
+ function f3 ( ) {
11
+ var _this = this ;
12
+ var x = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : function ( ) {
13
+ return _this ;
14
+ } ;
15
+ }
16
+ function bar ( ) {
17
+ function b1 ( ) {
18
+ var x = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : this ;
19
+ }
20
+ function b2 ( ) {
21
+ var _this = this ;
22
+ var x = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : function ( ) {
23
+ return _this ;
24
+ } ;
25
+ }
26
+ function b3 ( ) {
27
+ var _this = this ;
28
+ var x = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : function ( ) {
29
+ return _this ;
30
+ } ;
31
+ }
32
+ }
Original file line number Diff line number Diff line change @@ -513,8 +513,8 @@ export var SnippetSession = /*#__PURE__*/ function() {
513
513
{
514
514
key : "merge" ,
515
515
value : function merge ( template ) {
516
- var options = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : _defaultOptions ;
517
516
var _this = this ;
517
+ var options = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : _defaultOptions ;
518
518
if ( ! this . _editor . hasModel ( ) ) {
519
519
return ;
520
520
}
Original file line number Diff line number Diff line change @@ -78,11 +78,11 @@ where
78
78
Optional :: new( object_super( ) , !c. typescript) ,
79
79
shorthand( ) ,
80
80
function_name( ) ,
81
- exprs( unresolved_mark) ,
82
81
for_of( c. for_of) ,
83
82
// Should come before parameters
84
83
// See: https://github.com/swc-project/swc/issues/1036
85
84
parameters( c. parameters, unresolved_mark) ,
85
+ exprs( unresolved_mark) ,
86
86
computed_properties( c. computed_props) ,
87
87
destructuring( c. destructuring) ,
88
88
block_scoping( unresolved_mark) ,
Original file line number Diff line number Diff line change @@ -247,11 +247,6 @@ where
247
247
) ;
248
248
let pass = add ! ( pass, ObjectSuper , es2015:: object_super( ) ) ;
249
249
let pass = add ! ( pass, FunctionName , es2015:: function_name( ) ) ;
250
- let pass = add ! ( pass, ArrowFunctions , es2015:: arrow( unresolved_mark) ) ;
251
- let pass = add ! ( pass, DuplicateKeys , es2015:: duplicate_keys( ) ) ;
252
- let pass = add ! ( pass, StickyRegex , es2015:: sticky_regex( ) ) ;
253
- // TODO: InstanceOf,
254
- let pass = add ! ( pass, TypeOfSymbol , es2015:: typeof_symbol( ) ) ;
255
250
let pass = add ! ( pass, ShorthandProperties , es2015:: shorthand( ) ) ;
256
251
let pass = add ! (
257
252
pass,
@@ -263,6 +258,11 @@ where
263
258
unresolved_mark
264
259
)
265
260
) ;
261
+ let pass = add ! ( pass, ArrowFunctions , es2015:: arrow( unresolved_mark) ) ;
262
+ let pass = add ! ( pass, DuplicateKeys , es2015:: duplicate_keys( ) ) ;
263
+ let pass = add ! ( pass, StickyRegex , es2015:: sticky_regex( ) ) ;
264
+ // TODO: InstanceOf,
265
+ let pass = add ! ( pass, TypeOfSymbol , es2015:: typeof_symbol( ) ) ;
266
266
let pass = add ! (
267
267
pass,
268
268
ForOf ,
You can’t perform that action at this time.
0 commit comments