TS1046
error TS1046: Top-level declarations in .d.ts files must start with either a ‘declare’ or ‘export’ modifier.
Broken Code ❌
1 |
|
Fixed Code ✔️
If you want to export a constant from a definition file (d.ts
), then you have to use the export
modifier:
1 |
|