-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
From fork codermarcos/interpret On branch master Changes to be committed: modified: test/fixtures/swc.js/0/package.json new file: test/fixtures/swc.js/1/package.json new file: test/fixtures/swc.js/1/test.swc.js modified: test/fixtures/swc.jsx/0/package.json new file: test/fixtures/swc.jsx/1/package.json new file: test/fixtures/swc.jsx/1/test.swc.jsx modified: test/fixtures/swc.ts/0/package.json new file: test/fixtures/swc.ts/1/package.json new file: test/fixtures/swc.ts/1/test.swc.ts modified: test/fixtures/swc.tsx/0/package.json new file: test/fixtures/swc.tsx/1/package.json new file: test/fixtures/swc.tsx/1/test.swc.tsx modified: test/fixtures/ts/4/package.json new file: test/fixtures/ts/5/package.json new file: test/fixtures/ts/5/test.ts modified: test/fixtures/tsx/4/package.json new file: test/fixtures/tsx/5/package.json new file: test/fixtures/tsx/5/test.tsx modified: test/index.js
- Loading branch information
1 parent
5c551c7
commit 94097d2
Showing
19 changed files
with
150 additions
and
7 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
"@swc-node/register": "^1.9.0" | ||
} | ||
} |
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 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
} | ||
} |
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,14 @@ | ||
class Foo { | ||
#x = 1; | ||
#y = 2; | ||
} | ||
|
||
export default { | ||
data: { | ||
trueKey: true, | ||
falseKey: false, | ||
subKey: { | ||
subProp: 1, | ||
}, | ||
}, | ||
}; |
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,6 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
"@swc-node/register": "^1.9.0" | ||
} | ||
} |
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 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
} | ||
} |
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,28 @@ | ||
const React = { | ||
createElement(Component) { | ||
return Component(); | ||
}, | ||
}; | ||
|
||
class Foo { | ||
#x = 1; | ||
#y = 2; | ||
} | ||
|
||
function Bar() { | ||
const foo = new Foo(); | ||
|
||
return foo; | ||
} | ||
|
||
const a = <Bar />; | ||
|
||
export default { | ||
data: { | ||
trueKey: true, | ||
falseKey: false, | ||
subKey: { | ||
subProp: 1, | ||
}, | ||
}, | ||
}; |
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,6 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
"@swc-node/register": "^1.9.0" | ||
} | ||
} |
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 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
} | ||
} |
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,14 @@ | ||
class Foo { | ||
#x: number = 1; | ||
#y: number = 2; | ||
} | ||
|
||
export default { | ||
data: { | ||
trueKey: true as boolean, | ||
falseKey: false as boolean, | ||
subKey: { | ||
subProp: 1, | ||
}, | ||
}, | ||
} as const; |
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,6 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
"@swc-node/register": "^1.9.0" | ||
} | ||
} |
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 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
} | ||
} |
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,18 @@ | ||
const React = { | ||
createElement(Component: () => any) { | ||
return Component(); | ||
}, | ||
}; | ||
|
||
// Test harmony arrow functions. | ||
const Component = () => { | ||
var trueKey: boolean = true; | ||
var falseKey: boolean = false; | ||
var subKey = { subProp: 1 }; | ||
|
||
// Test harmony object short notation. | ||
return { data: { trueKey, falseKey, subKey } }; | ||
}; | ||
|
||
// Test TSX syntax. | ||
export default <Component />; |
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,6 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
"@swc-node/register": "^1.9.0" | ||
} | ||
} |
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 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
} | ||
} |
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,15 @@ | ||
var test = { | ||
data: { | ||
trueKey: true, | ||
falseKey: false, | ||
subKey: { | ||
subProp: 1, | ||
}, | ||
}, | ||
}; | ||
|
||
var main = { | ||
default: test, | ||
}; | ||
|
||
export = main; |
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,6 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
"@swc-node/register": "^1.9.0" | ||
} | ||
} |
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 @@ | ||
{ | ||
"dependencies": { | ||
"@swc/core": "^1.2.110", | ||
"@swc/register": "^0.1.7" | ||
} | ||
} |
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,18 @@ | ||
const React = { | ||
createElement(Component: () => any) { | ||
return Component(); | ||
}, | ||
}; | ||
|
||
// Test harmony arrow functions. | ||
const Component = () => { | ||
var trueKey: boolean = true; | ||
var falseKey: boolean = false; | ||
var subKey = { subProp: 1 }; | ||
|
||
// Test harmony object short notation. | ||
return { data: { trueKey, falseKey, subKey } }; | ||
}; | ||
|
||
// Test TSX syntax. | ||
export default <Component />; |
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