4 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
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]
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
Andrew Branch
cbac1ddfc7
Skip verifyCompilerOptions when possible on program updates (#60754)
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2025-01-09 17:35:20 -08:00