Repository navigation
Commit e626087
test(json-schema): don't export recursive inferred values under TS 7.1
TS 7.1 rejects declaration emit of anonymous cyclic types (TS5088) that
TS 5 and 6 elided to `any`
(microsoft/TypeScript#64656), so the exported
recursive values that checked declaration emit could name inference's
internal aliases fail the root type check. They are unexported like the
cyclic scope in tsCompat, and infer.test.ts's copy of jsonSchema.test.ts's
tree is removed. A user who exports a recursive inferred schema with
`declaration` enabled under TS 7.1 hits the same error, as with a cyclic
arktype scope.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>1 parent 4cf491f commit e626087
3 files changed
Lines changed: 8 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 12 | | |
22 | 13 | | |
23 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
0 commit comments