|
| 1 | +Input:: |
| 2 | +//// [/lib/lib.d.ts] |
| 3 | +/// <reference no-default-lib="true"/> |
| 4 | +interface Boolean {} |
| 5 | +interface Function {} |
| 6 | +interface CallableFunction {} |
| 7 | +interface NewableFunction {} |
| 8 | +interface IArguments {} |
| 9 | +interface Number { toExponential: any; } |
| 10 | +interface Object {} |
| 11 | +interface RegExp {} |
| 12 | +interface String { charAt: any; } |
| 13 | +interface Array<T> { length: number; [n: number]: T; } |
| 14 | +interface ReadonlyArray<T> {} |
| 15 | +declare const console: { log(msg: any): void; }; |
| 16 | + |
| 17 | +//// [/lib/lib.es2022.full.d.ts] |
| 18 | +/// <reference no-default-lib="true"/> |
| 19 | +interface Boolean {} |
| 20 | +interface Function {} |
| 21 | +interface CallableFunction {} |
| 22 | +interface NewableFunction {} |
| 23 | +interface IArguments {} |
| 24 | +interface Number { toExponential: any; } |
| 25 | +interface Object {} |
| 26 | +interface RegExp {} |
| 27 | +interface String { charAt: any; } |
| 28 | +interface Array<T> { length: number; [n: number]: T; } |
| 29 | + |
| 30 | +//// [/src/projects/a/src/index.ts] |
| 31 | + |
| 32 | + |
| 33 | +//// [/src/projects/a/tsconfig.json] |
| 34 | +{"compilerOptions":{"strict":true}} |
| 35 | + |
| 36 | +//// [/src/projects/b/package.json] |
| 37 | +{"name":"b","type":"module"} |
| 38 | + |
| 39 | +//// [/src/projects/b/src/index.ts] |
| 40 | +import pg from "pg"; |
| 41 | +pg.foo(); |
| 42 | + |
| 43 | + |
| 44 | +//// [/src/projects/b/tsconfig.json] |
| 45 | +{"compilerOptions":{"strict":true,"module":"node16"}} |
| 46 | + |
| 47 | +//// [/src/projects/node_modules/@types/pg/index.d.ts] |
| 48 | +export function foo(): void; |
| 49 | + |
| 50 | +//// [/src/projects/node_modules/@types/pg/package.json] |
| 51 | +{"name":"@types/pg","types":"index.d.ts"} |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +Output:: |
| 56 | +/lib/tsc -b /src/projects/a /src/projects/b --verbose --traceResolution --explainFiles |
| 57 | +[[90m12:00:22 AM[0m] Projects in this build: |
| 58 | + * src/projects/a/tsconfig.json |
| 59 | + * src/projects/b/tsconfig.json |
| 60 | + |
| 61 | +[[90m12:00:23 AM[0m] Project 'src/projects/a/tsconfig.json' is out of date because output file 'src/projects/a/src/index.js' does not exist |
| 62 | + |
| 63 | +[[90m12:00:24 AM[0m] Building project '/src/projects/a/tsconfig.json'... |
| 64 | + |
| 65 | +======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/node_modules/@types'. ======== |
| 66 | +Resolving with primary search path '/src/projects/node_modules/@types'. |
| 67 | +Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'. |
| 68 | +'package.json' does not have a 'typesVersions' field. |
| 69 | +'package.json' does not have a 'typings' field. |
| 70 | +'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'. |
| 71 | +File '/src/projects/node_modules/@types/pg/index.d.ts' exist - use it as a name resolution result. |
| 72 | +Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'. |
| 73 | +======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ======== |
| 74 | +lib/lib.d.ts |
| 75 | + Default library for target 'es3' |
| 76 | +src/projects/a/src/index.ts |
| 77 | + Matched by default include pattern '**/*' |
| 78 | +src/projects/node_modules/@types/pg/index.d.ts |
| 79 | + Entry point for implicit type library 'pg' |
| 80 | +[[90m12:00:26 AM[0m] Project 'src/projects/b/tsconfig.json' is out of date because output file 'src/projects/b/src/index.js' does not exist |
| 81 | +
|
| 82 | +[[90m12:00:27 AM[0m] Building project '/src/projects/b/tsconfig.json'... |
| 83 | +
|
| 84 | +File '/src/projects/b/src/package.json' does not exist. |
| 85 | +Found 'package.json' at '/src/projects/b/package.json'. |
| 86 | +'package.json' does not have a 'typesVersions' field. |
| 87 | +======== Resolving module 'pg' from '/src/projects/b/src/index.ts'. ======== |
| 88 | +Module resolution kind is not specified, using 'Node16'. |
| 89 | +Resolving in ESM mode with conditions 'node', 'import', 'types'. |
| 90 | +File '/src/projects/b/src/package.json' does not exist according to earlier cached lookups. |
| 91 | +File '/src/projects/b/package.json' exists according to earlier cached lookups. |
| 92 | +Loading module 'pg' from 'node_modules' folder, target file type 'TypeScript'. |
| 93 | +Directory '/src/projects/b/src/node_modules' does not exist, skipping all lookups in it. |
| 94 | +Directory '/src/projects/b/node_modules' does not exist, skipping all lookups in it. |
| 95 | +File '/src/projects/node_modules/@types/pg/package.json' exists according to earlier cached lookups. |
| 96 | +'package.json' does not have a 'typings' field. |
| 97 | +'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'. |
| 98 | +File '/src/projects/node_modules/@types/pg/index.d.ts' exist - use it as a name resolution result. |
| 99 | +Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'. |
| 100 | +======== Module name 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts'. ======== |
| 101 | +File '/src/projects/node_modules/@types/pg/package.json' exists according to earlier cached lookups. |
| 102 | +======== Resolving type reference directive 'pg', containing file '/src/projects/b/__inferred type names__.ts', root directory '/src/projects/node_modules/@types'. ======== |
| 103 | +Resolving with primary search path '/src/projects/node_modules/@types'. |
| 104 | +File '/src/projects/node_modules/@types/pg/package.json' exists according to earlier cached lookups. |
| 105 | +'package.json' does not have a 'typings' field. |
| 106 | +'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'. |
| 107 | +File '/src/projects/node_modules/@types/pg/index.d.ts' exist - use it as a name resolution result. |
| 108 | +Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'. |
| 109 | +======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ======== |
| 110 | +File '/lib/package.json' does not exist. |
| 111 | +File '/package.json' does not exist. |
| 112 | +lib/lib.es2022.full.d.ts |
| 113 | + Default library for target 'es2022' |
| 114 | +src/projects/node_modules/@types/pg/index.d.ts |
| 115 | + Imported via "pg" from file 'src/projects/b/src/index.ts' |
| 116 | + Entry point for implicit type library 'pg' |
| 117 | + File is CommonJS module because 'src/projects/node_modules/@types/pg/package.json' does not have field "type" |
| 118 | +src/projects/b/src/index.ts |
| 119 | + Matched by default include pattern '**/*' |
| 120 | + File is ECMAScript module because 'src/projects/b/package.json' has field "type" with value "module" |
| 121 | +exitCode:: ExitStatus.Success |
| 122 | + |
| 123 | + |
| 124 | +//// [/src/projects/a/src/index.js] |
| 125 | +"use strict"; |
| 126 | + |
| 127 | + |
| 128 | +//// [/src/projects/b/src/index.js] |
| 129 | +import pg from "pg"; |
| 130 | +pg.foo(); |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | +Change:: no-change-run |
| 136 | +Input:: |
| 137 | + |
| 138 | + |
| 139 | +Output:: |
| 140 | +/lib/tsc -b /src/projects/a /src/projects/b --verbose --traceResolution --explainFiles |
| 141 | +[[90m12:00:29 AM[0m] Projects in this build: |
| 142 | + * src/projects/a/tsconfig.json |
| 143 | + * src/projects/b/tsconfig.json |
| 144 | + |
| 145 | +[[90m12:00:30 AM[0m] Project 'src/projects/a/tsconfig.json' is up to date because newest input 'src/projects/a/src/index.ts' is older than output 'src/projects/a/src/index.js' |
| 146 | + |
| 147 | +[[90m12:00:31 AM[0m] Project 'src/projects/b/tsconfig.json' is up to date because newest input 'src/projects/b/src/index.ts' is older than output 'src/projects/b/src/index.js' |
| 148 | + |
| 149 | +exitCode:: ExitStatus.Success |
| 150 | + |
| 151 | + |
0 commit comments