Closed mmailaender closed 5 months ago
There are a couple problems:
.d.ts
file. If you have skipLibCheck
enabled (which you should), your tsconfig will not apply to these files and they will not be checked for errors.Infer
not having been imported and const
statements not being legal in .d.ts
.This is quite an unfortunate footgun TS built into the language when really what most people want is not to check files from node_modules
. In general I'd recommend against using .d.ts
files at all in your source. There's not really ever a good reason to use them instead of a standard .ts
file and they create lots of problems.
Report a bug
@ssalbdivad I have created a reproduction of yesterday's
undefined
problem Discord Discussion.🧩 Context
🧑💻 Repro
https://github.com/mmailaender/svelte5/blob/arktype/src/lib/type.d.ts
GitPod: https://gitpod.io/?autostart=true#https://github.com/mmailaender/svelte5/blob/arktype/src/lib/type.d.ts