Closed tremby closed 11 months ago
I'll take a look at it.
Can you show me your package.json settings?
I can't reproduce the tsc build error
Unless I switch off skipLibCheck
in the TS config, it's not a typescript error I'm receiving at build time.
Here: https://github.com/tremby/urllib-type-issue
The issue I'm seeing is the type that the request
method returns. It's coming back as any
, which means I don't get all the nice type inference and safety and suggestions in my editor I should get. See screenshots:
Vim (with ALE, which is running tsserver
, and which correctly picks up the project's configuration) reports that responseObj
has type any
:
Vim reports that x
on the highlighted line has type true
, which is a roundabout way of confirming that responseObj
has type any
:
Thanks. Types are appearing correctly now.
I'm using node 18.16.1 and typescript 5.2.2.
My tsconfig.json:
A file
src/test.mts
:The variable
test
has typeany
.If I switch off
skipLibCheck
in typescript, I see a number of errors in urllib:I'm not sure if they're related.
Am I doing something wrong? Something wrong with my TS configuration? Am I using an unsupported target?