mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
195 lines
7.2 KiB
TypeScript
195 lines
7.2 KiB
TypeScript
currentDirectory::/home/src/projects/myproject
|
|
useCaseSensitiveFileNames::true
|
|
Input::
|
|
//// [/home/src/projects/configs/first/tsconfig.json] *new*
|
|
{
|
|
"extends": "../second/tsconfig.json",
|
|
"include": ["${configDir}/src"],
|
|
"compilerOptions": {
|
|
"typeRoots": ["root1", "${configDir}/root2", "root3"],
|
|
"types": [],
|
|
},
|
|
}
|
|
//// [/home/src/projects/configs/second/tsconfig.json] *new*
|
|
{
|
|
"files": ["${configDir}/main.ts"],
|
|
"compilerOptions": {
|
|
"declarationDir": "${configDir}/decls",
|
|
"paths": {
|
|
"@myscope/*": ["${configDir}/types/*"],
|
|
},
|
|
},
|
|
"watchOptions": {
|
|
"excludeFiles": ["${configDir}/main.ts"],
|
|
},
|
|
}
|
|
//// [/home/src/projects/myproject/main.ts] *new*
|
|
// some comment
|
|
export const y = 10;
|
|
import { x } from "@myscope/sometype";
|
|
//// [/home/src/projects/myproject/tsconfig.json] *new*
|
|
{
|
|
"extends": "../configs/first/tsconfig.json",
|
|
"compilerOptions": {
|
|
"declaration": true,
|
|
"outDir": "outDir",
|
|
"traceResolution": true,
|
|
},
|
|
}
|
|
//// [/home/src/projects/myproject/types/sometype.ts] *new*
|
|
export const x = 10;
|
|
|
|
tsgo --b -w --explainFiles --v
|
|
ExitStatus:: Success
|
|
Output::
|
|
[2J[3J[H[[90mHH:MM:SS AM[0m] Starting compilation in watch mode...
|
|
|
|
[[90mHH:MM:SS AM[0m] Projects in this build:
|
|
* tsconfig.json
|
|
|
|
[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because output file 'outDir/tsconfig.tsbuildinfo' does not exist
|
|
|
|
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
|
|
|
|
======== Resolving module '@myscope/sometype' from '/home/src/projects/myproject/main.ts'. ========
|
|
Module resolution kind is not specified, using 'Bundler'.
|
|
Resolving in CJS mode with conditions 'import', 'types'.
|
|
'paths' option is specified, looking for a pattern to match module name '@myscope/sometype'.
|
|
Module name '@myscope/sometype', matched pattern '@myscope/*'.
|
|
Trying substitution '/home/src/projects/myproject/types/*', candidate module location: '/home/src/projects/myproject/types/sometype'.
|
|
Loading module as file / folder, candidate module location '/home/src/projects/myproject/types/sometype', target file types: TypeScript, JavaScript, Declaration, JSON.
|
|
File '/home/src/projects/myproject/types/sometype.ts' exists - use it as a name resolution result.
|
|
======== Module name '@myscope/sometype' was successfully resolved to '/home/src/projects/myproject/types/sometype.ts'. ========
|
|
../../tslibs/TS/Lib/lib.es2025.full.d.ts
|
|
Default library for target 'ES2025'
|
|
types/sometype.ts
|
|
Imported via "@myscope/sometype" from file 'main.ts'
|
|
main.ts
|
|
Part of 'files' list in tsconfig.json
|
|
[[90mHH:MM:SS AM[0m] Found 0 errors. Watching for file changes.
|
|
|
|
//// [/home/src/projects/myproject/decls/main.d.ts] *new*
|
|
export declare const y = 10;
|
|
|
|
//// [/home/src/projects/myproject/decls/types/sometype.d.ts] *new*
|
|
export declare const x = 10;
|
|
|
|
//// [/home/src/projects/myproject/outDir/main.js] *new*
|
|
// some comment
|
|
export const y = 10;
|
|
|
|
//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo] *new*
|
|
{"version":"FakeTSVersion","root":["../main.ts"]}
|
|
//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
|
|
{
|
|
"version": "FakeTSVersion",
|
|
"root": [
|
|
{
|
|
"files": [
|
|
"../main.ts"
|
|
],
|
|
"original": "../main.ts"
|
|
}
|
|
],
|
|
"size": 49
|
|
}
|
|
//// [/home/src/projects/myproject/outDir/types/sometype.js] *new*
|
|
export const x = 10;
|
|
|
|
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
|
|
/// <reference no-default-lib="true"/>
|
|
interface Boolean {}
|
|
interface Function {}
|
|
interface CallableFunction {}
|
|
interface NewableFunction {}
|
|
interface IArguments {}
|
|
interface Number { toExponential: any; }
|
|
interface Object {}
|
|
interface RegExp {}
|
|
interface String { charAt: any; }
|
|
interface Array<T> { length: number; [n: number]: T; }
|
|
interface ReadonlyArray<T> {}
|
|
interface SymbolConstructor {
|
|
(desc?: string | number): symbol;
|
|
for(name: string): symbol;
|
|
readonly toStringTag: symbol;
|
|
}
|
|
declare var Symbol: SymbolConstructor;
|
|
interface Symbol {
|
|
readonly [Symbol.toStringTag]: string;
|
|
}
|
|
declare const console: { log(msg: any): void; };
|
|
|
|
Watch Registrations::
|
|
Directory watches::
|
|
/home/src/projects/configs/first
|
|
/home/src/projects/configs/second
|
|
/home/src/projects/myproject
|
|
/home/src/projects/myproject/types
|
|
tsconfig.json::
|
|
SemanticDiagnostics::
|
|
*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
|
|
*refresh* /home/src/projects/myproject/types/sometype.ts
|
|
*refresh* /home/src/projects/myproject/main.ts
|
|
Signatures::
|
|
|
|
|
|
Edit [0]:: edit extended config file
|
|
//// [/home/src/projects/configs/first/tsconfig.json] *modified*
|
|
{
|
|
"extends": "../second/tsconfig.json",
|
|
"include": ["${configDir}/src"],
|
|
"compilerOptions": {
|
|
"typeRoots": ["${configDir}/root2"],
|
|
"types": [],
|
|
},
|
|
}
|
|
|
|
|
|
Output::
|
|
[2J[3J[H[[90mHH:MM:SS AM[0m] File change detected. Starting incremental compilation...
|
|
|
|
[[90mHH:MM:SS AM[0m] Projects in this build:
|
|
* tsconfig.json
|
|
|
|
[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because output 'outDir/tsconfig.tsbuildinfo' is older than input '../configs/first/tsconfig.json'
|
|
|
|
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
|
|
|
|
======== Resolving module '@myscope/sometype' from '/home/src/projects/myproject/main.ts'. ========
|
|
Module resolution kind is not specified, using 'Bundler'.
|
|
Resolving in CJS mode with conditions 'import', 'types'.
|
|
'paths' option is specified, looking for a pattern to match module name '@myscope/sometype'.
|
|
Module name '@myscope/sometype', matched pattern '@myscope/*'.
|
|
Trying substitution '/home/src/projects/myproject/types/*', candidate module location: '/home/src/projects/myproject/types/sometype'.
|
|
Loading module as file / folder, candidate module location '/home/src/projects/myproject/types/sometype', target file types: TypeScript, JavaScript, Declaration, JSON.
|
|
File '/home/src/projects/myproject/types/sometype.ts' exists - use it as a name resolution result.
|
|
======== Module name '@myscope/sometype' was successfully resolved to '/home/src/projects/myproject/types/sometype.ts'. ========
|
|
../../tslibs/TS/Lib/lib.es2025.full.d.ts
|
|
Default library for target 'ES2025'
|
|
types/sometype.ts
|
|
Imported via "@myscope/sometype" from file 'main.ts'
|
|
main.ts
|
|
Part of 'files' list in tsconfig.json
|
|
[[90mHH:MM:SS AM[0m] Found 0 errors. Watching for file changes.
|
|
|
|
//// [/home/src/projects/myproject/decls/main.d.ts] *rewrite with same content*
|
|
//// [/home/src/projects/myproject/decls/types/sometype.d.ts] *rewrite with same content*
|
|
//// [/home/src/projects/myproject/outDir/main.js] *rewrite with same content*
|
|
//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo] *rewrite with same content*
|
|
//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content*
|
|
//// [/home/src/projects/myproject/outDir/types/sometype.js] *rewrite with same content*
|
|
|
|
Watch Registrations::
|
|
Directory watches::
|
|
/home/src/projects/configs/first
|
|
/home/src/projects/configs/second
|
|
/home/src/projects/myproject
|
|
/home/src/projects/myproject/types
|
|
tsconfig.json::
|
|
SemanticDiagnostics::
|
|
*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
|
|
*refresh* /home/src/projects/myproject/types/sometype.ts
|
|
*refresh* /home/src/projects/myproject/main.ts
|
|
Signatures::
|