Skip to content

Set default types array to []; support "*" wildcard#63054

Merged
jakebailey merged 30 commits intomicrosoft:mainfrom
RyanCavanaugh:fix62195_2
Feb 5, 2026
Merged

Set default types array to []; support "*" wildcard#63054
jakebailey merged 30 commits intomicrosoft:mainfrom
RyanCavanaugh:fix62195_2

Conversation

@RyanCavanaugh
Copy link
Member

@RyanCavanaugh RyanCavanaugh commented Jan 28, 2026

Redo of #63031 with slightly more manageable commit history

Fixes #62195

Copilot AI review requested due to automatic review settings January 28, 2026 00:42
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Jan 28, 2026
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 28, 2026
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements a breaking change to TypeScript's types compiler option, setting its default to an empty array ([]) instead of automatically including all packages from node_modules/@types. A wildcard ("*") is introduced to allow users to opt into the old "include all" behavior for backward compatibility.

Changes:

  • Modified getAutomaticTypeDirectiveNames to return [] by default when types is undefined and support "*" wildcard expansion
  • Added usesWildcardTypes helper function to centralize wildcard detection logic
  • Updated error messages to suggest adding types to the types field in tsconfig when wildcard is not present
  • Updated 29+ tests to explicitly use "types": ["*"] where automatic type discovery was relied upon

Reviewed changes

Copilot reviewed 171 out of 265 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/compiler/moduleNameResolver.ts Core logic: changes getAutomaticTypeDirectiveNames to default to [] and support wildcard expansion
src/compiler/utilities.ts Adds usesWildcardTypes helper to check if types array includes "*"
src/compiler/checker.ts Updates error messages to conditionally suggest adding types to tsconfig
src/compiler/programDiagnostics.ts Updates file include diagnostics to handle wildcard
src/compiler/watch.ts Updates watch mode file include reasons for wildcard
src/jsTyping/jsTyping.ts Updates type discovery to use wildcard check
tests/cases/fourslash/server/* Adds "types": ["*"] to tests requiring auto-discovery
tests/cases/conformance/* Adds // @types: * directive to compiler tests
tests/baselines/reference/* Updates baselines for new error messages and behavior

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like some tests are still left.

I do also wonder if we need to be forcing this on for inferred projects in tsserver...

@jakebailey
Copy link
Member

@typescript-bot test top800

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 28, 2026

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top800 ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 800 repos with tsc comparing main and refs/pull/63054/merge:

Something interesting changed - please have a look.

Details

47ng/nuqs

12 of 14 projects failed to build with the old tsc and were ignored

packages/scripts/tsconfig.json

actions/starter-workflows

script/validate-data/tsconfig.json

script/sync-ghes/tsconfig.json

AIsouler/GKD\_subscription

tsconfig.json

APIs-guru/graphql-voyager

2 of 4 projects failed to build with the old tsc and were ignored

tsconfig.build.json

assistant-ui/assistant-ui

34 of 41 projects failed to build with the old tsc and were ignored

packages/tap/tsconfig.json

packages/styles/tsconfig.json

barbajs/barba

tsconfig.json

caorushizi/mediago

8 of 9 projects failed to build with the old tsc and were ignored

packages/shared/common/tsconfig.json

Chocobozzz/PeerTube

10 of 13 projects failed to build with the old tsc and were ignored

scripts/tsconfig.json

packages/types-generator/tsconfig.json

ChromeDevTools/chrome-devtools-mcp

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2339: Property 'webkitRequestFileSystem' does not exist on type 'Window & typeof globalThis'.
    • file:///mnt/ts_downloads/_/m/chrome-devtools-mcp/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHostStub.ts#L291
  • error TS2339: Property 'TEMPORARY' does not exist on type 'Window & typeof globalThis'.
    • file:///mnt/ts_downloads/_/m/chrome-devtools-mcp/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHostStub.ts#L291
  • error TS2304: Cannot find name 'Entry'.
    • file:///mnt/ts_downloads/_/m/chrome-devtools-mcp/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHostStub.ts#L295
  • error TS2304: Cannot find name 'DirectoryEntry'.
    • file:///mnt/ts_downloads/_/m/chrome-devtools-mcp/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHostStub.ts#L298

conventional-changelog/conventional-changelog

7 of 10 projects failed to build with the old tsc and were ignored

tools/tsconfig.json

packages/conventional-changelog-preset-loader/tsconfig.json

curlconverter/curlconverter

tsconfig.json

DayuanJiang/next-ai-draw-io

2 of 3 projects failed to build with the old tsc and were ignored

packages/mcp-server/tsconfig.json

@typescript-bot
Copy link
Collaborator

@jakebailey Here are some more interesting changes from running the top 800 repos suite

Details

DouyinFE/semi-design

17 of 18 projects failed to build with the old tsc and were ignored

ecosystem/semi-mcp/tsconfig.json

eggjs/egg

18 of 74 projects failed to build with the old tsc and were ignored

tools/egg-bin/test/fixtures/ts/tsconfig.json

tools/egg-bin/test/fixtures/setup-ts/tsconfig.json

  • error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
  • error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.

tools/egg-bin/test/fixtures/mocha-test-ts-esm/tsconfig.json

tools/egg-bin/test/fixtures/example-ts-error-stack-mixed/tsconfig.json

tools/egg-bin/test/fixtures/example-ts-error-stack/tsconfig.json

tools/egg-bin/test/fixtures/example-ts-cluster/tsconfig.json

packages/core/test/fixtures/egg-ts-js-tsconfig-paths/tsconfig.json

elie222/inbox-zero

2 of 8 projects failed to build with the old tsc and were ignored

packages/tinybird-ai-analytics/tsconfig.json

packages/tinybird/tsconfig.json

packages/resend/tsconfig.json

packages/loops/tsconfig.json

ether/etherpad-lite

src/tsconfig.json

f/awesome-chatgpt-prompts

2 of 3 projects failed to build with the old tsc and were ignored

packages/prompts.chat/tsconfig.json

facebook/docusaurus

26 of 43 projects failed to build with the old tsc and were ignored

packages/eslint-plugin/tsconfig.json

packages/docusaurus-plugin-ideal-image/tsconfig.json

packages/docusaurus-plugin-google-gtag/tsconfig.json

packages/docusaurus-plugin-google-analytics/tsconfig.json

packages/docusaurus-logger/tsconfig.json

packages/create-docusaurus/tsconfig.json

@typescript-bot
Copy link
Collaborator

@jakebailey Here are some more interesting changes from running the top 800 repos suite

Details

firecrawl/firecrawl

3 of 5 projects failed to build with the old tsc and were ignored

apps/js-sdk/firecrawl/tsconfig.json

fuma-nama/fumadocs

45 of 49 projects failed to build with the old tsc and were ignored

packages/twoslash/tsconfig.json

graphile/crystal

10 of 11 projects failed to build with the old tsc and were ignored

grafast/grafast/tsconfig.test.json

hediet/vscode-debug-visualizer

4 of 5 projects failed to build with the old tsc and were ignored

data-extraction/tsconfig.json

@typescript-bot
Copy link
Collaborator

@jakebailey Here are some more interesting changes from running the top 800 repos suite

Details

humanlayer/12-factor-agents

20 of 23 projects failed to build with the old tsc and were ignored

workshops/2025-05-17/sections/00-hello-world/walkthrough/00-tsconfig.json

workshops/2025-05/sections/01-cli-and-agent/tsconfig.json

packages/walkthroughgen/tsconfig.json

javascript-obfuscator/javascript-obfuscator

1 of 4 projects failed to build with the old tsc and were ignored

tsconfig.json

test/tsconfig.test.json

src/tsconfig.browser.json

langgenius/dify

1 of 2 projects failed to build with the old tsc and were ignored

sdks/nodejs-client/tsconfig.json

mattpocock/ts-reset

tsconfig.json

@typescript-bot
Copy link
Collaborator

@jakebailey Here are some more interesting changes from running the top 800 repos suite

Details

microsoft/vscode-extension-samples

16 of 77 projects failed to build with the old tsc and were ignored

webview-sample/tsconfig.json

  • error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

test-provider-sample/tsconfig.json

task-provider-sample/tsconfig.json

tabs-api-sample/tsconfig.json

source-control-sample/tsconfig.json

shell-integration-sample/tsconfig.json

quickinput-sample/tsconfig.json

progress-sample/tsconfig.json

notifications-sample/tsconfig.json

notebook-serializer-sample/tsconfig.json

l10n-sample/tsconfig.json

jupyter-server-provider-sample/tsconfig.json

jupyter-kernel-execution-sample/tsconfig.json

helloworld-web-sample/tsconfig.json

helloworld-test-cli-sample/tsconfig.json

helloworld-sample/tsconfig.json

getting-started-sample/tsconfig.json

fsprovider-sample/tsconfig.json

fsconsumer-sample/tsconfig.json

esbuild-sample/tsconfig.json

  • error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

drop-on-document/tsconfig.json

diagnostic-related-information-sample/tsconfig.json

decorator-sample/tsconfig.json

chat-sample/tsconfig.json

call-hierarchy-sample/tsconfig.json

basic-multi-root-sample/tsconfig.json

authenticationprovider-sample/tsconfig.json

modelcontextprotocol/inspector

2 of 4 projects failed to build with the old tsc and were ignored

cli/tsconfig.json

modelcontextprotocol/servers

src/sequentialthinking/tsconfig.json

src/memory/tsconfig.json

src/filesystem/tsconfig.json

moeru-ai/airi

24 of 45 projects failed to build with the old tsc and were ignored

packages/server-shared/tsconfig.json

packages/ccc/tsconfig.json

musistudio/claude-code-router

6 of 7 projects failed to build with the old tsc and were ignored

docs/tsconfig.json

@typescript-bot
Copy link
Collaborator

@jakebailey Here are some more interesting changes from running the top 800 repos suite

Details

Nutlope/aicommits

tsconfig.json

palantir/blueprint

23 of 25 projects failed to build with the old tsc and were ignored

packages/test-commons/src/tsconfig.json

packages/eslint-plugin/src/tsconfig.json

PlasmoHQ/plasmo

83 of 88 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2307: Cannot find module 'assert' or its corresponding type declarations.
  • error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'.
  • error TS2307: Cannot find module 'fs' or its corresponding type declarations.
  • error TS2307: Cannot find module 'fs/promises' or its corresponding type declarations.
  • error TS2307: Cannot find module 'path' or its corresponding type declarations.
  • error TS2307: Cannot find module 'process' or its corresponding type declarations.

packages/init/tsconfig.json

tsconfig.json

  • error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
  • error TS2307: Cannot find module 'assert' or its corresponding type declarations.
    • file:///mnt/ts_downloads/_/m/plasmo/packages/utils/assert.ts#L1

api/persistent/tsconfig.json

postcss/postcss

tsconfig.json

@typescript-bot
Copy link
Collaborator

@jakebailey Here are some more interesting changes from running the top 800 repos suite

Details

prisma/prisma

184 of 206 projects failed to build with the old tsc and were ignored

packages/type-benchmark-tests/huge-schema/tsconfig.json

packages/get-platform/tsconfig.json

packages/fetch-engine/tsconfig.json

packages/engines/tsconfig.json

packages/debug/tsconfig.json

packages/credentials-store/tsconfig.build.json

packages/client-engine-runtime/tsconfig.json

errorCodeCannotFindModule,
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code,
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesnt this need to fix tsconfig to add type to types array ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add a new LS feature for it at this point

@jakebailey jakebailey added the Breaking Change Would introduce errors in existing code label Jan 31, 2026
@typescript-bot typescript-bot added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 31, 2026
@github-project-automation github-project-automation bot moved this from Waiting on author to Needs merge in PR Backlog Feb 4, 2026
@jakebailey jakebailey closed this Feb 5, 2026
auto-merge was automatically disabled February 5, 2026 00:27

Pull request was closed

@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Feb 5, 2026
@jakebailey jakebailey reopened this Feb 5, 2026
@github-project-automation github-project-automation bot moved this from Done to Not started in PR Backlog Feb 5, 2026
@jakebailey jakebailey enabled auto-merge February 5, 2026 00:27
@jakebailey jakebailey added this pull request to the merge queue Feb 5, 2026
Merged via the queue into microsoft:main with commit f09a0e5 Feb 5, 2026
51 checks passed
@github-project-automation github-project-automation bot moved this from Not started to Done in PR Backlog Feb 5, 2026
eranhirsch added a commit to remeda/remeda that referenced this pull request Feb 6, 2026
Blame:  microsoft/TypeScript#63054

TypeScript are moving to explicit types instead of catch-all by default.
This means that projects need to have a types entry if they want to rely
on additional types.

This was surfaced by our canary job on February 5:
https://github.com/remeda/remeda/actions/runs/21703126297/job/62587774821
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team Breaking Change Would introduce errors in existing code For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Change default of types to [] in tsconfig.json

4 participants