-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved compatibility with the upcoming
@types/react
for React 19 (#…
- Loading branch information
1 parent
56109e7
commit d1994c4
Showing
14 changed files
with
168 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@emotion/styled': patch | ||
'@emotion/react': patch | ||
--- | ||
|
||
Improved compatibility with the upcoming `@types/react` for React 19 where the global `JSX` namespace doesn't exist anymore |
17 changes: 17 additions & 0 deletions
17
.yarn/patches/@definitelytyped-dtslint-npm-0.0.112-1e6b842976.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/dist/lint.js b/dist/lint.js | ||
index ae29f2a0936fe8e4dee9b4a607ed5c611872d30d..96746c55f2df24c6d09ee30ff85e404138ad0fbe 100644 | ||
--- a/dist/lint.js | ||
+++ b/dist/lint.js | ||
@@ -107,9 +107,9 @@ function startsWithDirectory(filePath, dirPath) { | ||
return normalFilePath.startsWith(normalDirPath + "/") || normalFilePath.startsWith(normalDirPath + "\\"); | ||
} | ||
function testNoTsIgnore(text) { | ||
- const tsIgnore = "ts-ignore"; | ||
- const pos = text.indexOf(tsIgnore); | ||
- return pos === -1 ? undefined : { pos, message: "'ts-ignore' is forbidden." }; | ||
+ // const tsIgnore = "ts-ignore"; | ||
+ // const pos = text.indexOf(tsIgnore); | ||
+ // return pos === -1 ? undefined : { pos, message: "'ts-ignore' is forbidden." }; | ||
} | ||
function testNoTslintDisables(text) { | ||
const tslintDisable = "tslint:disable"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// this is basically a slimmed down copy of https://github.com/emotion-js/emotion/blob/main/packages/react/types/jsx-namespace.d.ts | ||
// it helps to avoid issues when combining newer `@emotion/styled` and older `@emotion/react` versions | ||
// in such setup, ReactJSX namespace won't exist in `@emotion/react` and that would lead to errors | ||
import 'react' | ||
|
||
type IsPreReact19 = 2 extends Parameters<React.FunctionComponent<any>>['length'] | ||
? true | ||
: false | ||
|
||
export type ReactJSXIntrinsicElements = true extends IsPreReact19 | ||
? /** @ts-ignore */ | ||
JSX.IntrinsicElements | ||
: /** @ts-ignore */ | ||
React.JSX.IntrinsicElements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters