Skip to content

Commit b61443b

Browse files
yslpnSukkaW
andauthored
fix(compiler): add missing target version type to ReactCompilerConfig (#5)
Co-authored-by: Sukka <isukkaw@gmail.com>
1 parent 2bbf7ee commit b61443b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/types.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,13 @@ export interface ReactCompilerConfig {
8484
*/
8585
ignoreUseNoForget?: boolean,
8686

87-
sources?: string[] | ((filename: string) => boolean) | null
87+
sources?: string[] | ((filename: string) => boolean) | null,
88+
89+
/*
90+
* The minimum major version of React that the compiler should emit code for. If the target is 19
91+
* or higher, the compiler emits direct imports of React runtime APIs needed by the compiler. On
92+
* versions prior to 19, an extra runtime package react-compiler-runtime is necessary to provide
93+
* a userspace approximation of runtime APIs.
94+
*/
95+
target?: '17' | '18' | '19' | (string & {})
8896
};

0 commit comments

Comments
 (0)