Repository navigation
Widen FLAGS_SPECS indexer key from unique symbol union to string | symbol - #2338
SamChou19815 wants to merge 1 commit into
Conversation
…mbol Summary: Replaces the `InternalOpenFlags` (`string | typeof kWritableMustExist`) index signature key on `FLAGS_SPECS` in `metro-memory-fs` with `string | symbol`. Index signatures with `unique symbol` keys are disallowed under strict dictionary-key checking (matching TypeScript TS1337); `string | symbol` accepts both string flags and the internal symbol key with no runtime changes. Changelog: [Internal] Differential Revision: D136531117
|
@SamChou19815 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D136531117. |
Metro review: Looks goodRisk: low · Commit: This PR changes the key type of the No findings. Verified
Not run: I didn't run a benchmark because this change only affects types and has no runtime effect. I didn't check behavior under the stricter dictionary-key Flow setting the description mentions, because this repo's Flow config doesn't enable it. Automated review by Claude. Advisory only: it never approves or blocks, and a maintainer makes the call. |
Summary:
Replaces the
InternalOpenFlags(string | typeof kWritableMustExist) index signature key onFLAGS_SPECSinmetro-memory-fswithstring | symbol.Index signatures with
unique symbolkeys are disallowed under strict dictionary-key checking (matching TypeScript TS1337);string | symbolaccepts both string flags and the internal symbol key with no runtime changes.Changelog: [Internal]
Differential Revision: D136531117