Skip to content

Commit

Permalink
Add failing test case of microsoft#58399
Browse files Browse the repository at this point in the history
  • Loading branch information
blickly committed May 8, 2024
1 parent 920aceb commit 9fe976f
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/// <reference path='fourslash.ts'/>

// @isolatedDeclarations: true
// @declaration: true
// @lib: dom
// @Filename: /code.tsx
//// declare global {
//// namespace JSX {
//// export type Element = Node | Node[];
//// }
//// }
//// export const x = <div aria-label="hello" />;

verify.codeFix({
description: "Add annotation of type 'JSX.Element'",
index: 0,
newFileContent:
`declare global {
namespace JSX {
export type Element = Node | Node[];
}
}
export const x: JSX.Element = <div aria-label="hello" />;`,
});

0 comments on commit 9fe976f

Please sign in to comment.