Commit 5eecbb6
committed
Harden twoslash config against silent regressions
Two small defensive changes on top of #741:
- Throw instead of warn when src/data/twoslash/aspire.d.ts is missing.
Since #741 source-controls the bundle, a missing file means the tree
is corrupted — catching that at build time beats silently shipping
samples that can't resolve `./.modules/aspire.js`.
- Flip noErrorValidation to false so unannotated TS errors fail the
build rather than rendering as squigglies in the shipped HTML.
Samples that deliberately illustrate a compiler error can opt in
with `// @errors: <codes>`; otherwise an error means the sample
(or the generated SDK shape) is wrong and should be fixed, not
shown to readers. Verified with a full build: zero unannotated
errors across the current docs.1 parent 4a4fdc0 commit 5eecbb6
1 file changed
Lines changed: 16 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 12 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
60 | | - | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
0 commit comments