microsoft / microsoft/react-native-windows
react-native codegen GUID and symbol types
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
Summary
These two types would be ergonomically convenient for TurboModules -- there's ways around through strings and type workarounds but it's cumbersome to do that.
Motivation
The GUID type would be convenient type to avoid parsing/constructing strings in native code manually.
The symbol type would be convenient as an opaque type, similar to PlatformColor when referencing brushes or high contrast color types without openly exposing the details of the JS-side representation for manipulation.
Basic Example
The symbol type I'm working around with my own type written as:
type OpaqueFooTypeDef = symbol & { __TYPE__: "Foo" };
export type OpaqueFooType =
| OpaqueFooTypeDef
| OpaqueFooTypeDef;
though I also can't export that type and share it across module definitions so that's a little annoying.
Open Questions
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by tracing React Native Windows TurboModule codegen type definitions and existing handling for opaque or platform-specific types. Done would require an agreed representation for GUID and symbol types, support across module definitions, and tests covering generated native code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile-dev, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100