36705 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
73f106fc15 Extract wildcard check into typesIncludesWildcard helper
- Added typesIncludesWildcard() function in moduleNameResolver.ts
- Updated all wildcard checks to use the helper function:
  - checker.ts: getCannotFindNameDiagnosticForName
  - programDiagnostics.ts: FileIncludeKind.AutomaticTypeDirectiveFile
  - watch.ts: fileIncludeReasonToRelatedInformation
  - resolutionCache.ts: updateTypeRootsWatch
  - jsTyping.ts: discoverTypings
- Added imports in all consuming files

This centralizes the wildcard checking logic and makes the code more maintainable.

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-27 19:57:57 +00:00
Ryan Cavanaugh
a2b2a62d18
Update src/jsTyping/jsTyping.ts 2026-01-27 11:46:06 -08:00
copilot-swe-agent[bot]
7f169c18f2 Fix compiler logic to check for wildcard correctly
- checker.ts: Check for wildcard before choosing error message
- programDiagnostics.ts: Check for wildcard before returning early
- watch.ts: Check for wildcard to choose correct message
- jsTyping.ts: Use optional chaining for wildcard check
- tscWatch tests: Use wildcard for tests that dynamically install types

These functions should only show "add to types" messages when wildcard is NOT present.

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-27 19:04:03 +00:00
copilot-swe-agent[bot]
361221e4d2 Update baselines for error message and watch logic changes
All tests now pass with updated error messages that always suggest adding to types array.
Fixed baselines for:
- tsbuild/moduleResolution: type-reference-resolution test (TheNum error resolved)
- tsc/incremental: react-jsx tests (JSX errors reduced from 3 to 1)
- tscWatch/resolutionCache: node modules tests (process error resolved)
- Multiple error message baselines updated to show new diagnostic messages

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-27 18:33:44 +00:00
copilot-swe-agent[bot]
5b122ff9cf Fix error messages and watch logic for new types default
- Updated getCannotFindNameDiagnosticForName to always suggest adding to types field
- Fixed FileIncludeKind.AutomaticTypeDirectiveFile messages to always show "specified in compilerOptions"
- Updated updateTypeRootsWatch to check for wildcard instead of just checking if types exists
- Updated discoverTypings to discover when types is undefined or includes wildcard

These changes ensure the new types default behavior is properly reflected in error messages and file watching.

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-27 17:34:22 +00:00
copilot-swe-agent[bot]
387b02acf5 Fix all tests with unintentional error changes
Added explicit types arrays to tests that had NEW errors after the default change:
- tsc/incremental: react-jsx tests now have types: ["react"]
- tsbuild/moduleResolution: type-reference-resolution test now has types: ["sometype"]
- tscWatch/resolutionCache: tests now have types: ["node"]
- tsserver tests: added types for node, lib1, lib2, typings
- compiler tests: jsDeclarationsTypeReferences and typeReferenceDirectives tests now have explicit @types directives

All tests now pass with only expected errors (no unintentional changes).

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-22 23:11:56 +00:00
Ryan Cavanaugh
89de5f669e Missed baselines 2026-01-22 11:09:35 -08:00
Ryan Cavanaugh
e641e7eb1c Merge branch 'copilot/change-default-types-to-empty' of https://github.com/microsoft/TypeScript into copilot/change-default-types-to-empty 2026-01-22 10:18:56 -08:00
Ryan Cavanaugh
3b0d3381f9 Fix baseline 2026-01-22 10:15:25 -08:00
Ryan Cavanaugh
5144841203 Don't drop types 2026-01-22 10:13:25 -08:00
copilot-swe-agent[bot]
83af77128d Fix tests with new errors from types default change
Added explicit types arrays to tests that now have new errors:
- moduleResolution_automaticTypeDirectiveNames: types: ["a"]
- referenceTypesPreferedToPathIfPossible: types: ["node"]
- typeRootsFromMultipleNodeModulesDirectories: types: ["dopey", "grumpy", "sneezy"]
- typeRootsFromNodeModulesInParentDirectory: types: ["foo"]
- typingsLookup3: types: ["jquery"]

These tests relied on automatic @types inclusion and now require explicit configuration.

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-22 18:03:55 +00:00
Ryan Cavanaugh
148074cdb0 Put the wildcard expansion in its correct position 2026-01-22 09:30:10 -08:00
copilot-swe-agent[bot]
25b06e826d Refactor getAutomaticTypeDirectiveNames for clarity
- Early return when hasWildcard is false
- Remove explanatory comments as code is self-documenting
- Addresses code review feedback

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-22 00:43:32 +00:00
copilot-swe-agent[bot]
95e2cd01ee Improve wildcard handling to support mixed types arrays
- Enhanced wildcard logic to support mixing "*" with explicit types
- Added test for wildcard combined with explicit types
- This supports gradual migration pattern: types: ["*", "node", "jest"]
- All 99,255 tests passing

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-22 00:02:25 +00:00
copilot-swe-agent[bot]
8eeb7029ad Accept final baseline and verify tests pass
All tests passing with new types default behavior

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-21 23:50:54 +00:00
copilot-swe-agent[bot]
30400496e2 Fix tests affected by types default change
Updated tests to explicitly specify types they depend on:
- Added "types": ["node"] to tests requiring @types/node
- Added "types": ["react"] to tests requiring @types/react
- Added "types": ["classnames"] to UMD module tests
- Added "types": ["*"] to external project test to maintain old behavior
- Fixed autoImportPackageJsonFilterExistingImport3 test structure

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-21 23:41:29 +00:00
copilot-swe-agent[bot]
2b70067c56 Implement default types=[] and wildcard support
- Modified getAutomaticTypeDirectiveNames to return empty array when types is undefined
- Added support for "*" wildcard value to opt into old "include all" behavior
- Created comprehensive test cases for new functionality

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2026-01-21 23:18:01 +00:00
copilot-swe-agent[bot]
4a9fccf76d Initial plan 2026-01-21 23:11:11 +00:00
dependabot[bot]
d9d9eeafa0
Bump the github-actions group across 1 directory with 3 updates (#63013)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 19:43:57 +00:00
Daniel Rosenwasser
c3dc61d18a
Turn // @strict off in all failing fourslash tests which do not contain baseline calls (#63023) 2026-01-21 17:29:18 +00:00
Daniel Rosenwasser
e6fac66a72
Explicitly set strict: false for project tests, eval tests, and more programmatic fourslash tests (#63024) 2026-01-21 02:26:40 +00:00
Daniel Rosenwasser
58ed4bcfe4
More test suite strictness fixups (#63022) 2026-01-21 00:19:04 +00:00
o-m12a
ff5dbcf272
Fix a typo in the JSDoc of Math.trunc(…) (#63020) 2026-01-21 00:17:15 +00:00
Daniel Rosenwasser
7f6a84673d
Prepare tests for --noImplicitAny (#62989)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-16 19:09:29 +00:00
Mateusz Burzyński
a586c340a2
Fixed crash related to index type deferral on generic mapped types with name types (#60528)
Co-authored-by: Ryan Cavanaugh <RyanCavanaugh@users.noreply.github.com>
2026-01-15 21:20:56 +00:00
Sheetal Nandi
7affa9e540
Assume rootDir is the current configuration directory (#62418) 2026-01-15 21:16:15 +00:00
Sheetal Nandi
4d94ccb06b
Handle resolution watching when its dynamic scriptInfo (#62894) 2026-01-15 19:13:21 +00:00
Daniel Rosenwasser
a9f534f271
Correctly split line endings for // @testOption: value parsing (#62987)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-15 03:13:51 +00:00
Daniel Rosenwasser
64d1978944
More strictness prep (#62984) 2026-01-14 00:19:55 +00:00
Ryan Cavanaugh
631affd1d7
Deprecate --outFile (#62981) 2026-01-13 20:40:31 +00:00
Mateusz Burzyński
7bb5ba3de6
Discard types that reduce to never before discriminating by discriminable items (#62275) 2026-01-13 17:13:48 +00:00
Daniel Rosenwasser
f5ccf4345d
Test updates for strict initialization (#62958) 2026-01-09 23:47:35 +00:00
Copilot
c574e4090d
Fix "never nullish" diagnostic missing expressions wrapped in parentheses (#62789)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Co-authored-by: Ryan Cavanaugh <ryanca@microsoft.com>
Co-authored-by: Ryan Cavanaugh <RyanCavanaugh@users.noreply.github.com>
2026-01-09 18:57:02 +00:00
Mateusz Burzyński
632479f28d
Fixed an issue causing spurious "used before being assigned" errors in for of/in loops (#61376)
Co-authored-by: Ryan Cavanaugh <RyanCavanaugh@users.noreply.github.com>
2026-01-09 00:27:42 +00:00
Daniel Rosenwasser
9d364978d3
Simplify "Configure Build Tools" devcontainer step. (#62955) 2026-01-05 22:42:08 +00:00
Anders Hejlsberg
f3770c9b89
Fix crash in abstract property checking (#62923) 2025-12-28 21:12:38 +00:00
Anders Hejlsberg
1f5f9f34d3
Fix crash in mixin checking (#62928) 2025-12-26 23:15:54 +00:00
Mateusz Burzyński
2dfdbbabae
Fixed crash when adding unreachable code diagnostic in situations with missing nodes (#62914) 2025-12-19 13:18:44 +00:00
Ryan Cavanaugh
b78f0899ab
Add note re: PRs to CONTRIBUTING.md (#62889)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-15 19:45:08 +00:00
dependabot[bot]
db3ae1bebb
Bump the github-actions group with 4 updates (#62897)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-15 17:07:11 +00:00
Tu Shaokun
0a07132715
Fix typo: MERCHANTABLITY → MERCHANTABILITY (#62891) 2025-12-12 16:59:36 +00:00
Jake Bailey
d7ae3aa940
Fix accidental module replacements in tests (#62890) 2025-12-12 16:33:41 +00:00
Ryan Cavanaugh
16b933fb7b
Deprecate module syntax (#62876) 2025-12-12 00:21:01 +00:00
Jake Bailey
c84cb94778
Revert "ES2020: fix String.prototype.matchAll type and description" (#62885) 2025-12-11 22:21:52 +00:00
Jordan Harband
bbb5322c96
ES2020: fix String.prototype.matchAll type and description (#62873) 2025-12-11 19:36:19 +00:00
Mateusz Burzyński
366da34ae6
Improve inference by not considering thisless functions to be context-sensitive (#62243) 2025-12-10 19:08:29 +00:00
Jake Bailey
1da8266179
Disable some more merge queue jobs (#62871) 2025-12-09 20:30:50 +00:00
magic-akari
3b9acae97c
Allow subpath imports that start with #/ (#62844) 2025-12-09 18:54:52 +00:00
Lars Kappert
ab142be459
Move knip args (#62865) 2025-12-09 04:33:55 +00:00
Jake Bailey
c21f73fd4e
Reenable fail-fast in merge queues (#62856) 2025-12-08 12:14:40 -08:00