Skip to content

Conversation

@RyanCavanaugh
Copy link
Member

Redo of #63031 with slightly more manageable commit history

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

@typescript-bot
Copy link
Collaborator

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

Details

reduxjs/redux-toolkit

31 of 37 projects failed to build with the old tsc and were ignored

packages/toolkit/scripts/issue-triage/tsconfig.json

examples/publish-ci/expo/tsconfig.json

reduxjs/reselect

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

typescript_test/tsconfig.json

  • error TS2318: Cannot find global type 'Boolean'.
    • Project Scope
  • error TS2318: Cannot find global type 'CallableFunction'.
    • Project Scope
  • error TS2318: Cannot find global type 'IArguments'.
    • Project Scope
  • error TS2318: Cannot find global type 'NewableFunction'.
    • Project Scope
  • error TS2318: Cannot find global type 'Number'.
    • Project Scope
  • error TS2318: Cannot find global type 'Object'.
    • Project Scope

redwoodjs/graphql

97 of 105 projects failed to build with the old tsc and were ignored

packages/router/tsconfig.cjs.json

packages/eslint-plugin/tsconfig.json

packages/context/tsconfig.cjs.json

resend/react-email

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

packages/react-email/src/utils/preview/hot-reloading/test/tsconfig.json

retejs/rete

tsconfig.json

shardeum/shardeum

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

scripts/network-account-compare/tsconfig.json

slidevjs/slidev

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

packages/vscode/syntaxes/tsconfig.json

TahaSh/swapy

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

tsconfig.build.json

TanStack/query

76 of 117 projects failed to build with the old tsc and were ignored

packages/vue-query/tsconfig.legacy.json

packages/solid-query/tsconfig.legacy.json

packages/react-query-devtools/tsconfig.legacy.json

packages/react-query/tsconfig.legacy.json

packages/query-core/tsconfig.legacy.json

TanStack/router

277 of 288 projects failed to build with the old tsc and were ignored

examples/solid/start-convex-better-auth/convex/tsconfig.json

teableio/teable

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

packages/eslint-config-bases/tsconfig.json

@typescript-bot
Copy link
Collaborator

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

Details

theatre-js/theatre

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

packages/utils/devEnv/tsconfig.json

packages/theatric/devEnv/tsconfig.json

packages/saaz/devEnv/tsconfig.json

packages/react/devEnv/tsconfig.json

packages/r3f/devEnv/tsconfig.json

packages/dataverse/devEnv/tsconfig.json

tinacms/tinacms

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

packages/@tinacms/datalayer/tsconfig.json

tradingview/lightweight-charts

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

packages/create-lwc-plugin/tsconfig.json

TypeStrong/typedoc

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

src/test/converter2/tsconfig.json

upstash/context7

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

packages/cli/tsconfig.json

vercel/vercel

201 of 230 projects failed to build with the old tsc and were ignored

packages/node/test/fixtures/18.1-nested-packagejson/frontend/tsconfig.json

packages/node/test/fixtures/18.1-nested-packagejson/backend/tsconfig.json

packages/node/test/fixtures/18-nested-tsconfig/functions/tsconfig.json

packages/express/test/fixtures/20-main-field/tsconfig.json

packages/express/test/fixtures/19-index-cts-module-tsconfig/tsconfig.json

packages/cli/test/dev/fixtures/nested-tsconfig/api/tsconfig.json

voideditor/void

54 of 58 projects failed to build with the old tsc and were ignored

test/monaco/tsconfig.json

extensions/simple-browser/preview-src/tsconfig.json

extensions/markdown-math/notebook/tsconfig.json

  • error TS2591: Cannot find name 'require'. 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.

webdriverio/webdriverio

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

examples/wdio/vite-vue-example/tsconfig.json

@github-project-automation github-project-automation bot moved this from Not started to Waiting on author in PR Backlog Jan 28, 2026
{
"compilerOptions": {
"strict": true,
"module": "node16"
Copy link
Member

Choose a reason for hiding this comment

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

add wild card here too ?

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 ?

/home/src/tslibs/TS/Lib/lib.d.ts Text-1 "interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };"
/users/username/projects/project/app.ts SVC-1-0 "let x = 1;"
/users/username/projects/project/node_modules/@types/lib1/index.d.ts Text-1 "export let a: number"
Copy link
Member

Choose a reason for hiding this comment

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

need to add wildcard types to this test ?

@@ -98,55 +98,18 @@ Info seq [hh:mm:ss:mss] event:
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/test 1 undefined Config: /user/username/projects/myproject/test/tsconfig.json WatchType: Wild card directory
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/test 1 undefined Config: /user/username/projects/myproject/test/tsconfig.json WatchType: Wild card directory
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/test/tsconfig.json
Info seq [hh:mm:ss:mss] ======== Resolving type reference directive 'UpperCasePackage', containing file '/user/username/projects/myproject/test/__inferred type names__.ts', root directory '/user/username/projects/myproject/lib/@types,/user/username/projects/myproject/lib/@app'. ========
Copy link
Member

Choose a reason for hiding this comment

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

add types wildcard ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Waiting on author

Development

Successfully merging this pull request may close these issues.

4 participants