dillon1000/react

Commit

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.
Browse files
Changed paths3 files
First-parent comparison
M compiler/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 Added
Patch

Files changed

Rendering syntax-highlighted changes…