mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
290 lines
17 KiB
TypeScript
290 lines
17 KiB
TypeScript
currentDirectory::/user/username/projects/sample1
|
|
useCaseSensitiveFileNames::true
|
|
Input::
|
|
//// [/user/username/projects/sample1/core/anotherModule.ts] *new*
|
|
export const World = "hello";
|
|
//// [/user/username/projects/sample1/core/index.ts] *new*
|
|
export const someString: string = "HELLO WORLD";
|
|
export function leftPad(s: string, n: number) { return s + n; }
|
|
export function multiply(a: number, b: number) { return a * b; }
|
|
//// [/user/username/projects/sample1/core/some_decl.d.ts] *new*
|
|
declare const dts: any;
|
|
//// [/user/username/projects/sample1/core/tsconfig.json] *new*
|
|
{
|
|
"compilerOptions": {
|
|
"incremental": true,
|
|
"skipDefaultLibCheck": true,
|
|
},
|
|
}
|
|
//// [/user/username/projects/sample1/logic/index.ts] *new*
|
|
import * as c from '../core/index';
|
|
export function getSecondsInDay() {
|
|
return c.multiply(10, 15);
|
|
}
|
|
import * as mod from '../core/anotherModule';
|
|
export const m = mod;
|
|
//// [/user/username/projects/sample1/logic/tsconfig.json] *new*
|
|
{
|
|
"compilerOptions": {
|
|
"composite": true,
|
|
"declaration": true,
|
|
"sourceMap": true,
|
|
"skipDefaultLibCheck": true,
|
|
},
|
|
"references": [
|
|
{ "path": "../core" },
|
|
],
|
|
}
|
|
//// [/user/username/projects/sample1/tests/index.ts] *new*
|
|
import * as c from '../core/index';
|
|
import * as logic from '../logic/index';
|
|
|
|
c.leftPad("", 10);
|
|
logic.getSecondsInDay();
|
|
|
|
import * as mod from '../core/anotherModule';
|
|
export const m = mod;
|
|
//// [/user/username/projects/sample1/tests/tsconfig.json] *new*
|
|
{
|
|
"references": [
|
|
{ "path": "../core" },
|
|
{ "path": "../logic" },
|
|
],
|
|
"files": ["index.ts"],
|
|
"compilerOptions": {
|
|
"composite": true,
|
|
"declaration": true,
|
|
"skipDefaultLibCheck": true,
|
|
},
|
|
}
|
|
|
|
tsgo --b core --verbose
|
|
ExitStatus:: Success
|
|
Output::
|
|
[[90mHH:MM:SS AM[0m] Projects in this build:
|
|
* core/tsconfig.json
|
|
|
|
[[90mHH:MM:SS AM[0m] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist
|
|
|
|
[[90mHH:MM:SS AM[0m] Building project 'core/tsconfig.json'...
|
|
|
|
//// [/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; };
|
|
//// [/user/username/projects/sample1/core/anotherModule.js] *new*
|
|
export const World = "hello";
|
|
|
|
//// [/user/username/projects/sample1/core/index.js] *new*
|
|
export const someString = "HELLO WORLD";
|
|
export function leftPad(s, n) { return s + n; }
|
|
export function multiply(a, b) { return a * b; }
|
|
|
|
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new*
|
|
{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"skipDefaultLibCheck":true}}
|
|
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
|
|
{
|
|
"version": "FakeTSVersion",
|
|
"root": [
|
|
{
|
|
"files": [
|
|
"./anotherModule.ts",
|
|
"./index.ts",
|
|
"./some_decl.d.ts"
|
|
],
|
|
"original": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
],
|
|
"fileNames": [
|
|
"lib.es2025.full.d.ts",
|
|
"./anotherModule.ts",
|
|
"./index.ts",
|
|
"./some_decl.d.ts"
|
|
],
|
|
"fileInfos": [
|
|
{
|
|
"fileName": "lib.es2025.full.d.ts",
|
|
"version": "8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
|
|
"signature": "8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
|
|
"affectsGlobalScope": true,
|
|
"impliedNodeFormat": "CommonJS",
|
|
"original": {
|
|
"version": "8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
|
|
"affectsGlobalScope": true,
|
|
"impliedNodeFormat": 1
|
|
}
|
|
},
|
|
{
|
|
"fileName": "./anotherModule.ts",
|
|
"version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";",
|
|
"signature": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";",
|
|
"impliedNodeFormat": "CommonJS"
|
|
},
|
|
{
|
|
"fileName": "./index.ts",
|
|
"version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",
|
|
"signature": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",
|
|
"impliedNodeFormat": "CommonJS"
|
|
},
|
|
{
|
|
"fileName": "./some_decl.d.ts",
|
|
"version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
|
|
"signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
|
|
"affectsGlobalScope": true,
|
|
"impliedNodeFormat": "CommonJS",
|
|
"original": {
|
|
"version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
|
|
"affectsGlobalScope": true,
|
|
"impliedNodeFormat": 1
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"skipDefaultLibCheck": true
|
|
},
|
|
"size": 1358
|
|
}
|
|
|
|
core/tsconfig.json::
|
|
SemanticDiagnostics::
|
|
*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
|
|
*refresh* /user/username/projects/sample1/core/anotherModule.ts
|
|
*refresh* /user/username/projects/sample1/core/index.ts
|
|
*refresh* /user/username/projects/sample1/core/some_decl.d.ts
|
|
Signatures::
|
|
|
|
|
|
Edit [0]:: incremental-declaration-changes
|
|
//// [/user/username/projects/sample1/core/tsconfig.json] *modified*
|
|
{
|
|
"compilerOptions": {
|
|
"incremental": true, "declaration": true,
|
|
"skipDefaultLibCheck": true,
|
|
},
|
|
}
|
|
|
|
tsgo --b core --verbose
|
|
ExitStatus:: Success
|
|
Output::
|
|
[[90mHH:MM:SS AM[0m] Projects in this build:
|
|
* core/tsconfig.json
|
|
|
|
[[90mHH:MM:SS AM[0m] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates there is change in compilerOptions
|
|
|
|
[[90mHH:MM:SS AM[0m] Building project 'core/tsconfig.json'...
|
|
|
|
//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new*
|
|
export declare const World = "hello";
|
|
|
|
//// [/user/username/projects/sample1/core/index.d.ts] *new*
|
|
export declare const someString: string;
|
|
export declare function leftPad(s: string, n: number): string;
|
|
export declare function multiply(a: number, b: number): number;
|
|
|
|
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified*
|
|
{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":true,"skipDefaultLibCheck":true}}
|
|
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
|
|
{
|
|
"version": "FakeTSVersion",
|
|
"root": [
|
|
{
|
|
"files": [
|
|
"./anotherModule.ts",
|
|
"./index.ts",
|
|
"./some_decl.d.ts"
|
|
],
|
|
"original": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
],
|
|
"fileNames": [
|
|
"lib.es2025.full.d.ts",
|
|
"./anotherModule.ts",
|
|
"./index.ts",
|
|
"./some_decl.d.ts"
|
|
],
|
|
"fileInfos": [
|
|
{
|
|
"fileName": "lib.es2025.full.d.ts",
|
|
"version": "8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
|
|
"signature": "8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
|
|
"affectsGlobalScope": true,
|
|
"impliedNodeFormat": "CommonJS",
|
|
"original": {
|
|
"version": "8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
|
|
"affectsGlobalScope": true,
|
|
"impliedNodeFormat": 1
|
|
}
|
|
},
|
|
{
|
|
"fileName": "./anotherModule.ts",
|
|
"version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";",
|
|
"signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",
|
|
"impliedNodeFormat": "CommonJS",
|
|
"original": {
|
|
"version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";",
|
|
"signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",
|
|
"impliedNodeFormat": 1
|
|
}
|
|
},
|
|
{
|
|
"fileName": "./index.ts",
|
|
"version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",
|
|
"signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n",
|
|
"impliedNodeFormat": "CommonJS",
|
|
"original": {
|
|
"version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",
|
|
"signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n",
|
|
"impliedNodeFormat": 1
|
|
}
|
|
},
|
|
{
|
|
"fileName": "./some_decl.d.ts",
|
|
"version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
|
|
"signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
|
|
"affectsGlobalScope": true,
|
|
"impliedNodeFormat": "CommonJS",
|
|
"original": {
|
|
"version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
|
|
"affectsGlobalScope": true,
|
|
"impliedNodeFormat": 1
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"declaration": true,
|
|
"skipDefaultLibCheck": true
|
|
},
|
|
"size": 1753
|
|
}
|
|
|
|
core/tsconfig.json::
|
|
SemanticDiagnostics::
|
|
Signatures::
|
|
(stored at emit) /user/username/projects/sample1/core/anotherModule.ts
|
|
(stored at emit) /user/username/projects/sample1/core/index.ts
|