Conversation
Greptile SummaryThis PR makes unjustified changes to the React Compiler playground's TypeScript configuration and adds an empty file to the repository root.
Confidence Score: 1/5
Important Files Changed
|
| @@ -6,9 +6,6 @@ | |||
| "dom.iterable", | |||
| "esnext" | |||
| ], | |||
There was a problem hiding this comment.
Removal of react/experimental types breaks type coverage
The "types": ["react/experimental"] configuration was intentionally added to provide TypeScript type definitions for React's experimental APIs (e.g., useActionState, useOptimistic, and other canary features). The React Compiler playground is specifically designed to work with these experimental APIs. Removing this will cause TypeScript to fall back to the stable React type definitions, potentially losing type coverage for experimental features used in the playground.
| ], | |
| "types": [ | |
| "react/experimental" | |
| ], | |
| "allowJs": true, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: compiler/apps/playground/tsconfig.json
Line: 8
Comment:
**Removal of `react/experimental` types breaks type coverage**
The `"types": ["react/experimental"]` configuration was intentionally added to provide TypeScript type definitions for React's experimental APIs (e.g., `useActionState`, `useOptimistic`, and other canary features). The React Compiler playground is specifically designed to work with these experimental APIs. Removing this will cause TypeScript to fall back to the stable React type definitions, potentially losing type coverage for experimental features used in the playground.
```suggestion
"types": [
"react/experimental"
],
"allowJs": true,
```
How can I resolve this? If you propose a fix, please make it concise.| "exclude": [ | ||
| "node_modules", | ||
| "../../../**" | ||
| "node_modules" | ||
| ] |
There was a problem hiding this comment.
Removal of monorepo exclude pattern may cause build issues
The "../../../**" exclude pattern was intentional — the playground sits at compiler/apps/playground/ (3 levels deep in the monorepo). This pattern prevents TypeScript from accidentally resolving and type-checking files from the broader React monorepo, which could cause compilation slowdowns or spurious type errors. It should be restored.
| "exclude": [ | |
| "node_modules", | |
| "../../../**" | |
| "node_modules" | |
| ] | |
| "exclude": [ | |
| "node_modules", | |
| "../../../**" | |
| ] |
Prompt To Fix With AI
This is a comment left during a code review.
Path: compiler/apps/playground/tsconfig.json
Line: 33-35
Comment:
**Removal of monorepo exclude pattern may cause build issues**
The `"../../../**"` exclude pattern was intentional — the playground sits at `compiler/apps/playground/` (3 levels deep in the monorepo). This pattern prevents TypeScript from accidentally resolving and type-checking files from the broader React monorepo, which could cause compilation slowdowns or spurious type errors. It should be restored.
```suggestion
"exclude": [
"node_modules",
"../../../**"
]
```
How can I resolve this? If you propose a fix, please make it concise.
Mirror of facebook/react#35977
Original author: Sarthakpanigrahi-2246
Summary
How did you test this change?