Disable intellisense for default typescript libraries in VSCODE

In order to control which libraries are loaded in your project and are providing intellisense/autocomplete you need to configure lib property [array type] of compilerOptions in your tsconfig.json file.

If lib property is not configured, TypeScript will automatically load following libraries:

  • For target ES5: DOM, ES5, ScriptHost.
  • For target ES6: DOM, ES6, DOM.Iterable, ScriptHost.

Example configuration in tsconfig.json file could look like this:

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "es2017"
    ]
  }
}

This would load only libraries for ECMAScript 2017 intellisense.

You can read more about compiler options, including lib here: https://www.typescriptlang.org/docs/handbook/compiler-options.html


Open the Settings editor File > Preferences > Settings (Code > Preferences > Settings on macOS

snippets : To disable basic TypeScript snippets you can set editor.snippetSuggestions to "none" in your settings file. If you'd like to see snippets, you can specify the order relative to suggestions; at the top ("top"), at the bottom ("bottom"), or inlined ordered alphabetically ("inline"). The default is "inline" enter image description here

JSDoc support: To disable JSDoc comment suggestions in TypeScript, set "typescript.suggest.completeJSDocs": false enter image description here

Auto imports: You can disable auto imports by setting "typescript.autoImportSuggestions.enabled": false enter image description here

Formatting: set "typescript.format.enable" to false to disable it.

JSX and auto-closing tags: Set "typescript.autoClosingTags" to false to disable JSX tag closing. enter image description here

Unused variables and unreachable code: To disable fading out of unused code, set "editor.showUnused" to false. You can also disable fading of unused code only in TypeScriptScript by setting,

"[typescript]": {
    "editor.showUnused":  false
},
"[typescriptreact]": {
    "editor.showUnused":  false
},

enter image description here

Code suggestions: Set "typescript.suggestionActions.enabled" to false to disable suggestions. enter image description here

You can read more on https://code.visualstudio.com/docs/languages/typescript