diff --git a/tests/fixture/issue-2214/input/.swcrc b/tests/fixture/issue-2214/input/.swcrc new file mode 100644 index 000000000000..e6de27db0882 --- /dev/null +++ b/tests/fixture/issue-2214/input/.swcrc @@ -0,0 +1,8 @@ +{ + "jsc": { + "parser": { + "syntax": "typescript", + "tsx": true + } + } +} \ No newline at end of file diff --git a/tests/fixture/issue-2214/input/index.tsx b/tests/fixture/issue-2214/input/index.tsx new file mode 100644 index 000000000000..48ccf41c4d98 --- /dev/null +++ b/tests/fixture/issue-2214/input/index.tsx @@ -0,0 +1,5 @@ +import React from "react"; + +export module Test { + export const content =
Content
; +} diff --git a/tests/fixture/issue-2214/output/index.tsx b/tests/fixture/issue-2214/output/index.tsx new file mode 100644 index 000000000000..14a02dbbdb27 --- /dev/null +++ b/tests/fixture/issue-2214/output/index.tsx @@ -0,0 +1,6 @@ +import React from "react"; +export var Test; +(function(Test) { + Test.content = /*#__PURE__*/ React.createElement("div", null, "Content"); +})(Test || (Test = { +})); diff --git a/tests/fixture/issue-2310/input/index.tsx b/tests/fixture/issue-2310/input/index.tsx new file mode 100644 index 000000000000..a61d392d479c --- /dev/null +++ b/tests/fixture/issue-2310/input/index.tsx @@ -0,0 +1,5 @@ +namespace A { + export const Foo = () => { + return
; + }; +} diff --git a/tests/fixture/issue-2310/output/index.tsx b/tests/fixture/issue-2310/output/index.tsx new file mode 100644 index 000000000000..688f7077c0f4 --- /dev/null +++ b/tests/fixture/issue-2310/output/index.tsx @@ -0,0 +1,7 @@ +var A; +(function(A) { + A.Foo = function() { + return(/*#__PURE__*/ React.createElement("div", null)); + }; +})(A || (A = { +}));