-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es): Run esnext transforms on esnext target (#9644)
- Loading branch information
Showing
134 changed files
with
2,861 additions
and
863 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
swc: patch | ||
swc_core: patch | ||
--- | ||
|
||
fix(es): Run esnext transforms on esnext target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "https://swc.rs/schema.json", | ||
"module": { | ||
"type": "es6" | ||
}, | ||
"jsc": { | ||
"target": "esnext", | ||
"parser": { | ||
"syntax": "typescript", | ||
"decorators": true, | ||
"importAssertions": true | ||
}, | ||
"transform": { | ||
"legacyDecorator": true, | ||
"decoratorMetadata": true, | ||
"useDefineForClassFields": true | ||
}, | ||
"keepClassNames": true, | ||
"experimental": { | ||
"keepImportAttributes": true, | ||
"emitAssertForImportAttributes": false | ||
} | ||
}, | ||
"minify": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function computed() { | ||
return function (target) { | ||
console.log(target) | ||
} | ||
} | ||
|
||
class User { | ||
@computed() | ||
get fullName() { | ||
return 'foo' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); | ||
var _ts_metadata = require("@swc/helpers/_/_ts_metadata"); | ||
function computed() { | ||
return function(target) { | ||
console.log(target); | ||
}; | ||
} | ||
let User = class User { | ||
get fullName() { | ||
return 'foo'; | ||
} | ||
}; | ||
_ts_decorate._([ | ||
computed(), | ||
_ts_metadata._("design:type", void 0), | ||
_ts_metadata._("design:paramtypes", []) | ||
], User.prototype, "fullName", null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "https://swc.rs/schema.json", | ||
"module": { | ||
"type": "es6" | ||
}, | ||
"jsc": { | ||
"target": "es2015", | ||
"parser": { | ||
"syntax": "typescript", | ||
"decorators": true, | ||
"importAssertions": true | ||
}, | ||
"transform": { | ||
"legacyDecorator": true, | ||
"decoratorMetadata": true, | ||
"useDefineForClassFields": true | ||
}, | ||
"keepClassNames": true, | ||
"experimental": { | ||
"keepImportAttributes": true, | ||
"emitAssertForImportAttributes": false | ||
} | ||
}, | ||
"minify": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@Injectable() | ||
export class MyService { } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; | ||
export class MyService { | ||
} | ||
MyService = _ts_decorate([ | ||
Injectable() | ||
], MyService); |
Oops, something went wrong.