File: toggleMultilineComment5.ts

package info (click to toggle)
node-typescript 4.8.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,068 kB
  • sloc: javascript: 1,735,777; makefile: 7; sh: 1
file content (34 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Jsx uses block comments for each line commented.

// Common JSX comment scenarios

//@Filename: file.tsx
//// const a = <div tabIndex="0">[|</div>;|]
//// const b = <div>This is [|valid HTML &amp;|] JSX at the same time.</div>;
//// const c = <MyContainer>
////     [|<MyFirstComponent />
////     <MySecondComponent />|]
//// </MyContainer>;
//// const d = <MyContainer>
////     <MyFirstComp[|onent />
////     <MySecondComponent />|]
//// </MyContainer>;
//// const e = <MyComponent>[|{'foo'}|]</MyComponent>;
//// const f = <div>Some text</div[|>;|]
//// const g = <div>Some text<[|/div>;|]

verify.toggleMultilineComment(
    `const a = <div tabIndex="0">{/*</div>;*/}
const b = <div>This is {/*valid HTML &amp;*/} JSX at the same time.</div>;
const c = <MyContainer>
    {/*<MyFirstComponent />
    <MySecondComponent />*/}
</MyContainer>;
const d = <MyContainer>
    <MyFirstComp{/*onent />
    <MySecondComponent />*/}
</MyContainer>;
const e = <MyComponent>{/*{'foo'}*/}</MyComponent>;
const f = <div>Some text</div{/*>;*/}
const g = <div>Some text<{/*/div>;*/}`
);