From 3b0d3381f92e587ea05b84d4922a6f56283ed9a9 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 22 Jan 2026 10:15:25 -0800 Subject: [PATCH] Fix baseline --- ...typesOptionWildcardWithExplicit.errors.txt | 25 +++++++++++++++++++ ...typesOptionWildcardWithExplicit.trace.json | 7 ++++++ .../typesOptionWildcardWithExplicit.types | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 tests/baselines/reference/typesOptionWildcardWithExplicit.errors.txt diff --git a/tests/baselines/reference/typesOptionWildcardWithExplicit.errors.txt b/tests/baselines/reference/typesOptionWildcardWithExplicit.errors.txt new file mode 100644 index 00000000000..4da554078f5 --- /dev/null +++ b/tests/baselines/reference/typesOptionWildcardWithExplicit.errors.txt @@ -0,0 +1,25 @@ +error TS2688: Cannot find type definition file for 'extra'. + The file is in the program because: + Entry point of type library 'extra' specified in compilerOptions + + +!!! error TS2688: Cannot find type definition file for 'extra'. +!!! error TS2688: The file is in the program because: +!!! error TS2688: Entry point of type library 'extra' specified in compilerOptions +!!! related TS1419 /tsconfig.json:1:39: File is entry point of type library specified here. +==== /tsconfig.json (0 errors) ==== + { "compilerOptions": { "types": ["*", "extra"] } } + +==== /app.ts (0 errors) ==== + // With "types": ["*", "extra"], all @types packages are automatically included + // plus any explicitly listed types (even if they don't exist in @types) + // This is useful for gradual migration + $.x; + _.map; + +==== /node_modules/@types/jquery/index.d.ts (0 errors) ==== + declare var $: { x: number }; + +==== /node_modules/@types/lodash/index.d.ts (0 errors) ==== + declare var _: { map: any }; + \ No newline at end of file diff --git a/tests/baselines/reference/typesOptionWildcardWithExplicit.trace.json b/tests/baselines/reference/typesOptionWildcardWithExplicit.trace.json index 1934501dac3..01094f97ac3 100644 --- a/tests/baselines/reference/typesOptionWildcardWithExplicit.trace.json +++ b/tests/baselines/reference/typesOptionWildcardWithExplicit.trace.json @@ -11,6 +11,13 @@ "File '/node_modules/@types/lodash/index.d.ts' exists - use it as a name resolution result.", "Resolving real path for '/node_modules/@types/lodash/index.d.ts', result '/node_modules/@types/lodash/index.d.ts'.", "======== Type reference directive 'lodash' was successfully resolved to '/node_modules/@types/lodash/index.d.ts', primary: true. ========", + "======== Resolving type reference directive 'extra', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", + "Resolving with primary search path '/node_modules/@types'.", + "Looking up in 'node_modules' folder, initial location '/'.", + "Searching all ancestor node_modules directories for preferred extensions: Declaration.", + "File '/node_modules/extra.d.ts' does not exist.", + "File '/node_modules/@types/extra.d.ts' does not exist.", + "======== Type reference directive 'extra' was not resolved. ========", "File '/node_modules/@types/jquery/package.json' does not exist according to earlier cached lookups.", "File '/node_modules/@types/package.json' does not exist.", "File '/node_modules/package.json' does not exist.", diff --git a/tests/baselines/reference/typesOptionWildcardWithExplicit.types b/tests/baselines/reference/typesOptionWildcardWithExplicit.types index c3674972508..495b8184e5b 100644 --- a/tests/baselines/reference/typesOptionWildcardWithExplicit.types +++ b/tests/baselines/reference/typesOptionWildcardWithExplicit.types @@ -14,6 +14,7 @@ $.x; _.map; >_.map : any +> : ^^^ >_ : { map: any; } > : ^^^^^^^ ^^^ >map : any @@ -31,4 +32,5 @@ declare var _: { map: any }; >_ : { map: any; } > : ^^^^^^^ ^^^ >map : any +> : ^^^