Commit f11368e
fix(types): export the generated
`lib/index.d.ts` re-exported `Data` from `src/types/core/data`, which was
removed in 1f1898e ("refactor: Generate data type union instead of hand
writing"). That commit repointed the five importers under `src/types/`, but
`lib/index.d.ts` and `src/types/core/data.internal.d.ts` were missed.
The entry point already re-exports the generated schema with `export type *`,
and the generator now emits `Data` there. An explicit named re-export takes
precedence over a star re-export, so the dangling line shadowed the working
union and `Data` resolved to `any` for every consumer. `skipLibCheck: true` —
the default in most app tsconfigs — hides the unresolved module, so the failure
is silent: traces annotated `Data` are simply unchecked.
Reproduced against plotly.js 4.0.0 from npm:
import type { Data } from 'plotly.js';
declare const d: Data;
const n: number = d; // no error
const s = d.nonexistentProperty; // no error
Both now error as expected, and `FullData` resolves with `skipLibCheck: false`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>Data union instead of a deleted module1 parent cc143a1 commit f11368e
2 files changed
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 64 | | |
71 | 65 | | |
72 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments