dillon1000/react
Commit
Browse files feat(compiler): Ignore `TSInterfaceDeclaration` (#30314)
## Summary
The following was not supported:
```ts
function A() {
interface C {
id: number;
}
return 0;
}
```
Message:
> Todo: (BuildHIR::lowerStatement) Handle TSInterfaceDeclaration
statements (2:4)
Playground:
https://playground.react.dev/#N4Igzg9grgTgxgUxALhAMygOzgFwJYSYAEAggBQCURwAOsUXpjgjGgIaJEDC1dR-DACbIimKAFsARiwDcfIgF95MBDljEADHMwKQCoA
This PR fixes that.
## How did you test this change?
Added a test.Changed paths3 files
First-parent comparisoncompiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts ModifiedA compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/ignore-inner-interface-types.expect.md AddedA compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/ignore-inner-interface-types.ts AddedPatch
Files changed
Rendering syntax-highlighted changes…