Skip to content

Commit e80cf89

Browse files
committed
add shitty JSX namespace fix for our website
1 parent a69cd7e commit e80cf89

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

website/types.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
// This is a bad workaround to make our site typecheck under React 19
9+
// We run our site with "skipLibCheck=false", unfortunately some libraries
10+
// are still using the global JSX namespace, that has been removed in v19
11+
// See https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript
12+
declare namespace JSX {
13+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
14+
interface Element {}
15+
interface IntrinsicElements {
16+
[elemName: string]: unknown;
17+
}
18+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
19+
interface ElementClass {}
20+
}

0 commit comments

Comments
 (0)