Repository navigation
Type inline-record cases of untagged variants as objects in genType #8693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ca2b7e8
c1e58c9
1abeeb3
20c702e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,14 @@ type r2 = B({g: string}) | |
| @genType @unboxed | ||
| type t = Array(array<int>) | Record({x: int}) | Function(int => int) | ||
|
|
||
| @genType | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reviewed commit message has no AGENTS.md reference: AGENTS.md:L68-L72 Useful? React with 👍 / 👎.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Every commit on this branch carries a |
||
| let tLength = (v: t) => | ||
| switch v { | ||
| | Array(a) => Array.length(a) | ||
| | Record({x}) => x | ||
| | Function(f) => f(0) | ||
| } | ||
|
|
||
| @genType | ||
| type tabIndex = | @as("0") Activity | @as("1") UserKeyword | @as(0) NumZero | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes a user-visible generated TypeScript type and fixes incorrect genType output, but the commit does not update
CHANGELOG.md; document the fix under the current Unreleased bug-fix section and include the required PR link.AGENTS.md reference: AGENTS.md:L93-L95
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 1abeeb3, under the Unreleased section with the PR link.