Repository navigation
Commit f62f83c
Translate char to number in genType (#8988)
Why:
`char` is an alias of `int` since #8892, but genType's table of builtin
types had no row for it and does not expand the abbreviation, so a
`char` in a genType signature was emitted as the TypeScript type `char`,
which does not exist.
Representation modified (genType's TypeScript type of char):
Example:
@Gentype
let char0 = (x: char) => x
Before (text): export const char0: (x:char) => char = CoreJS.char0 as any;
After (text): export const char0: (x:number) => number = CoreJS.char0 as any;
Claude-Session: https://claude.ai/code/session_01Xk6AeCYpCK4SZRtHYKHGoe
Signed-off-by: Christoph Knittel <ck@cca.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 9ad2cfb commit f62f83c
5 files changed
Lines changed: 12 additions & 1 deletion
File tree
- changes
- compiler/gentype
- tests/gentype_tests/typescript-react-example/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments