Potentially misleading documentation for the types
TSConfig option
#61256
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
Acknowledgement
Comment
Here is what the docs for the
types
TSConfig option say:I run the following commands:
And created the following
tsconfig.json
file:Upon opening
tsconfig-types-misleading-docs
in VS Code 1.97.2 (the latest version at the time of writing), navigating toindex.ts
and typingtype Type = JSONSchema
, I see suggestions from thejson-schema
package:Weirdly enough, I only see those suggestions when both
@types/json-schema
andjson-schema
are installed. Moreover, I stop seeing them when I remove thenoEmit
,target
andmodule
options fromtsconfig.json
(but not when I remove only some of them). And then I can also remove thetypes
option itself and still won't see the suggestions.So what is going on here? Are the docs misleading, or am I missing something?
Should I care to include types for packages that do not have any global declarations like
json-schema
in thetypes
field?A similar question came up before on Stack Overflow:
types
option in TSConfig doesn't work as stated in the TS docsThe text was updated successfully, but these errors were encountered: