Skip to content

Commit 9fe976f

Browse files
committed
Add failing test case of microsoft#58399
1 parent 920aceb commit 9fe976f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
// @isolatedDeclarations: true
4+
// @declaration: true
5+
// @lib: dom
6+
// @Filename: /code.tsx
7+
//// declare global {
8+
//// namespace JSX {
9+
//// export type Element = Node | Node[];
10+
//// }
11+
//// }
12+
//// export const x = <div aria-label="hello" />;
13+
14+
verify.codeFix({
15+
description: "Add annotation of type 'JSX.Element'",
16+
index: 0,
17+
newFileContent:
18+
`declare global {
19+
namespace JSX {
20+
export type Element = Node | Node[];
21+
}
22+
}
23+
export const x: JSX.Element = <div aria-label="hello" />;`,
24+
});

0 commit comments

Comments
 (0)