In StrictHTMLFormElements.d.ts - which I can't link because it looks like the TS types are only generated at bundling time for new npm releases(?)
And that @@iterator(): Iterator<Elem>; line is not valid TS syntax. It should be [Symbol.iterator](): IterableIterator<Elem>;. So probably it's more of a root problem on flow-api-translator but until this type is fixed in RSD we can't bump to 0.0.6.
Expected behavior
Types are correct and tsc builds successfully.
Steps to reproduce
create a new react-native project (npx react-native@latest init RSDBaseProject)
add import type {StrictHTMLCollection} from 'react-strict-dom/dist/types/StrictHTMLFormElements'; around L20 or so in App.tsx
Describe the issue
While trying to bump RSD to latest in our fluent repo (https://github.com/microsoft/fluentui/tree/xplat/apps/xplat-v9) I hit the current set of errors during the build step:
Error log
``` node_modules/react-strict-dom/dist/types/StrictHTMLFormElements.d.ts:39:3 - error TS1131: Property or signature expected. 39 @@iterator(): IteratorAfter some digging, it seems that this is caused by this new
StrictHTMLCollection
interface added a few days ago in this commit by @nmn https://github.com/facebook/react-strict-dom/commit/2c06e8437b8c367482a72cb11a16d89c4e065f11What happens is that the Typescript types generated for it are like so:
In
StrictHTMLFormElements.d.ts
- which I can't link because it looks like the TS types are only generated at bundling time for new npm releases(?)And that
@@iterator(): Iterator<Elem>;
line is not valid TS syntax. It should be[Symbol.iterator](): IterableIterator<Elem>;
. So probably it's more of a root problem onflow-api-translator
but until this type is fixed in RSD we can't bump to 0.0.6.Expected behavior
Types are correct and tsc builds successfully.
Steps to reproduce
react-native
project (npx react-native@latest init RSDBaseProject
)import type {StrictHTMLCollection} from 'react-strict-dom/dist/types/StrictHTMLFormElements';
around L20 or so inApp.tsx
yarn tsc
Test case
No response
Additional comments
No response