Replaces the default module index resolver with '/index' instead of '' when handling internal routing for dts bundles (#39277)

* Adds support for declaring the bundled name of a dts module export

Co-authored-by: Wesley Wigham <wwigham@gmail.com>

* Adds baselines

* Update the tests

* Try to reduce the scope of the bundledPackageName error

* Use the flag in more baselines

* Get it green

* More tests

* Handle more feedback

* More test cleanup

* Set the moduleResolution for the tsconfigs

Co-authored-by: Wesley Wigham <wwigham@gmail.com>
This commit is contained in:
Orta Therox 2020-09-11 08:12:07 -04:00 committed by GitHub
parent bbf2133fbe
commit cdafb7157b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
142 changed files with 1175 additions and 169 deletions

View File

@ -4299,6 +4299,7 @@ namespace ts {
getProjectReferenceRedirect: fileName => host.getProjectReferenceRedirect(fileName),
isSourceOfProjectReferenceRedirect: fileName => host.isSourceOfProjectReferenceRedirect(fileName),
fileExists: fileName => host.fileExists(fileName),
getCompilerOptions: () => host.getCompilerOptions()
} : undefined },
encounteredError: false,
visitedTypes: undefined,
@ -5933,7 +5934,8 @@ namespace ts {
const resolverHost = {
getCanonicalFileName,
getCurrentDirectory: () => context.tracker.moduleResolverHost!.getCurrentDirectory(),
getCommonSourceDirectory: () => context.tracker.moduleResolverHost!.getCommonSourceDirectory()
getCommonSourceDirectory: () => context.tracker.moduleResolverHost!.getCommonSourceDirectory(),
getCompilerOptions: () => context.tracker.moduleResolverHost!.getCompilerOptions()
};
const newName = getResolvedExternalModuleName(resolverHost, targetFile);
return factory.createStringLiteral(newName);

View File

@ -1002,6 +1002,14 @@ namespace ts {
category: Diagnostics.Advanced_Options,
description: Diagnostics.Emit_class_fields_with_Define_instead_of_Set,
},
{
name: "bundledPackageName",
type: "string",
affectsEmit: true,
category: Diagnostics.Advanced_Options,
description: Diagnostics.Provides_a_root_package_name_when_using_outFile_with_declarations,
},
{
name: "keyofStringsOnly",
type: "boolean",

View File

@ -1184,7 +1184,14 @@
"category": "Error",
"code": 1389
},
"Provides a root package name when using outFile with declarations.": {
"category": "Message",
"code": 1390
},
"The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit.": {
"category": "Error",
"code": 1391
},
"The types of '{0}' are incompatible between these types.": {
"category": "Error",
"code": 2200

View File

@ -157,7 +157,7 @@ namespace ts.moduleSpecifiers {
}
function getLocalModuleSpecifier(moduleFileName: string, { getCanonicalFileName, sourceDirectory }: Info, compilerOptions: CompilerOptions, { ending, relativePreference }: Preferences): string {
const { baseUrl, paths, rootDirs } = compilerOptions;
const { baseUrl, paths, rootDirs, bundledPackageName } = compilerOptions;
const relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) ||
removeExtensionAndIndexPostFix(ensurePathIsNonModuleName(getRelativePathFromDirectory(sourceDirectory, moduleFileName, getCanonicalFileName)), ending, compilerOptions);
@ -170,8 +170,9 @@ namespace ts.moduleSpecifiers {
return relativePath;
}
const importRelativeToBaseUrl = removeExtensionAndIndexPostFix(relativeToBaseUrl, ending, compilerOptions);
const fromPaths = paths && tryGetModuleNameFromPaths(removeFileExtension(relativeToBaseUrl), importRelativeToBaseUrl, paths);
const bundledPkgReference = bundledPackageName ? combinePaths(bundledPackageName, relativeToBaseUrl) : relativeToBaseUrl;
const importRelativeToBaseUrl = removeExtensionAndIndexPostFix(bundledPkgReference, ending, compilerOptions);
const fromPaths = paths && tryGetModuleNameFromPaths(removeFileExtension(bundledPkgReference), importRelativeToBaseUrl, paths);
const nonRelative = fromPaths === undefined ? importRelativeToBaseUrl : fromPaths;
if (relativePreference === RelativePreference.NonRelative) {
@ -278,7 +279,7 @@ namespace ts.moduleSpecifiers {
const isInNodeModules = pathContainsNodeModules(path);
allFileNames.set(path, { path: getCanonicalFileName(path), isRedirect, isInNodeModules });
importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
// dont return value, so we collect everything
// don't return value, so we collect everything
}
);

View File

@ -3139,6 +3139,11 @@ namespace ts {
}
}
// Without a package name, for multiple files being bundled into a .d.ts file you basically get a file which doesn't wrk
if (outputFile && getEmitDeclarations(options) && getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeJs && !options.bundledPackageName) {
createDiagnosticForOptionName(Diagnostics.The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_declaration_emit, options.out ? "out" : "outFile");
}
if (options.resolveJsonModule) {
if (getEmitModuleResolutionKind(options) !== ModuleResolutionKind.NodeJs) {
createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");

View File

@ -5723,6 +5723,7 @@ namespace ts {
/** An error if set - this should only go through the -b pipeline and not actually be observed */
/*@internal*/
build?: boolean;
bundledPackageName?: string;
charset?: string;
checkJs?: boolean;
/* @internal */ configFilePath?: string;
@ -7843,6 +7844,7 @@ namespace ts {
readonly redirectTargetsMap: RedirectTargetsMap;
getProjectReferenceRedirect(fileName: string): string | undefined;
isSourceOfProjectReferenceRedirect(fileName: string): boolean;
getCompilerOptions(): CompilerOptions;
}
// Note: this used to be deprecated in our public API, but is still used internally

View File

@ -4021,6 +4021,7 @@ namespace ts {
getCanonicalFileName(p: string): string;
getCommonSourceDirectory(): string;
getCurrentDirectory(): string;
getCompilerOptions(): CompilerOptions;
}
export function getResolvedExternalModuleName(host: ResolveModuleNameResolutionHost, file: SourceFile, referenceFile?: SourceFile): string {
@ -4044,7 +4045,16 @@ namespace ts {
const filePath = getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
const relativePath = getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
const extensionless = removeFileExtension(relativePath);
return referencePath ? ensurePathIsNonModuleName(extensionless) : extensionless;
if (referencePath) {
return ensurePathIsNonModuleName(extensionless);
}
const options = host.getCompilerOptions();
const rootPkgName = options.bundledPackageName || "";
const newPath = combinePaths(rootPkgName, extensionless);
if (rootPkgName && getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeJs && endsWith(newPath, "/index")) {
return newPath.slice(0, newPath.length - "/index".length);
}
return newPath;
}
export function getOwnEmitOutputFilePath(fileName: string, host: EmitHost, extension: string) {

View File

@ -2,6 +2,7 @@
"extends": "../tsconfig-base",
"compilerOptions": {
"outFile": "../../built/local/harness.js",
"moduleResolution": "node",
"types": [
"node", "mocha", "chai"
],

View File

@ -1773,6 +1773,7 @@ namespace ts {
redirectTargetsMap: program.redirectTargetsMap,
getProjectReferenceRedirect: fileName => program.getProjectReferenceRedirect(fileName),
isSourceOfProjectReferenceRedirect: fileName => program.isSourceOfProjectReferenceRedirect(fileName),
getCompilerOptions: () => program.getCompilerOptions()
};
}

View File

@ -2,6 +2,7 @@
"extends": "../tsconfig-noncomposite-base",
"compilerOptions": {
"outFile": "../../built/local/run.js",
"moduleResolution": "node",
"composite": false,
"declaration": false,
"declarationMap": false,

View File

@ -104,7 +104,8 @@ namespace ts {
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "common.js"
"outFile": "common.js",
"bundledPackageName": "common"
},
"include": ["nominal.js"]
}`,
@ -119,7 +120,8 @@ namespace ts {
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "sub-project.js"
"outFile": "sub-project.js",
"bundledPackageName": "sub"
},
"references": [
{ "path": "../common", "prepend": true }
@ -143,7 +145,8 @@ namespace ts {
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "sub-project-2.js"
"outFile": "sub-project-2.js",
"bundledPackageName": "sub-2"
},
"references": [
{ "path": "../sub-project", "prepend": true }

View File

@ -658,7 +658,8 @@ ${internal} enum internalEnum { a, b, c }`);
declarationMap: true,
skipDefaultLibCheck: true,
sourceMap: true,
outFile: "./bin/first-output.js"
outFile: "./bin/first-output.js",
bundledPackageName: "first"
},
files: [sources[Project.first][Source.ts][Part.one]]
}));
@ -669,7 +670,8 @@ ${internal} enum internalEnum { a, b, c }`);
declarationMap: false,
stripInternal: true,
sourceMap: true,
outFile: "./thirdjs/output/third-output.js"
outFile: "./thirdjs/output/third-output.js",
bundledPackageName: "third"
},
references: [{ path: "../first", prepend: true }],
files: [sources[Project.third][Source.ts][Part.one]]

View File

@ -326,13 +326,13 @@ export class someClass2 { }`),
const coreTsConfig: File = {
path: core[0].path,
content: JSON.stringify({
compilerOptions: { composite: true, declaration: true, outFile: "index.js" }
compilerOptions: { composite: true, declaration: true, outFile: "index.js", bundledPackageName: "core" }
})
};
const logicTsConfig: File = {
path: logic[0].path,
content: JSON.stringify({
compilerOptions: { composite: true, declaration: true, outFile: "index.js" },
compilerOptions: { composite: true, declaration: true, outFile: "index.js", bundledPackageName: "logic" },
references: [{ path: "../core", prepend: true }]
})
};

View File

@ -193,7 +193,7 @@ let x: string = 10;`
};
const dependencyConfig: File = {
path: `${dependecyLocation}/tsconfig.json`,
content: JSON.stringify({ compilerOptions: { composite: true, outFile: "../dependency.js" } })
content: JSON.stringify({ compilerOptions: { composite: true, outFile: "../dependency.js", bundledPackageName: "dep" } })
};
const usageTs: File = {
path: `${usageLocation}/usage.ts`,
@ -205,7 +205,7 @@ fnErr();
const usageConfig: File = {
path: `${usageLocation}/tsconfig.json`,
content: JSON.stringify({
compilerOptions: { composite: true, outFile: "../usage.js" },
compilerOptions: { composite: true, outFile: "../usage.js", bundledPackageName: "usage" },
references: [{ path: "../dependency" }]
})
};

View File

@ -3,6 +3,7 @@
"pretty": true,
"lib": ["es2015.iterable", "es2015.generator", "es5"],
"target": "es5",
"moduleResolution": "classic",
"rootDir": ".",
"declaration": true,

View File

@ -2795,6 +2795,7 @@ declare namespace ts {
allowUnusedLabels?: boolean;
alwaysStrict?: boolean;
baseUrl?: string;
bundledPackageName?: string;
charset?: string;
checkJs?: boolean;
declaration?: boolean;

View File

@ -2795,6 +2795,7 @@ declare namespace ts {
allowUnusedLabels?: boolean;
alwaysStrict?: boolean;
baseUrl?: string;
bundledPackageName?: string;
charset?: string;
checkJs?: boolean;
declaration?: boolean;

View File

@ -0,0 +1,30 @@
error TS1391: The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit.
!!! error TS1391: The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit.
==== tests/cases/compiler/index.ts (0 errors) ====
export * from "./nested";
==== tests/cases/compiler/nested/base.ts (0 errors) ====
import { B } from "./shared";
export function f() {
return new B();
}
==== tests/cases/compiler/nested/derived.ts (0 errors) ====
import { f } from "./base";
export function g() {
return f();
}
==== tests/cases/compiler/nested/index.ts (0 errors) ====
export * from "./base";
export * from "./derived";
export * from "./shared";
==== tests/cases/compiler/nested/shared.ts (0 errors) ====
export class B {}

View File

@ -0,0 +1,51 @@
//// [tests/cases/compiler/bundledDtsLateExportRenaming.ts] ////
//// [index.ts]
export * from "./nested";
//// [base.ts]
import { B } from "./shared";
export function f() {
return new B();
}
//// [derived.ts]
import { f } from "./base";
export function g() {
return f();
}
//// [index.ts]
export * from "./base";
export * from "./derived";
export * from "./shared";
//// [shared.ts]
export class B {}
//// [out.d.ts]
declare module "nested/shared" {
export class B {
}
}
declare module "nested/base" {
import { B } from "nested/shared";
export function f(): B;
}
declare module "nested/derived" {
export function g(): import("nested").B;
}
declare module "nested/index" {
export * from "nested/base";
export * from "nested/derived";
export * from "nested/shared";
}
declare module "index" {
export * from "nested/index";
}

View File

@ -0,0 +1,35 @@
=== tests/cases/compiler/index.ts ===
export * from "./nested";
No type information for this code.
No type information for this code.=== tests/cases/compiler/nested/base.ts ===
import { B } from "./shared";
>B : Symbol(B, Decl(base.ts, 0, 8))
export function f() {
>f : Symbol(f, Decl(base.ts, 0, 29))
return new B();
>B : Symbol(B, Decl(base.ts, 0, 8))
}
=== tests/cases/compiler/nested/derived.ts ===
import { f } from "./base";
>f : Symbol(f, Decl(derived.ts, 0, 8))
export function g() {
>g : Symbol(g, Decl(derived.ts, 0, 27))
return f();
>f : Symbol(f, Decl(derived.ts, 0, 8))
}
=== tests/cases/compiler/nested/index.ts ===
export * from "./base";
No type information for this code.
No type information for this code.export * from "./derived";
No type information for this code.export * from "./shared";
No type information for this code.
No type information for this code.=== tests/cases/compiler/nested/shared.ts ===
export class B {}
>B : Symbol(B, Decl(shared.ts, 0, 0))

View File

@ -0,0 +1,37 @@
=== tests/cases/compiler/index.ts ===
export * from "./nested";
No type information for this code.
No type information for this code.=== tests/cases/compiler/nested/base.ts ===
import { B } from "./shared";
>B : typeof B
export function f() {
>f : () => B
return new B();
>new B() : B
>B : typeof B
}
=== tests/cases/compiler/nested/derived.ts ===
import { f } from "./base";
>f : () => import("tests/cases/compiler/index").B
export function g() {
>g : () => import("tests/cases/compiler/index").B
return f();
>f() : import("tests/cases/compiler/index").B
>f : () => import("tests/cases/compiler/index").B
}
=== tests/cases/compiler/nested/index.ts ===
export * from "./base";
No type information for this code.
No type information for this code.export * from "./derived";
No type information for this code.export * from "./shared";
No type information for this code.
No type information for this code.=== tests/cases/compiler/nested/shared.ts ===
export class B {}
>B : B

View File

@ -0,0 +1,29 @@
error TS1391: The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit.
!!! error TS1391: The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit.
==== tests/cases/conformance/declarationEmit/index.ts (0 errors) ====
export * from "./nested";
==== tests/cases/conformance/declarationEmit/nested/base.ts (0 errors) ====
import { B } from "./shared";
export function f() {
return new B();
}
==== tests/cases/conformance/declarationEmit/nested/derived.ts (0 errors) ====
import { f } from "./base";
export function g() {
return f();
}
==== tests/cases/conformance/declarationEmit/nested/index.ts (0 errors) ====
export * from "./base";
export * from "./derived";
export * from "./shared";
==== tests/cases/conformance/declarationEmit/nested/shared.ts (0 errors) ====
export class B {}

View File

@ -0,0 +1,50 @@
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSFailsWithOutFlag.ts] ////
//// [index.ts]
export * from "./nested";
//// [base.ts]
import { B } from "./shared";
export function f() {
return new B();
}
//// [derived.ts]
import { f } from "./base";
export function g() {
return f();
}
//// [index.ts]
export * from "./base";
export * from "./derived";
export * from "./shared";
//// [shared.ts]
export class B {}
//// [out.d.ts]
declare module "nested/shared" {
export class B {
}
}
declare module "nested/base" {
import { B } from "nested/shared";
export function f(): B;
}
declare module "nested/derived" {
export function g(): import("nested").B;
}
declare module "nested/index" {
export * from "nested/base";
export * from "nested/derived";
export * from "nested/shared";
}
declare module "index" {
export * from "nested/index";
}

View File

@ -0,0 +1,34 @@
=== tests/cases/conformance/declarationEmit/index.ts ===
export * from "./nested";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
import { B } from "./shared";
>B : Symbol(B, Decl(base.ts, 0, 8))
export function f() {
>f : Symbol(f, Decl(base.ts, 0, 29))
return new B();
>B : Symbol(B, Decl(base.ts, 0, 8))
}
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
import { f } from "./base";
>f : Symbol(f, Decl(derived.ts, 0, 8))
export function g() {
>g : Symbol(g, Decl(derived.ts, 0, 27))
return f();
>f : Symbol(f, Decl(derived.ts, 0, 8))
}
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
export * from "./base";
No type information for this code.export * from "./derived";
No type information for this code.export * from "./shared";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
export class B {}
>B : Symbol(B, Decl(shared.ts, 0, 0))

View File

@ -0,0 +1,36 @@
=== tests/cases/conformance/declarationEmit/index.ts ===
export * from "./nested";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
import { B } from "./shared";
>B : typeof B
export function f() {
>f : () => B
return new B();
>new B() : B
>B : typeof B
}
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
import { f } from "./base";
>f : () => import("tests/cases/conformance/declarationEmit/index").B
export function g() {
>g : () => import("tests/cases/conformance/declarationEmit/index").B
return f();
>f() : import("tests/cases/conformance/declarationEmit/index").B
>f : () => import("tests/cases/conformance/declarationEmit/index").B
}
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
export * from "./base";
No type information for this code.export * from "./derived";
No type information for this code.export * from "./shared";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
export class B {}
>B : B

View File

@ -0,0 +1,50 @@
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSPassesWithFlag.ts] ////
//// [index.ts]
export * from "./nested";
//// [base.ts]
import { B } from "./shared";
export function f() {
return new B();
}
//// [derived.ts]
import { f } from "./base";
export function g() {
return f();
}
//// [index.ts]
export * from "./base";
export * from "./derived";
export * from "./shared";
//// [shared.ts]
export class B {}
//// [out.d.ts]
declare module "my-pkg/nested/shared" {
export class B {
}
}
declare module "my-pkg/nested/base" {
import { B } from "my-pkg/nested/shared";
export function f(): B;
}
declare module "my-pkg/nested/derived" {
export function g(): import("my-pkg").B;
}
declare module "my-pkg/nested" {
export * from "my-pkg/nested/base";
export * from "my-pkg/nested/derived";
export * from "my-pkg/nested/shared";
}
declare module "my-pkg" {
export * from "my-pkg/nested";
}

View File

@ -0,0 +1,34 @@
=== tests/cases/conformance/declarationEmit/index.ts ===
export * from "./nested";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
import { B } from "./shared";
>B : Symbol(B, Decl(base.ts, 0, 8))
export function f() {
>f : Symbol(f, Decl(base.ts, 0, 29))
return new B();
>B : Symbol(B, Decl(base.ts, 0, 8))
}
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
import { f } from "./base";
>f : Symbol(f, Decl(derived.ts, 0, 8))
export function g() {
>g : Symbol(g, Decl(derived.ts, 0, 27))
return f();
>f : Symbol(f, Decl(derived.ts, 0, 8))
}
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
export * from "./base";
No type information for this code.export * from "./derived";
No type information for this code.export * from "./shared";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
export class B {}
>B : Symbol(B, Decl(shared.ts, 0, 0))

View File

@ -0,0 +1,36 @@
=== tests/cases/conformance/declarationEmit/index.ts ===
export * from "./nested";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
import { B } from "./shared";
>B : typeof B
export function f() {
>f : () => B
return new B();
>new B() : B
>B : typeof B
}
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
import { f } from "./base";
>f : () => import("tests/cases/conformance/declarationEmit/index").B
export function g() {
>g : () => import("tests/cases/conformance/declarationEmit/index").B
return f();
>f() : import("tests/cases/conformance/declarationEmit/index").B
>f : () => import("tests/cases/conformance/declarationEmit/index").B
}
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
export * from "./base";
No type information for this code.export * from "./derived";
No type information for this code.export * from "./shared";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
export class B {}
>B : B

View File

@ -0,0 +1,44 @@
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSWithExports.ts] ////
//// [index.ts]
export {}
//// [base.ts]
import { C } from "./";
export function f() {
return new C();
}
//// [derived.ts]
import { f } from "./base";
export function g() {
return f();
}
//// [index.ts]
export * from "./base";
export * from "./derived";
export class C {}
//// [out.d.ts]
declare module "my-pkg" {
export {};
}
declare module "my-pkg/nested/derived" {
export function g(): import("my-pkg/nested").C;
}
declare module "my-pkg/nested" {
export * from "my-pkg/nested/base";
export * from "my-pkg/nested/derived";
export class C {
}
}
declare module "my-pkg/nested/base" {
import { C } from "my-pkg/nested";
export function f(): C;
}

View File

@ -0,0 +1,31 @@
=== tests/cases/conformance/declarationEmit/index.ts ===
export {}
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
import { C } from "./";
>C : Symbol(C, Decl(base.ts, 0, 8))
export function f() {
>f : Symbol(f, Decl(base.ts, 0, 23))
return new C();
>C : Symbol(C, Decl(base.ts, 0, 8))
}
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
import { f } from "./base";
>f : Symbol(f, Decl(derived.ts, 0, 8))
export function g() {
>g : Symbol(g, Decl(derived.ts, 0, 27))
return f();
>f : Symbol(f, Decl(derived.ts, 0, 8))
}
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
export * from "./base";
export * from "./derived";
export class C {}
>C : Symbol(C, Decl(index.ts, 1, 26))

View File

@ -0,0 +1,33 @@
=== tests/cases/conformance/declarationEmit/index.ts ===
export {}
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
import { C } from "./";
>C : typeof C
export function f() {
>f : () => C
return new C();
>new C() : C
>C : typeof C
}
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
import { f } from "./base";
>f : () => import("tests/cases/conformance/declarationEmit/nested/index").C
export function g() {
>g : () => import("tests/cases/conformance/declarationEmit/nested/index").C
return f();
>f() : import("tests/cases/conformance/declarationEmit/nested/index").C
>f : () => import("tests/cases/conformance/declarationEmit/nested/index").C
}
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
export * from "./base";
export * from "./derived";
export class C {}
>C : C

View File

@ -0,0 +1,50 @@
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSWithScopedPackage.ts] ////
//// [index.ts]
export * from "./nested";
//// [base.ts]
import { B } from "./shared";
export function f() {
return new B();
}
//// [derived.ts]
import { f } from "./base";
export function g() {
return f();
}
//// [index.ts]
export * from "./base";
export * from "./derived";
export * from "./shared";
//// [shared.ts]
export class B {}
//// [out.d.ts]
declare module "@test/my-pkg/nested/shared" {
export class B {
}
}
declare module "@test/my-pkg/nested/base" {
import { B } from "@test/my-pkg/nested/shared";
export function f(): B;
}
declare module "@test/my-pkg/nested/derived" {
export function g(): import("@test/my-pkg").B;
}
declare module "@test/my-pkg/nested" {
export * from "@test/my-pkg/nested/base";
export * from "@test/my-pkg/nested/derived";
export * from "@test/my-pkg/nested/shared";
}
declare module "@test/my-pkg" {
export * from "@test/my-pkg/nested";
}

View File

@ -0,0 +1,34 @@
=== tests/cases/conformance/declarationEmit/index.ts ===
export * from "./nested";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
import { B } from "./shared";
>B : Symbol(B, Decl(base.ts, 0, 8))
export function f() {
>f : Symbol(f, Decl(base.ts, 0, 29))
return new B();
>B : Symbol(B, Decl(base.ts, 0, 8))
}
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
import { f } from "./base";
>f : Symbol(f, Decl(derived.ts, 0, 8))
export function g() {
>g : Symbol(g, Decl(derived.ts, 0, 27))
return f();
>f : Symbol(f, Decl(derived.ts, 0, 8))
}
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
export * from "./base";
No type information for this code.export * from "./derived";
No type information for this code.export * from "./shared";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
export class B {}
>B : Symbol(B, Decl(shared.ts, 0, 0))

View File

@ -0,0 +1,36 @@
=== tests/cases/conformance/declarationEmit/index.ts ===
export * from "./nested";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
import { B } from "./shared";
>B : typeof B
export function f() {
>f : () => B
return new B();
>new B() : B
>B : typeof B
}
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
import { f } from "./base";
>f : () => import("tests/cases/conformance/declarationEmit/index").B
export function g() {
>g : () => import("tests/cases/conformance/declarationEmit/index").B
return f();
>f() : import("tests/cases/conformance/declarationEmit/index").B
>f : () => import("tests/cases/conformance/declarationEmit/index").B
}
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
export * from "./base";
No type information for this code.export * from "./derived";
No type information for this code.export * from "./shared";
No type information for this code.
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
export class B {}
>B : B

View File

@ -10,4 +10,5 @@ error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would
==== tests/cases/compiler/a.ts (0 errors) ====
class d {
}
}

View File

@ -6,7 +6,8 @@ declare class c {
//// [a.ts]
class d {
}
}
//// [out.js]
var d = /** @class */ (function () {

View File

@ -7,3 +7,4 @@ declare class c {
class d {
>d : Symbol(d, Decl(a.ts, 0, 0))
}

View File

@ -7,3 +7,4 @@ declare class c {
class d {
>d : d
}

View File

@ -9,7 +9,8 @@ interface JQuery {
/// <reference types="jquery"/>
namespace Test {
export var x: JQuery;
}
}
//// [out.js]
/// <reference types="jquery"/>

View File

@ -13,3 +13,4 @@ namespace Test {
>x : Symbol(x, Decl(app.ts, 2, 14))
>JQuery : Symbol(JQuery, Decl(index.d.ts, 0, 0))
}

View File

@ -11,3 +11,4 @@ namespace Test {
export var x: JQuery;
>x : JQuery
}

View File

@ -20,7 +20,7 @@ export { c, Foo };
//// [bundle.js]
define("a", ["require", "exports"], function (require, exports) {
define("example/a", ["require", "exports"], function (require, exports) {
"use strict";
exports.__esModule = true;
exports.Foo = void 0;
@ -37,7 +37,7 @@ define("a", ["require", "exports"], function (require, exports) {
}());
exports.Foo = Foo;
});
define("index", ["require", "exports", "a"], function (require, exports, a_1) {
define("example/index", ["require", "exports", "example/a"], function (require, exports, a_1) {
"use strict";
exports.__esModule = true;
exports.Foo = exports.c = exports.x = void 0;
@ -50,7 +50,7 @@ define("index", ["require", "exports", "a"], function (require, exports, a_1) {
//// [bundle.d.ts]
declare module "a" {
declare module "example/a" {
export class Foo {
doThing(x: {
a: number;
@ -60,8 +60,8 @@ declare module "a" {
static make(): Foo;
}
}
declare module "index" {
import { Foo } from "a";
declare module "example/index" {
import { Foo } from "example/a";
const c: Foo;
export let x: {
b: number;

View File

@ -1,3 +1,3 @@
//// [bundle.d.ts.map]
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/index.ts"],"names":[],"mappings":";IAAA,MAAM,OAAO,GAAG;QACZ,OAAO,CAAC,GAAG;YAAC,CAAC,EAAE,MAAM,CAAA;SAAC;;;QAGtB,MAAM,CAAC,IAAI;KAGd;;;ICPD,OAAO,EAAC,GAAG,EAAC,UAAY;IAExB,MAAM,CAAC,KAAY,CAAC;IAGpB,MAAM,CAAC,IAAI,CAAC;;KAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"}
//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBtb2R1bGUgImEiIHsNCiAgICBleHBvcnQgY2xhc3MgRm9vIHsNCiAgICAgICAgZG9UaGluZyh4OiB7DQogICAgICAgICAgICBhOiBudW1iZXI7DQogICAgICAgIH0pOiB7DQogICAgICAgICAgICBiOiBudW1iZXI7DQogICAgICAgIH07DQogICAgICAgIHN0YXRpYyBtYWtlKCk6IEZvbzsNCiAgICB9DQp9DQpkZWNsYXJlIG1vZHVsZSAiaW5kZXgiIHsNCiAgICBpbXBvcnQgeyBGb28gfSBmcm9tICJhIjsNCiAgICBjb25zdCBjOiBGb287DQogICAgZXhwb3J0IGxldCB4OiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIGV4cG9ydCB7IGMsIEZvbyB9Ow0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnVuZGxlLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXN0cy9jYXNlcy9jb21waWxlci9hLnRzIiwidGVzdHMvY2FzZXMvY29tcGlsZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtJQUFBLE1BQU0sT0FBTyxHQUFHO1FBQ1osT0FBTyxDQUFDLEdBQUc7WUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO1NBQUM7OztRQUd0QixNQUFNLENBQUMsSUFBSTtLQUdkOzs7SUNQRCxPQUFPLEVBQUMsR0FBRyxFQUFDLFVBQVk7SUFFeEIsTUFBTSxDQUFDLEtBQVksQ0FBQztJQUdwQixNQUFNLENBQUMsSUFBSSxDQUFDOztLQUFxQixDQUFDO0lBQ2xDLE9BQU8sRUFBRSxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUMifQ==,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ==,aW1wb3J0IHtGb299IGZyb20gIi4vYSI7Cgpjb25zdCBjID0gbmV3IEZvbygpOwpjLmRvVGhpbmcoe2E6IDQyfSk7CgpleHBvcnQgbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7CmV4cG9ydCB7IGMsIEZvbyB9Owo=
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/index.ts"],"names":[],"mappings":";IAAA,MAAM,OAAO,GAAG;QACZ,OAAO,CAAC,GAAG;YAAC,CAAC,EAAE,MAAM,CAAA;SAAC;;;QAGtB,MAAM,CAAC,IAAI;KAGd;;;ICPD,OAAO,EAAC,GAAG,EAAC,kBAAY;IAExB,MAAM,CAAC,KAAY,CAAC;IAGpB,MAAM,CAAC,IAAI,CAAC;;KAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"}
//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBtb2R1bGUgImV4YW1wbGUvYSIgew0KICAgIGV4cG9ydCBjbGFzcyBGb28gew0KICAgICAgICBkb1RoaW5nKHg6IHsNCiAgICAgICAgICAgIGE6IG51bWJlcjsNCiAgICAgICAgfSk6IHsNCiAgICAgICAgICAgIGI6IG51bWJlcjsNCiAgICAgICAgfTsNCiAgICAgICAgc3RhdGljIG1ha2UoKTogRm9vOw0KICAgIH0NCn0NCmRlY2xhcmUgbW9kdWxlICJleGFtcGxlL2luZGV4IiB7DQogICAgaW1wb3J0IHsgRm9vIH0gZnJvbSAiZXhhbXBsZS9hIjsNCiAgICBjb25zdCBjOiBGb287DQogICAgZXhwb3J0IGxldCB4OiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIGV4cG9ydCB7IGMsIEZvbyB9Ow0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnVuZGxlLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXN0cy9jYXNlcy9jb21waWxlci9hLnRzIiwidGVzdHMvY2FzZXMvY29tcGlsZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtJQUFBLE1BQU0sT0FBTyxHQUFHO1FBQ1osT0FBTyxDQUFDLEdBQUc7WUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO1NBQUM7OztRQUd0QixNQUFNLENBQUMsSUFBSTtLQUdkOzs7SUNQRCxPQUFPLEVBQUMsR0FBRyxFQUFDLGtCQUFZO0lBRXhCLE1BQU0sQ0FBQyxLQUFZLENBQUM7SUFHcEIsTUFBTSxDQUFDLElBQUksQ0FBQzs7S0FBcUIsQ0FBQztJQUNsQyxPQUFPLEVBQUUsQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDIn0=,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ==,aW1wb3J0IHtGb299IGZyb20gIi4vYSI7Cgpjb25zdCBjID0gbmV3IEZvbygpOwpjLmRvVGhpbmcoe2E6IDQyfSk7CgpleHBvcnQgbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7CmV4cG9ydCB7IGMsIEZvbyB9Owo=

View File

@ -8,7 +8,7 @@ sources: tests/cases/compiler/a.ts,tests/cases/compiler/index.ts
emittedFile:bundle.d.ts
sourceFile:tests/cases/compiler/a.ts
-------------------------------------------------------------------
>>>declare module "a" {
>>>declare module "example/a" {
>>> export class Foo {
1 >^^^^
2 > ^^^^^^
@ -95,14 +95,14 @@ emittedFile:bundle.d.ts
sourceFile:tests/cases/compiler/index.ts
-------------------------------------------------------------------
>>>}
>>>declare module "index" {
>>> import { Foo } from "a";
>>>declare module "example/index" {
>>> import { Foo } from "example/a";
1 >^^^^
2 > ^^^^^^^
3 > ^^
4 > ^^^
5 > ^^
6 > ^^^^^^^^^^
6 > ^^^^^^^^^^^^^^^^^^
1 >
2 > import
3 > {
@ -114,7 +114,7 @@ sourceFile:tests/cases/compiler/index.ts
3 >Emitted(12, 14) Source(1, 9) + SourceIndex(1)
4 >Emitted(12, 17) Source(1, 12) + SourceIndex(1)
5 >Emitted(12, 19) Source(1, 13) + SourceIndex(1)
6 >Emitted(12, 29) Source(1, 25) + SourceIndex(1)
6 >Emitted(12, 37) Source(1, 25) + SourceIndex(1)
---
>>> const c: Foo;
1 >^^^^

View File

@ -4,7 +4,8 @@
var x = 10;
//// [b.js]
var x = "hello"; // Error is recorded here, but suppressed because the js file isn't checked
var x = "hello"; // Error is recorded here, but suppressed because the js file isn't checked
//// [out.js]
var x = 10;

View File

@ -8,4 +8,5 @@ tests/cases/compiler/a.ts(1,5): error TS2403: Subsequent variable declarations m
var x = 10; // Error reported
~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'.
!!! related TS6203 tests/cases/compiler/b.js:1:5: 'x' was also declared here.
!!! related TS6203 tests/cases/compiler/b.js:1:5: 'x' was also declared here.

View File

@ -4,7 +4,8 @@
var x = "hello";
//// [a.ts]
var x = 10; // Error reported
var x = 10; // Error reported
//// [out.js]
var x = "hello";

View File

@ -11,7 +11,8 @@ function foo() {
//// [c.js]
function bar() {
}
}
//// [out.js]
var c = /** @class */ (function () {

View File

@ -13,3 +13,4 @@ function foo() {
function bar() {
>bar : Symbol(bar, Decl(c.js, 0, 0))
}

View File

@ -13,3 +13,4 @@ function foo() {
function bar() {
>bar : () => void
}

View File

@ -11,7 +11,8 @@ function foo() {
//// [c.js]
function bar() {
}
}
//// [out.js]
var c = /** @class */ (function () {

View File

@ -13,3 +13,4 @@ function foo() {
function bar() {
>bar : Symbol(bar, Decl(c.js, 0, 0))
}

View File

@ -13,3 +13,4 @@ function foo() {
function bar() {
>bar : () => void
}

View File

@ -9,4 +9,5 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' because it would o
}
==== tests/cases/compiler/b.d.ts (0 errors) ====
declare function foo(): boolean;
declare function foo(): boolean;

View File

@ -5,7 +5,8 @@ class c {
}
//// [b.d.ts]
declare function foo(): boolean;
declare function foo(): boolean;
//// [b.js]
var c = /** @class */ (function () {

View File

@ -6,4 +6,5 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
class A { }
==== tests/cases/compiler/b.ts (0 errors) ====
class B { }
class B { }

View File

@ -4,7 +4,8 @@
class A { }
//// [b.ts]
class B { }
class B { }
//// [c.js]
var A = /** @class */ (function () {

View File

@ -1,3 +1,3 @@
//// [c.js.map]
{"version":3,"file":"c.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AAAA;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACAX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"}
//// https://sokra.github.io/source-map-visualization#base64,dmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXO0FDQVg7SUFBQTtJQUFVLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQUFYLElBQVcifQ==,Y2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0=
//// https://sokra.github.io/source-map-visualization#base64,dmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXO0FDQVg7SUFBQTtJQUFVLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQUFYLElBQVcifQ==,Y2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K

View File

@ -10,4 +10,5 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --out.
class A { }
==== tests/cases/compiler/b.ts (0 errors) ====
class B { }
class B { }

View File

@ -6,7 +6,8 @@
class A { }
//// [b.ts]
class B { }
class B { }
//// [c.js]
// --out and --outFile error

View File

@ -1,3 +1,3 @@
//// [c.js.map]
{"version":3,"file":"c.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAE5B;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACFX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"}
//// https://sokra.github.io/source-map-visualization#base64,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcg0KdmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRCQUE0QjtBQUU1QjtJQUFBO0lBQVUsQ0FBQztJQUFELFFBQUM7QUFBRCxDQUFDLEFBQVgsSUFBVztBQ0ZYO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXIn0=,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcgoKY2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0=
//// https://sokra.github.io/source-map-visualization#base64,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcg0KdmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRCQUE0QjtBQUU1QjtJQUFBO0lBQVUsQ0FBQztJQUFELFFBQUM7QUFBRCxDQUFDLEFBQVgsSUFBVztBQ0ZYO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXIn0=,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcgoKY2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K

View File

@ -9,4 +9,5 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
==== tests/cases/compiler/b.ts (0 errors) ====
import {A} from "./ref/a";
export class B extends A { }
export class B extends A { }

View File

@ -5,17 +5,18 @@ export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
export class B extends A { }
//// [all.d.ts]
declare module "ref/a" {
declare module "out/ref/a" {
export class A {
}
}
declare module "b" {
import { A } from "ref/a";
declare module "out/b" {
import { A } from "out/ref/a";
export class B extends A {
}
}

View File

@ -0,0 +1,10 @@
error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'.
!!! error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'.
==== tests/cases/compiler/a.ts (0 errors) ====
export class A { } // module
==== tests/cases/compiler/b.ts (0 errors) ====
var x = 0; // global

View File

@ -1,16 +0,0 @@
//// [tests/cases/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.ts] ////
//// [a.ts]
export class A { } // module
//// [b.ts]
var x = 0; // global
//// [out.d.ts]
declare module "a" {
export class A {
}
}
declare var x: number;

View File

@ -0,0 +1,5 @@
{
"compilerOptions": {
"bundledPackageName": "someString"
}
}

View File

@ -16,7 +16,8 @@ Copyright
---------------------------------------------------------------------------*/
///<reference path="a.ts"/>
var y = x;
var y = x;
//// [a.js]
/*--------------------------------------------------------------------------

View File

@ -1,3 +1,3 @@
//// [a.js.map]
{"version":3,"file":"a.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AAAA;;6EAE6E;AAE7E,IAAI,CAAC,GAAG;IACJ,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;CACR,CAAC;ACPF;;6EAE6E;AAE7E,2BAA2B;AAC3B,IAAI,CAAC,GAAG,CAAC,CAAC"}
//// https://sokra.github.io/source-map-visualization#base64,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KQ29weXJpZ2h0DQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLw0KdmFyIHggPSB7DQogICAgYTogMTAsDQogICAgYjogMjANCn07DQovKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQpDb3B5cmlnaHQNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovDQovLy88cmVmZXJlbmNlIHBhdGg9ImEudHMiLz4NCnZhciB5ID0geDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWEuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs2RUFFNkU7QUFFN0UsSUFBSSxDQUFDLEdBQUc7SUFDSixDQUFDLEVBQUUsRUFBRTtJQUNMLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQztBQ1BGOzs2RUFFNkU7QUFFN0UsMkJBQTJCO0FBQzNCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyJ9,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpDb3B5cmlnaHQgCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCgp2YXIgeCA9IHsKICAgIGE6IDEwLAogICAgYjogMjAKfTsK,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpDb3B5cmlnaHQgCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCgovLy88cmVmZXJlbmNlIHBhdGg9ImEudHMiLz4KdmFyIHkgPSB4Ow==
//// https://sokra.github.io/source-map-visualization#base64,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KQ29weXJpZ2h0DQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLw0KdmFyIHggPSB7DQogICAgYTogMTAsDQogICAgYjogMjANCn07DQovKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQpDb3B5cmlnaHQNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovDQovLy88cmVmZXJlbmNlIHBhdGg9ImEudHMiLz4NCnZhciB5ID0geDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWEuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs2RUFFNkU7QUFFN0UsSUFBSSxDQUFDLEdBQUc7SUFDSixDQUFDLEVBQUUsRUFBRTtJQUNMLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQztBQ1BGOzs2RUFFNkU7QUFFN0UsMkJBQTJCO0FBQzNCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyJ9,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpDb3B5cmlnaHQgCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCgp2YXIgeCA9IHsKICAgIGE6IDEwLAogICAgYjogMjAKfTsK,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpDb3B5cmlnaHQgCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCgovLy88cmVmZXJlbmNlIHBhdGg9ImEudHMiLz4KdmFyIHkgPSB4Owo=

View File

@ -35,7 +35,8 @@ interface Symbol {
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "common.js"
"outFile": "common.js",
"bundledPackageName": "common"
},
"include": ["nominal.js"]
}
@ -52,7 +53,8 @@ const c = /** @type {*} */(null);
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "sub-project.js"
"outFile": "sub-project.js",
"bundledPackageName": "sub"
},
"references": [
{ "path": "../common", "prepend": true }
@ -78,7 +80,8 @@ function getVar() {
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "sub-project-2.js"
"outFile": "sub-project-2.js",
"bundledPackageName": "sub-2"
},
"references": [
{ "path": "../sub-project", "prepend": true }

View File

@ -35,7 +35,8 @@ interface Symbol {
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "common.js"
"outFile": "common.js",
"bundledPackageName": "common"
},
"include": ["nominal.js"]
}
@ -52,7 +53,8 @@ const c = /** @type {*} */(null);
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "sub-project.js"
"outFile": "sub-project.js",
"bundledPackageName": "sub"
},
"references": [
{ "path": "../common", "prepend": true }
@ -78,7 +80,8 @@ function getVar() {
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outFile": "sub-project-2.js"
"outFile": "sub-project-2.js",
"bundledPackageName": "sub-2"
},
"references": [
{ "path": "../sub-project", "prepend": true }

View File

@ -51,7 +51,8 @@ Input::
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -79,6 +80,7 @@ Input::
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -116,7 +118,8 @@ Input::
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -91,6 +92,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"skipDefaultLibCheck": true
},
@ -115,7 +117,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"
@ -235,6 +238,7 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
"configFilePath": "./tsconfig.json"
},
"semanticDiagnosticsPerFile": [
@ -322,6 +326,7 @@ var C = (function () {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"skipDefaultLibCheck": true,
"configFilePath": "./tsconfig.json"
},
@ -399,6 +404,7 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
"configFilePath": "./tsconfig.json"
},
"semanticDiagnosticsPerFile": [

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -91,6 +92,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -115,7 +117,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -131,7 +131,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -159,6 +160,7 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -313,7 +315,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -91,6 +92,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -115,7 +117,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -91,6 +92,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -113,7 +115,8 @@ class C {
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -49,7 +49,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -95,6 +96,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -121,7 +123,8 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 };
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -93,6 +94,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -117,7 +119,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -52,7 +52,8 @@ firstfirst_part3Spread(...[10, 20, 30]);
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -101,6 +102,7 @@ secondsecond_part2Spread(...[10, 20, 30]);
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -130,7 +132,8 @@ thirdthird_part1Spread(...[10, 20, 30]);
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -49,7 +49,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -96,6 +97,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -122,7 +124,8 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 };
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -48,7 +48,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -94,6 +95,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -120,7 +122,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -93,6 +94,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -117,7 +119,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -49,7 +49,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -94,6 +95,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -119,7 +121,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -92,6 +93,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -116,7 +118,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -91,6 +92,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -115,7 +117,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -91,6 +92,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -115,7 +117,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -74,7 +74,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -118,6 +119,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -143,7 +145,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -116,6 +117,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -142,7 +144,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -116,6 +117,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -141,7 +143,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -116,6 +117,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -142,7 +144,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -116,6 +117,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -141,7 +143,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -69,7 +69,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -113,6 +114,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -138,7 +140,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -116,6 +117,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -142,7 +144,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -24,7 +24,7 @@ declare const console: { log(msg: any): void; };
//// [/src/first/tsconfig.json]
{"compilerOptions":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true,"sourceMap":true,"outFile":"./bin/first-output.js"},"files":["/src/first/first_PART1.ts"]}
{"compilerOptions":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true,"sourceMap":true,"outFile":"./bin/first-output.js","bundledPackageName":"first"},"files":["/src/first/first_PART1.ts"]}
//// [/src/second/second_part1.ts]
@ -39,7 +39,7 @@ declare const console: { log(msg: any): void; };
const B = 2;
//// [/src/third/tsconfig.json]
{"compilerOptions":{"composite":true,"declaration":true,"declarationMap":false,"stripInternal":true,"sourceMap":true,"outFile":"./thirdjs/output/third-output.js"},"references":[{"path":"../first","prepend":true}],"files":["/src/third/third_part1.ts"]}
{"compilerOptions":{"composite":true,"declaration":true,"declarationMap":false,"stripInternal":true,"sourceMap":true,"outFile":"./thirdjs/output/third-output.js","bundledPackageName":"third"},"references":[{"path":"../first","prepend":true}],"files":["/src/third/third_part1.ts"]}

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -116,6 +117,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -142,7 +144,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -116,6 +117,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -141,7 +143,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -116,6 +117,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -141,7 +143,8 @@ c.doSomething();
"declaration": true,
"stripInternal": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -52,7 +52,8 @@ declare class firstfirst_part2 { }
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -101,6 +102,7 @@ declare class secondsecond_part1 { }
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -130,7 +132,8 @@ declare class thirdthird_part1 { }
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -96,6 +97,7 @@ declare class secondsecond_part1 { }
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -120,7 +122,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

View File

@ -47,7 +47,8 @@ function f() {
"sourceMap": true,
"declarationMap": true,
"outFile": "./bin/first-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "first",
},
"files": [
"first_PART1.ts",
@ -91,6 +92,7 @@ class C {
"sourceMap": true,
"declarationMap": true,
"declaration": true,
"bundledPackageName": "second",
"outFile": "../2/second-output.js",
"skipDefaultLibCheck": true
},
@ -115,7 +117,8 @@ c.doSomething();
"declarationMap": true,
"declaration": true,
"outFile": "./thirdjs/output/third-output.js",
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"bundledPackageName": "third",
},
"files": [
"third_part1.ts"

Some files were not shown because too many files have changed in this diff Show More