Closed lifeisfakenews closed 3 months ago
Yeah, this looks to be the same issue as #1172. Currently quick-lint-js does not respect declare global
in .d.ts files like this. I wrote some possible solutions in this comment: https://github.com/quick-lint/quick-lint-js/issues/1172#issuecomment-1884011471
Some possible solutions:
- Rewrite your code to use
import
instead of globals.- Manually replicate app.d.ts to your quick-lint-js.config.
- Use a tool which replicates app.d.ts's globals to your quick-lint-js.config. (This tool does not yet exist.)
- Use a
"globals-files"
feature in quick-lint-js.config to specify source files. You would list"globals-files": ["src/app.d.ts"]
. (This feature does not yet exist.)- Have quick-lint-js auto-scan for .ts and .d.ts files which declare globals, similar to what TypeScript's compiler does. (This feature does not yet exist.)
I'm closing this as a duplicate.
I am getting the error
use of undeclared type
onTournament
for the following code:even though, in vsc i can ctrl click on
Tournament
and it takes me to the definition in mytypes.d.ts
file.i can even hover it and it will show me the type information![image](https://github.com/quick-lint/quick-lint-js/assets/86294896/c21a3fe6-1169-4d18-99b4-a84d5c615ba0)