Skip to content

Commit

Permalink
fix: add target to ReactCompilerOptions (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Oct 29, 2024
1 parent 6ec5551 commit 2e900ea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/node/core/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export interface TSDocCustomTag {
}

/**
* Until these types are on npm: https://github.com/facebook/react/blob/2ba462b665bb4691067e67db3cfbffc56959b788/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L34-L120
* Until these types are on npm: https://github.com/facebook/react/blob/0bc30748730063e561d87a24a4617526fdd38349/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L39-L122
* @alpha
*/
export interface ReactCompilerOptions {
Expand Down Expand Up @@ -105,6 +105,14 @@ export interface ReactCompilerOptions {
eslintSuppressionRules?: Array<string> | null | undefined

sources?: Array<string> | ((filename: string) => boolean) | null

/**
* The minimum major version of React that the compiler should emit code for. If the target is 19
* or higher, the compiler emits direct imports of React runtime APIs needed by the compiler. On
* versions prior to 19, an extra runtime package react-compiler-runtime is necessary to provide
* a userspace approximation of runtime APIs.
*/
target: '17' | '18' | '19'
}

/**
Expand Down

0 comments on commit 2e900ea

Please sign in to comment.