aboutsummaryrefslogtreecommitdiff
path: root/test/formatters/samplecode/denofmt-tsx
diff options
context:
space:
mode:
authordalu <25452934+dalugm@users.noreply.github.com>2023-11-30 03:25:11 +0800
committerGitHub <noreply@github.com>2023-11-29 19:25:11 +0000
commitc8d9ad43ba99bb3b8703e6810fca357cf96c05ad (patch)
treed1997bb52d7187d7e8b4bf1c888eb027089126aa /test/formatters/samplecode/denofmt-tsx
parent56651724ad22f2769bbdaccf54cbe75c1cb35c91 (diff)
Add denofmt (#264)
Diffstat (limited to 'test/formatters/samplecode/denofmt-tsx')
-rw-r--r--test/formatters/samplecode/denofmt-tsx/in.tsx20
-rw-r--r--test/formatters/samplecode/denofmt-tsx/out.tsx19
2 files changed, 39 insertions, 0 deletions
diff --git a/test/formatters/samplecode/denofmt-tsx/in.tsx b/test/formatters/samplecode/denofmt-tsx/in.tsx
new file mode 100644
index 0000000..2412779
--- /dev/null
+++ b/test/formatters/samplecode/denofmt-tsx/in.tsx
@@ -0,0 +1,20 @@
+const Foo: FooComponent = ({
+name: string,
+ test: number}
+ ) => {
+ return <>
+ <h1>hello, {name}</h1>
+ <div>{test}</div>
+ </>
+;
+};
+
+const Bar
+: BarComponent = ()=> {
+ return (
+ <>
+ <Foo name="aaa"
+test={1} />
+ </>
+ )
+}
diff --git a/test/formatters/samplecode/denofmt-tsx/out.tsx b/test/formatters/samplecode/denofmt-tsx/out.tsx
new file mode 100644
index 0000000..8825eb5
--- /dev/null
+++ b/test/formatters/samplecode/denofmt-tsx/out.tsx
@@ -0,0 +1,19 @@
+const Foo: FooComponent = ({
+ name: string,
+ test: number,
+}) => {
+ return (
+ <>
+ <h1>hello, {name}</h1>
+ <div>{test}</div>
+ </>
+ );
+};
+
+const Bar: BarComponent = () => {
+ return (
+ <>
+ <Foo name="aaa" test={1} />
+ </>
+ );
+};