Commit 3d661c2
committed
CCR 3
Type the handle's metadata as deeply readonly.
`defineFactory` deep-freezes the snapshot it stores, but `FactoryHandle.meta`
was typed as a mutable `FactoryMeta`, so `handle.meta.name = "..."` and
`handle.meta.phases.push(...)` compiled and then threw at runtime. The test
asserts both halves: the mutation is a type error and it also throws.1 parent 168a6a8 commit 3d661c2
2 files changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
197 | 210 | | |
198 | 211 | | |
199 | 212 | | |
200 | 213 | | |
201 | | - | |
| 214 | + | |
202 | 215 | | |
203 | 216 | | |
204 | 217 | | |
| |||
422 | 435 | | |
423 | 436 | | |
424 | 437 | | |
425 | | - | |
| 438 | + | |
426 | 439 | | |
427 | 440 | | |
428 | 441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
| |||
0 commit comments