-
-
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.
swc: - Fix `target` option. (#2225)
- Loading branch information
Showing
22 changed files
with
109 additions
and
320 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,39 +1,8 @@ | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||
try { | ||
var info = gen[key](arg); | ||
var value = info.value; | ||
} catch (error) { | ||
reject(error); | ||
return; | ||
} | ||
if (info.done) { | ||
resolve(value); | ||
} else { | ||
Promise.resolve(value).then(_next, _throw); | ||
} | ||
} | ||
function _asyncToGenerator(fn) { | ||
return function() { | ||
var self = this, args = arguments; | ||
return new Promise(function(resolve, reject) { | ||
var gen = fn.apply(self, args); | ||
function _next(value) { | ||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); | ||
} | ||
function _throw(err) { | ||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); | ||
} | ||
_next(undefined); | ||
}); | ||
}; | ||
} | ||
class Service { | ||
is(a) { | ||
return _asyncToGenerator(function*() { | ||
return a.toUpperCase() === a; | ||
})(); | ||
async is(a) { | ||
return a.toUpperCase() === a; | ||
} | ||
} | ||
_asyncToGenerator(function*() { | ||
yield new Service().is('ABC'); | ||
(async ()=>{ | ||
await new Service().is('ABC'); | ||
})(); |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export var importSomething = function() { | ||
return import('lodash'); | ||
}; | ||
export const importSomething = ()=>import('lodash') | ||
; |
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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
var a = { | ||
method: function() { | ||
var string = "\n width: ".concat(Math.abs(this.currentX - this.startX - left), "px;\n height: ").concat(Math.abs(this.currentY - this.realtimeStartY - top), "px;\n top: ").concat(Math.min(this.currentY - top, this.realtimeStartY) + this.scrollTop, "px;\n left: ").concat(Math.min(this.currentX - left, this.startX) + this.scrollLeft, "px\n "); | ||
const a = { | ||
method () { | ||
const string = ` | ||
width: ${Math.abs(this.currentX - this.startX - left)}px; | ||
height: ${Math.abs(this.currentY - this.realtimeStartY - top)}px; | ||
top: ${Math.min(this.currentY - top, this.realtimeStartY) + this.scrollTop}px; | ||
left: ${Math.min(this.currentX - left, this.startX) + this.scrollLeft}px | ||
`; | ||
} | ||
}; |
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 |
---|---|---|
@@ -1 +1 @@ | ||
var a = "\r\n"; | ||
const a = `\r\n`; |
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 |
---|---|---|
@@ -1,32 +1,5 @@ | ||
function _taggedTemplateLiteral(strings, raw) { | ||
if (!raw) { | ||
raw = strings.slice(0); | ||
} | ||
return Object.freeze(Object.defineProperties(strings, { | ||
raw: { | ||
value: Object.freeze(raw) | ||
} | ||
})); | ||
} | ||
function _templateObject() { | ||
var data = _taggedTemplateLiteral([ | ||
"a\nb\nc\n" | ||
]); | ||
_templateObject = function _templateObject() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _templateObject1() { | ||
var data = _taggedTemplateLiteral([ | ||
"a\nb\nc\n" | ||
], [ | ||
"a\nb\nc\nc\n" | ||
]); | ||
_templateObject1 = function _templateObject1() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
console.log(String.raw(_templateObject())); | ||
console.log(String.raw(_templateObject1())); | ||
console.log(String.raw`a | ||
b | ||
c | ||
`); | ||
console.log(String.raw`a\nb\nc\n`); |
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 |
---|---|---|
@@ -1 +1 @@ | ||
var f=function(){for(var _len=arguments.length,characters=new Array(_len),_key=0;_key<_len;_key++){characters[_key]=arguments[_key]}return characters.length};var g=function(str){return f.apply(void 0,str)};g("meow") | ||
const f=(...characters)=>characters.length;const g=str=>f(...str);g("meow") |
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
var f = function() { | ||
for(var _len = arguments.length, characters = new Array(_len), _key = 0; _key < _len; _key++){ | ||
characters[_key] = arguments[_key]; | ||
} | ||
return characters.length; | ||
}; | ||
var g = function(str) { | ||
return f.apply(void 0, str); | ||
}; | ||
const f = (...characters)=>characters.length | ||
; | ||
const g = (str)=>f(...str) | ||
; | ||
g("meow"); |
Oops, something went wrong.