how to disable auto ts dom type

If I do not import Response type from express, webstorm auto infer Response type as dom fetch Response type. How can I disable this behavior?

1 comment
Comment actions Permalink

make sure that DOM lib is not included in your tsconfig.json - it's there by default if "lib" is not specified explicitly, see

If --lib is not specified a default list of libraries are injected. The default libraries injected are:
► For --target ES5: DOM,ES5,ScriptHost
► For --target ES6: DOM,ES6,DOM.Iterable,ScriptHost

Excluding DOM from tsconfig.json + disabling the predefined HTML library should help


Please sign in to leave a comment.