diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index edefd6bf9dde5..e2c535bd55016 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2763,6 +2763,14 @@ namespace ts { } return hasAccessibleDeclarations; } + else { + if (some(symbol.declarations, hasExternalModuleSymbol)) { + // Any meaning of a module symbol is always accessible via an `import` type + return { + accessibility: SymbolAccessibility.Accessible + }; + } + } // If we haven't got the accessible symbol, it doesn't mean the symbol is actually inaccessible. // It could be a qualified symbol and hence verify the path @@ -3133,9 +3141,9 @@ namespace ts { return createTypeReferenceNode(name, /*typeArguments*/ undefined); } if (!inTypeAlias && type.aliasSymbol && (context.flags & NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope || isTypeSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration))) { - const name = symbolToTypeReferenceName(type.aliasSymbol); const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); - return createTypeReferenceNode(name, typeArgumentNodes); + if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & SymbolFlags.Class)) return createTypeReferenceNode(createIdentifier(""), typeArgumentNodes); + return symbolToTypeNode(type.aliasSymbol, context, SymbolFlags.Type, typeArgumentNodes); } if (type.flags & (TypeFlags.Union | TypeFlags.Intersection)) { const types = type.flags & TypeFlags.Union ? formatUnionTypes((type).types) : (type).types; @@ -3298,12 +3306,6 @@ namespace ts { return setEmitFlags(typeLiteralNode, (context.flags & NodeBuilderFlags.MultilineObjectLiterals) ? 0 : EmitFlags.SingleLine); } - function symbolToTypeReferenceName(symbol: Symbol) { - // Unnamed function expressions and arrow functions have reserved names that we don't want to display - const entityName = symbol.flags & SymbolFlags.Class || !isReservedMemberName(symbol.escapedName) ? symbolToName(symbol, context, SymbolFlags.Type, /*expectsIdentifier*/ false) : createIdentifier(""); - return entityName; - } - function typeReferenceToTypeNode(type: TypeReference) { const typeArguments: Type[] = type.typeArguments || emptyArray; if (type.target === globalArrayType) { @@ -3338,7 +3340,7 @@ namespace ts { else { const outerTypeParameters = type.target.outerTypeParameters; let i = 0; - let qualifiedName: QualifiedName | undefined; + let resultType: TypeReferenceNode | ImportTypeNode; if (outerTypeParameters) { const length = outerTypeParameters.length; while (i < length) { @@ -3352,64 +3354,66 @@ namespace ts { // the default outer type arguments), we don't show the group. if (!rangeEquals(outerTypeParameters, typeArguments, start, i)) { const typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context); - const typeArgumentNodes = typeArgumentSlice && createNodeArray(typeArgumentSlice); - const namePart = symbolToTypeReferenceName(parent); - (namePart.kind === SyntaxKind.Identifier ? namePart : namePart.right).typeArguments = typeArgumentNodes; - - if (qualifiedName) { - Debug.assert(!qualifiedName.right); - qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, namePart); - qualifiedName = createQualifiedName(qualifiedName, /*right*/ undefined); - } - else { - qualifiedName = createQualifiedName(namePart, /*right*/ undefined); - } + const flags = context.flags; + context.flags |= NodeBuilderFlags.ForbidIndexedAccessSymbolReferences; + const ref = symbolToTypeNode(parent, context, SymbolFlags.Type, typeArgumentSlice) as TypeReferenceNode | ImportTypeNode; + context.flags = flags; + resultType = !resultType ? ref : appendReferenceToType(resultType, ref as TypeReferenceNode); } } } - - let entityName: EntityName; - const nameIdentifier = symbolToTypeReferenceName(type.symbol); - if (qualifiedName) { - Debug.assert(!qualifiedName.right); - qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, nameIdentifier); - entityName = qualifiedName; - } - else { - entityName = nameIdentifier; - } - let typeArgumentNodes: ReadonlyArray | undefined; if (typeArguments.length > 0) { const typeParameterCount = (type.target.typeParameters || emptyArray).length; typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context); } - - if (typeArgumentNodes) { - const lastIdentifier = entityName.kind === SyntaxKind.Identifier ? entityName : entityName.right; - lastIdentifier.typeArguments = undefined; - } - - return createTypeReferenceNode(entityName, typeArgumentNodes); + const flags = context.flags; + context.flags |= NodeBuilderFlags.ForbidIndexedAccessSymbolReferences; + const finalRef = symbolToTypeNode(type.symbol, context, SymbolFlags.Type, typeArgumentNodes); + context.flags = flags; + return !resultType ? finalRef : appendReferenceToType(resultType, finalRef as TypeReferenceNode); } } - function addToQualifiedNameMissingRightIdentifier(left: QualifiedName, right: Identifier | QualifiedName) { - Debug.assert(left.right === undefined); - if (right.kind === SyntaxKind.Identifier) { - left.right = right; - return left; + function appendReferenceToType(root: TypeReferenceNode | ImportTypeNode, ref: TypeReferenceNode): TypeReferenceNode | ImportTypeNode { + if (isImportTypeNode(root)) { + // first shift type arguments + const innerParams = root.typeArguments; + if (root.qualifier) { + (isIdentifier(root.qualifier) ? root.qualifier : root.qualifier.right).typeArguments = innerParams; + } + root.typeArguments = ref.typeArguments; + // then move qualifiers + const ids = getAccessStack(ref); + for (const id of ids) { + root.qualifier = root.qualifier ? createQualifiedName(root.qualifier, id) : id; + } + return root; } - - let rightPart = right; - while (rightPart.left.kind !== SyntaxKind.Identifier) { - rightPart = rightPart.left; + else { + // first shift type arguments + const innerParams = root.typeArguments; + (isIdentifier(root.typeName) ? root.typeName : root.typeName.right).typeArguments = innerParams; + root.typeArguments = ref.typeArguments; + // then move qualifiers + const ids = getAccessStack(ref); + for (const id of ids) { + root.typeName = createQualifiedName(root.typeName, id); + } + return root; } + } - left.right = rightPart.left; - rightPart.left = left; - return right; + function getAccessStack(ref: TypeReferenceNode): Identifier[] { + let state = ref.typeName; + const ids = []; + while (!isIdentifier(state)) { + ids.unshift(state.right); + state = state.left; + } + ids.unshift(state); + return ids; } function createTypeNodesFromResolvedType(resolvedType: ResolvedType): TypeElement[] { @@ -3640,7 +3644,7 @@ namespace ts { } } - function lookupSymbolChain(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags) { + function lookupSymbolChain(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags, yieldModuleSymbol?: boolean) { context.tracker.trackSymbol(symbol, context.enclosingDeclaration, meaning); // Try to get qualified name if the symbol is not a type parameter and there is an enclosing declaration. let chain: Symbol[]; @@ -3680,7 +3684,7 @@ namespace ts { // If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols. endOfChain || // If a parent symbol is an external module, don't write it. (We prefer just `x` vs `"foo/bar".x`.) - !(!parentSymbol && forEach(symbol.declarations, hasExternalModuleSymbol)) && + (yieldModuleSymbol || !(!parentSymbol && forEach(symbol.declarations, hasExternalModuleSymbol))) && // If a parent symbol is an anonymous type, don't write it. !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.ObjectLiteral))) { @@ -3728,8 +3732,8 @@ namespace ts { return top; } - function symbolToTypeNode(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags): TypeNode { - const chain = lookupSymbolChain(symbol, context, meaning); + function symbolToTypeNode(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags, overrideTypeArguments?: ReadonlyArray): TypeNode { + const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope)); // If we're using aliases outside the current scope, dont bother with the module context.flags |= NodeBuilderFlags.InInitialEntityName; const rootName = getNameOfSymbolAsWritten(chain[0], context); @@ -3739,9 +3743,13 @@ namespace ts { if (ambientModuleSymbolRegex.test(rootName)) { // module is root, must use `ImportTypeNode` const nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : undefined; - const typeParameterNodes = lookupTypeParameterNodes(chain, 0, context); + const typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context); const lit = createLiteralTypeNode(createLiteral(rootName.substring(1, rootName.length - 1))); if (!nonRootParts || isEntityName(nonRootParts)) { + if (nonRootParts) { + const lastId = isIdentifier(nonRootParts) ? nonRootParts : (nonRootParts as QualifiedName).right; + lastId.typeArguments = undefined; + } return createImportTypeNode(lit, nonRootParts as EntityName, typeParameterNodes as ReadonlyArray, isTypeOf); } else { @@ -3755,10 +3763,18 @@ namespace ts { if (isIndexedAccessTypeNode(entityName)) { return entityName; // Indexed accesses can never be `typeof` } - return isTypeOf ? createTypeQueryNode(entityName) : createTypeReferenceNode(entityName, /*typeArguments*/ undefined); + if (isTypeOf) { + return createTypeQueryNode(entityName); + } + else { + const lastId = isIdentifier(entityName) ? entityName : entityName.right; + const lastTypeArgs = lastId.typeArguments; + lastId.typeArguments = undefined; + return createTypeReferenceNode(entityName, lastTypeArgs as NodeArray); + } function createAccessFromSymbolChain(chain: Symbol[], index: number, stopper: number): EntityName | IndexedAccessTypeNode { - const typeParameterNodes = lookupTypeParameterNodes(chain, index, context); + const typeParameterNodes = index === (chain.length - 1) ? overrideTypeArguments : lookupTypeParameterNodes(chain, index, context); const symbol = chain[index]; if (index === 0) { @@ -3770,7 +3786,7 @@ namespace ts { } const parent = chain[index - 1]; - if (parent && getMembersOfSymbol(parent) && getMembersOfSymbol(parent).get(symbol.escapedName) === symbol) { + if (!(context.flags & NodeBuilderFlags.ForbidIndexedAccessSymbolReferences) && parent && getMembersOfSymbol(parent) && getMembersOfSymbol(parent).get(symbol.escapedName) === symbol) { // Should use an indexed access const LHS = createAccessFromSymbolChain(chain, index - 1, stopper); if (isIndexedAccessTypeNode(LHS)) { @@ -3973,6 +3989,23 @@ namespace ts { return "default"; } if (symbol.declarations && symbol.declarations.length) { + if (some(symbol.declarations, hasExternalModuleSymbol) && context.enclosingDeclaration) { + const file = getDeclarationOfKind(symbol, SyntaxKind.SourceFile); + if (!file || !context.tracker.moduleResolverHost) { + if (context.tracker.trackReferencedAmbientModule) { + const ambientDecls = filter(symbol.declarations, isAmbientModule); + if (length(ambientDecls)) { + for (const decl of ambientDecls) { + context.tracker.trackReferencedAmbientModule(decl); + } + } + } + // ambient module, just use declaration/symbol name (fallthrough) + } + else { + return `"${getResolvedExternalModuleName(context.tracker.moduleResolverHost, file, getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration)))}"`; + } + } const declaration = symbol.declarations[0]; const name = getNameOfDeclaration(declaration); if (name) { diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 1a404d8262a6a..c9c230d3a00f9 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -37,20 +37,23 @@ namespace ts { let lateStatementReplacementMap: Map>; let suppressNewDiagnosticContexts: boolean; + const host = context.getEmitHost(); const symbolTracker: SymbolTracker = { trackSymbol, reportInaccessibleThisError, reportInaccessibleUniqueSymbolError, - reportPrivateInBaseOfClassExpression + reportPrivateInBaseOfClassExpression, + moduleResolverHost: host, + trackReferencedAmbientModule, }; let errorNameNode: DeclarationName | undefined; let currentSourceFile: SourceFile; + let refs: Map; const resolver = context.getEmitResolver(); const options = context.getCompilerOptions(); const newLine = getNewLineCharacter(options); const { noResolve, stripInternal } = options; - const host = context.getEmitHost(); return transformRoot; function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: string[]): void { @@ -63,6 +66,11 @@ namespace ts { } } + function trackReferencedAmbientModule(node: ModuleDeclaration) { + const container = getSourceFileOfNode(node); + refs.set("" + getOriginalNodeId(container), container); + } + function handleSymbolAccessibilityError(symbolAccessibilityResult: SymbolAccessibilityResult) { if (symbolAccessibilityResult.accessibility === SymbolAccessibility.Accessible) { // Add aliases back onto the possible imports list if they're not there so we can try them again with updated visibility info @@ -197,13 +205,13 @@ namespace ts { lateMarkedStatements = undefined; lateStatementReplacementMap = createMap(); necessaryTypeRefernces = undefined; - const refs = collectReferences(currentSourceFile, createMap()); + refs = collectReferences(currentSourceFile, createMap()); const references: FileReference[] = []; const outputFilePath = getDirectoryPath(normalizeSlashes(getOutputPathsFor(node, host, /*forceDtsPaths*/ true).declarationFilePath)); const referenceVisitor = mapReferencesIntoArray(references, outputFilePath); - refs.forEach(referenceVisitor); const statements = visitNodes(node.statements, visitDeclarationStatements); let combinedStatements = setTextRange(createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements); + refs.forEach(referenceVisitor); const emittedImports = filter(combinedStatements, isAnyImportSyntax); if (isExternalModule(node) && (!resultHasExternalModuleIndicator || (needsScopeFixMarker && !resultHasScopeMarker))) { combinedStatements = setTextRange(createNodeArray([...combinedStatements, createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createNamedExports([]), /*moduleSpecifier*/ undefined)]), combinedStatements); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4b2a7c080d216..19e46cf3db4c6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3076,7 +3076,7 @@ namespace ts { WriteArrayAsGenericType = 1 << 1, // Write Array instead T[] GenerateNamesForShadowedTypeParams = 1 << 2, // When a type parameter T is shadowing another T, generate a name for it so it can still be referenced UseStructuralFallback = 1 << 3, // When an alias cannot be named by its symbol, rather than report an error, fallback to a structural printout if possible - // empty space + ForbidIndexedAccessSymbolReferences = 1 << 4, // Forbid references like `I["a"]["b"]` - print `typeof I.a.b` instead WriteTypeArgumentsOfSignature = 1 << 5, // Write the type arguments instead of type parameters of the signature UseFullyQualifiedType = 1 << 6, // Write out the fully qualified type name (eg. Module.Type, instead of Type) UseOnlyExternalAliasing = 1 << 7, // Only use external aliases for a symbol @@ -5239,6 +5239,13 @@ namespace ts { isAtStartOfLine(): boolean; } + /* @internal */ + export interface ModuleNameResolverHost { + getCanonicalFileName(f: string): string; + getCommonSourceDirectory(): string; + getCurrentDirectory(): string; + } + /** @deprecated See comment on SymbolWriter */ // Note: this has non-deprecated internal uses. export interface SymbolTracker { @@ -5249,6 +5256,10 @@ namespace ts { reportInaccessibleThisError?(): void; reportPrivateInBaseOfClassExpression?(propertyName: string): void; reportInaccessibleUniqueSymbolError?(): void; + /* @internal */ + moduleResolverHost?: ModuleNameResolverHost; + /* @internal */ + trackReferencedAmbientModule?(decl: ModuleDeclaration): void; } export interface TextSpan { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 29bd38803d048..d2a50dea5fe3c 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2875,11 +2875,11 @@ namespace ts { }; } - export function getResolvedExternalModuleName(host: EmitHost, file: SourceFile): string { - return file.moduleName || getExternalModuleNameFromPath(host, file.fileName); + export function getResolvedExternalModuleName(host: ModuleNameResolverHost, file: SourceFile, referenceFile?: SourceFile): string { + return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName); } - export function getExternalModuleNameFromDeclaration(host: EmitHost, resolver: EmitResolver, declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode): string { + export function getExternalModuleNameFromDeclaration(host: ModuleNameResolverHost, resolver: EmitResolver, declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode): string { const file = resolver.getExternalModuleFileFromDeclaration(declaration); if (!file || file.isDeclarationFile) { return undefined; @@ -2890,12 +2890,13 @@ namespace ts { /** * Resolves a local path to a path which is absolute to the base of the emit */ - export function getExternalModuleNameFromPath(host: EmitHost, fileName: string): string { + export function getExternalModuleNameFromPath(host: ModuleNameResolverHost, fileName: string, referencePath?: string): string { const getCanonicalFileName = (f: string) => host.getCanonicalFileName(f); - const dir = toPath(host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); + const dir = toPath(referencePath ? getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); const filePath = getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); const relativePath = getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); - return removeFileExtension(relativePath); + const extensionless = removeFileExtension(relativePath); + return referencePath ? ensurePathIsNonModuleName(extensionless) : extensionless; } export function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string) { diff --git a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.types b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.types index 2953ede402607..d6f799c366722 100644 --- a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.types +++ b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.types @@ -1,6 +1,6 @@ === tests/cases/compiler/Class.ts === import { Configurable } from "./Configurable" ->Configurable : {}>(base: T) => T +>Configurable : >(base: T) => T export class HiddenClass {} >HiddenClass : HiddenClass @@ -8,7 +8,7 @@ export class HiddenClass {} export class ActualClass extends Configurable(HiddenClass) {} >ActualClass : ActualClass >Configurable(HiddenClass) : HiddenClass ->Configurable : {}>(base: T) => T +>Configurable : >(base: T) => T >HiddenClass : typeof HiddenClass === tests/cases/compiler/Configurable.ts === diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 061ff2aeae1d9..476587f6c0bf8 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -1885,6 +1885,7 @@ declare namespace ts { WriteArrayAsGenericType = 2, GenerateNamesForShadowedTypeParams = 4, UseStructuralFallback = 8, + ForbidIndexedAccessSymbolReferences = 16, WriteTypeArgumentsOfSignature = 32, UseFullyQualifiedType = 64, UseOnlyExternalAliasing = 128, diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 4887de7fd2fc2..cee875346059e 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -1885,6 +1885,7 @@ declare namespace ts { WriteArrayAsGenericType = 2, GenerateNamesForShadowedTypeParams = 4, UseStructuralFallback = 8, + ForbidIndexedAccessSymbolReferences = 16, WriteTypeArgumentsOfSignature = 32, UseFullyQualifiedType = 64, UseOnlyExternalAliasing = 128, diff --git a/tests/baselines/reference/augmentExportEquals5.types b/tests/baselines/reference/augmentExportEquals5.types index c071a195f0e1f..f9cc2bfeae95a 100644 --- a/tests/baselines/reference/augmentExportEquals5.types +++ b/tests/baselines/reference/augmentExportEquals5.types @@ -18,7 +18,7 @@ declare module "express" { function e(): e.Express; >e : typeof e >e : any ->Express : Express +>Express : e.Express namespace e { >e : typeof e diff --git a/tests/baselines/reference/declarationEmitAliasFromIndirectFile.js b/tests/baselines/reference/declarationEmitAliasFromIndirectFile.js index 1d55514eb9df7..105b406cdadea 100644 --- a/tests/baselines/reference/declarationEmitAliasFromIndirectFile.js +++ b/tests/baselines/reference/declarationEmitAliasFromIndirectFile.js @@ -36,24 +36,9 @@ exports["default"] = fp.l10ns; //// [app.d.ts] declare const _default: { - ar?: { - weekdays: { - shorthand: [string, string, string, string, string, string, string]; - longhand: [string, string, string, string, string, string, string]; - }; - }; - bg?: { - weekdays: { - shorthand: [string, string, string, string, string, string, string]; - longhand: [string, string, string, string, string, string, string]; - }; - }; + ar?: import("./locale").CustomLocale; + bg?: import("./locale").CustomLocale; } & { - default: { - weekdays: { - shorthand: [string, string, string, string, string, string, string]; - longhand: [string, string, string, string, string, string, string]; - }; - }; + default: import("./locale").Locale; }; export default _default; diff --git a/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types b/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types index 16730debf8e89..35557a1fd1d87 100644 --- a/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types +++ b/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types @@ -62,7 +62,7 @@ const fp = { l10ns: {} } as FlatpickrFn; >FlatpickrFn : FlatpickrFn export default fp.l10ns; ->fp.l10ns : { ar?: { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; }; bg?: { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; }; } & { default: { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; }; } +>fp.l10ns : { ar?: import("tests/cases/compiler/locale").CustomLocale; bg?: import("tests/cases/compiler/locale").CustomLocale; } & { default: import("tests/cases/compiler/locale").Locale; } >fp : FlatpickrFn ->l10ns : { ar?: { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; }; bg?: { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; }; } & { default: { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; }; } +>l10ns : { ar?: import("tests/cases/compiler/locale").CustomLocale; bg?: import("tests/cases/compiler/locale").CustomLocale; } & { default: import("tests/cases/compiler/locale").Locale; } diff --git a/tests/baselines/reference/declarationEmitInferredTypeAlias7.js b/tests/baselines/reference/declarationEmitInferredTypeAlias7.js index ff44c18f918ea..d2977b6b78cf7 100644 --- a/tests/baselines/reference/declarationEmitInferredTypeAlias7.js +++ b/tests/baselines/reference/declarationEmitInferredTypeAlias7.js @@ -22,5 +22,5 @@ exports.v = v; //// [0.d.ts] export declare type Data = string | boolean; //// [1.d.ts] -declare let v: string | boolean; +declare let v: import("./0").Data; export { v }; diff --git a/tests/baselines/reference/declarationEmitInferredTypeAlias7.types b/tests/baselines/reference/declarationEmitInferredTypeAlias7.types index 72289ce63dd98..a1af3ba37909b 100644 --- a/tests/baselines/reference/declarationEmitInferredTypeAlias7.types +++ b/tests/baselines/reference/declarationEmitInferredTypeAlias7.types @@ -9,11 +9,11 @@ let obj: Data = true; === tests/cases/compiler/1.ts === let v = "str" || true; ->v : string | boolean +>v : import("tests/cases/compiler/0").Data >"str" || true : true | "str" >"str" : "str" >true : true export { v } ->v : string | boolean +>v : import("tests/cases/compiler/0").Data diff --git a/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.js b/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.js new file mode 100644 index 0000000000000..51d9b02b2b2b5 --- /dev/null +++ b/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.js @@ -0,0 +1,48 @@ +//// [tests/cases/compiler/declarationsForInferredTypeFromOtherFile.ts] //// + +//// [file1.ts] +export class Foo {} +//// [file2.ts] +export function foo(): import("./file1").Foo { + return null as any; +} +//// [file3.ts] +import {foo} from "./file2"; +export function bar() { + return foo(); +} + + +//// [file1.js] +"use strict"; +exports.__esModule = true; +var Foo = /** @class */ (function () { + function Foo() { + } + return Foo; +}()); +exports.Foo = Foo; +//// [file2.js] +"use strict"; +exports.__esModule = true; +function foo() { + return null; +} +exports.foo = foo; +//// [file3.js] +"use strict"; +exports.__esModule = true; +var file2_1 = require("./file2"); +function bar() { + return file2_1.foo(); +} +exports.bar = bar; + + +//// [file1.d.ts] +export declare class Foo { +} +//// [file2.d.ts] +export declare function foo(): import("./file1").Foo; +//// [file3.d.ts] +export declare function bar(): import("./file1").Foo; diff --git a/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.symbols b/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.symbols new file mode 100644 index 0000000000000..7fdd97737f41c --- /dev/null +++ b/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/file1.ts === +export class Foo {} +>Foo : Symbol(Foo, Decl(file1.ts, 0, 0)) + +=== tests/cases/compiler/file2.ts === +export function foo(): import("./file1").Foo { +>foo : Symbol(foo, Decl(file2.ts, 0, 0)) +>Foo : Symbol(Foo, Decl(file1.ts, 0, 0)) + + return null as any; +} +=== tests/cases/compiler/file3.ts === +import {foo} from "./file2"; +>foo : Symbol(foo, Decl(file3.ts, 0, 8)) + +export function bar() { +>bar : Symbol(bar, Decl(file3.ts, 0, 28)) + + return foo(); +>foo : Symbol(foo, Decl(file3.ts, 0, 8)) +} + diff --git a/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.types b/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.types new file mode 100644 index 0000000000000..587fefaacc128 --- /dev/null +++ b/tests/baselines/reference/declarationsForInferredTypeFromOtherFile.types @@ -0,0 +1,25 @@ +=== tests/cases/compiler/file1.ts === +export class Foo {} +>Foo : Foo + +=== tests/cases/compiler/file2.ts === +export function foo(): import("./file1").Foo { +>foo : () => import("tests/cases/compiler/file1").Foo +>Foo : import("tests/cases/compiler/file1").Foo + + return null as any; +>null as any : any +>null : null +} +=== tests/cases/compiler/file3.ts === +import {foo} from "./file2"; +>foo : () => import("tests/cases/compiler/file1").Foo + +export function bar() { +>bar : () => import("tests/cases/compiler/file1").Foo + + return foo(); +>foo() : import("tests/cases/compiler/file1").Foo +>foo : () => import("tests/cases/compiler/file1").Foo +} + diff --git a/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.types b/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.types index 5fd92f6e2eb5e..7fbf4e3658625 100644 --- a/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.types +++ b/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.types @@ -4,39 +4,39 @@ type Constructor = new (...args: any[]) => {}; >args : any[] const Mixin1 = (Base: C) => class extends Base { private _fooPrivate: {}; } ->Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C ->(Base: C) => class extends Base { private _fooPrivate: {}; } : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: Mixin1.(Anonymous class); } & C +>(Base: C) => class extends Base { private _fooPrivate: {}; } : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: Mixin1.(Anonymous class); } & C >C : C >Constructor : Constructor >Base : C >C : C ->class extends Base { private _fooPrivate: {}; } : { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>class extends Base { private _fooPrivate: {}; } : { new (...args: any[]): (Anonymous class); prototype: Mixin1.(Anonymous class); } & C >Base : {} >_fooPrivate : {} type FooConstructor = typeof Mixin1 extends (a: Constructor) => infer Cls ? Cls : never; ->FooConstructor : { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); } & Constructor ->Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>FooConstructor : { new (...args: any[]): Mixin1.(Anonymous class); prototype: Mixin1.(Anonymous class); } & Constructor +>Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: Mixin1.(Anonymous class); } & C >a : Constructor >Constructor : Constructor >Cls : Cls >Cls : Cls const Mixin2 = (Base: C) => class extends Base {}; ->Mixin2 : .(Anonymous class); prototype: .(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C ->(Base: C) => class extends Base {} : .(Anonymous class); prototype: .(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>Mixin2 : .(Anonymous class); prototype: Mixin1.(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: Mixin2.(Anonymous class); } & C +>(Base: C) => class extends Base {} : .(Anonymous class); prototype: Mixin1.(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: Mixin2.(Anonymous class); } & C >C : C ->FooConstructor : { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); } & Constructor +>FooConstructor : { new (...args: any[]): Mixin1.(Anonymous class); prototype: Mixin1.(Anonymous class); } & Constructor >Base : C >C : C ->class extends Base {} : { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C ->Base : .(Anonymous class) +>class extends Base {} : { new (...args: any[]): (Anonymous class); prototype: Mixin2.(Anonymous class); } & C +>Base : Mixin1.(Anonymous class) class C extends Mixin2(Mixin1(Object)) {} >C : C ->Mixin2(Mixin1(Object)) : <{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); } & ObjectConstructor>.(Anonymous class) & .(Anonymous class) & Object ->Mixin2 : .(Anonymous class); prototype: .(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C ->Mixin1(Object) : { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); } & ObjectConstructor ->Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>Mixin2(Mixin1(Object)) : Mixin2<{ new (...args: any[]): Mixin1.(Anonymous class); prototype: Mixin1.(Anonymous class); } & ObjectConstructor>.(Anonymous class) & Mixin1.(Anonymous class) & Object +>Mixin2 : .(Anonymous class); prototype: Mixin1.(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: Mixin2.(Anonymous class); } & C +>Mixin1(Object) : { new (...args: any[]): Mixin1.(Anonymous class); prototype: Mixin1.(Anonymous class); } & ObjectConstructor +>Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: Mixin1.(Anonymous class); } & C >Object : ObjectConstructor diff --git a/tests/baselines/reference/duplicatePackage.errors.txt b/tests/baselines/reference/duplicatePackage.errors.txt index 917ed711c640d..99d5a3f29ccf7 100644 --- a/tests/baselines/reference/duplicatePackage.errors.txt +++ b/tests/baselines/reference/duplicatePackage.errors.txt @@ -1,4 +1,4 @@ -/src/a.ts(5,3): error TS2345: Argument of type 'X' is not assignable to parameter of type 'X'. +/src/a.ts(5,3): error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").default' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").default'. Types have separate declarations of a private property 'x'. @@ -9,7 +9,7 @@ a(b); // Works a(c); // Error, these are from different versions of the library. ~ -!!! error TS2345: Argument of type 'X' is not assignable to parameter of type 'X'. +!!! error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").default' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").default'. !!! error TS2345: Types have separate declarations of a private property 'x'. ==== /node_modules/a/index.d.ts (0 errors) ==== diff --git a/tests/baselines/reference/duplicatePackage.types b/tests/baselines/reference/duplicatePackage.types index 689d7a5c5bc4f..261b87595b7fa 100644 --- a/tests/baselines/reference/duplicatePackage.types +++ b/tests/baselines/reference/duplicatePackage.types @@ -1,22 +1,22 @@ === /src/a.ts === import { a } from "a"; ->a : (x: default) => void +>a : (x: import("/node_modules/a/node_modules/x/index").default) => void import { b } from "b"; ->b : default +>b : import("/node_modules/a/node_modules/x/index").default import { c } from "c"; ->c : default +>c : import("/node_modules/c/node_modules/x/index").default a(b); // Works >a(b) : void ->a : (x: default) => void ->b : default +>a : (x: import("/node_modules/a/node_modules/x/index").default) => void +>b : import("/node_modules/a/node_modules/x/index").default a(c); // Error, these are from different versions of the library. >a(c) : void ->a : (x: default) => void ->c : default +>a : (x: import("/node_modules/a/node_modules/x/index").default) => void +>c : import("/node_modules/c/node_modules/x/index").default === /node_modules/a/index.d.ts === import X from "x"; diff --git a/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage.types b/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage.types index 33931774a1bd7..e7079388c4245 100644 --- a/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage.types +++ b/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage.types @@ -1,14 +1,14 @@ === /index.ts === import { use } from "foo/use"; ->use : (o: C) => void +>use : (o: import("/node_modules/foo/index").C) => void import { o } from "a"; ->o : C +>o : import("/node_modules/foo/index").C use(o); >use(o) : void ->use : (o: C) => void ->o : C +>use : (o: import("/node_modules/foo/index").C) => void +>o : import("/node_modules/foo/index").C === /node_modules/a/node_modules/foo/index.d.ts === export class C { diff --git a/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage_scoped.types b/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage_scoped.types index 7be2442bf3ba1..e38678b7acfcc 100644 --- a/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage_scoped.types +++ b/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage_scoped.types @@ -1,14 +1,14 @@ === /index.ts === import { use } from "@foo/bar/use"; ->use : (o: C) => void +>use : (o: import("/node_modules/@foo/bar/index").C) => void import { o } from "a"; ->o : C +>o : import("/node_modules/@foo/bar/index").C use(o); >use(o) : void ->use : (o: C) => void ->o : C +>use : (o: import("/node_modules/@foo/bar/index").C) => void +>o : import("/node_modules/@foo/bar/index").C === /node_modules/a/node_modules/@foo/bar/index.d.ts === export class C { diff --git a/tests/baselines/reference/es5ExportEquals.types b/tests/baselines/reference/es5ExportEquals.types index 6c9e893053779..6f138b0e862d9 100644 --- a/tests/baselines/reference/es5ExportEquals.types +++ b/tests/baselines/reference/es5ExportEquals.types @@ -1,6 +1,6 @@ === tests/cases/compiler/es5ExportEquals.ts === export function f() { } ->f : typeof f +>f : typeof import("tests/cases/compiler/es5ExportEquals").f export = f; >f : () => void diff --git a/tests/baselines/reference/es6ExportEquals.types b/tests/baselines/reference/es6ExportEquals.types index 3ba761dc8e541..be19f33bac49c 100644 --- a/tests/baselines/reference/es6ExportEquals.types +++ b/tests/baselines/reference/es6ExportEquals.types @@ -1,6 +1,6 @@ === tests/cases/compiler/es6ExportEquals.ts === export function f() { } ->f : typeof f +>f : typeof import("tests/cases/compiler/es6ExportEquals").f export = f; >f : () => void diff --git a/tests/baselines/reference/exportClassExtendingIntersection.js b/tests/baselines/reference/exportClassExtendingIntersection.js index 70ea0b3b53a11..f94696a348c9a 100644 --- a/tests/baselines/reference/exportClassExtendingIntersection.js +++ b/tests/baselines/reference/exportClassExtendingIntersection.js @@ -114,7 +114,7 @@ export declare function MyMixin>>(base: T //// [FinalClass.d.ts] import { MyBaseClass } from './BaseClass'; import { MyMixin } from './MixinClass'; -declare const MyExtendedClass_base: typeof MyBaseClass & (new (...args: any[]) => MyMixin); +declare const MyExtendedClass_base: typeof MyBaseClass & import("./BaseClass").Constructor; export declare class MyExtendedClass extends MyExtendedClass_base { extendedClassProperty: number; } diff --git a/tests/baselines/reference/exportClassExtendingIntersection.types b/tests/baselines/reference/exportClassExtendingIntersection.types index 5840c53a0567d..6dc2a7fdcf40e 100644 --- a/tests/baselines/reference/exportClassExtendingIntersection.types +++ b/tests/baselines/reference/exportClassExtendingIntersection.types @@ -52,12 +52,12 @@ import { MyBaseClass } from './BaseClass'; >MyBaseClass : typeof MyBaseClass import { MyMixin } from './MixinClass'; ->MyMixin : MyBaseClass>(base: T) => T & (new (...args: any[]) => MyMixin) +>MyMixin : >>(base: T) => T & import("tests/cases/compiler/BaseClass").Constructor export class MyExtendedClass extends MyMixin(MyBaseClass) { >MyExtendedClass : MyExtendedClass >MyMixin(MyBaseClass) : MyBaseClass & MyMixin ->MyMixin : MyBaseClass>(base: T) => T & (new (...args: any[]) => MyMixin) +>MyMixin : >>(base: T) => T & import("tests/cases/compiler/BaseClass").Constructor >MyBaseClass : typeof MyBaseClass extendedClassProperty: number; @@ -68,7 +68,7 @@ import { MyExtendedClass } from './FinalClass'; >MyExtendedClass : typeof MyExtendedClass import { MyMixin } from './MixinClass'; ->MyMixin : MyBaseClass>(base: T) => T & (new (...args: any[]) => MyMixin) +>MyMixin : >>(base: T) => T & import("tests/cases/compiler/BaseClass").Constructor const myExtendedClass = new MyExtendedClass('string'); >myExtendedClass : MyExtendedClass @@ -77,8 +77,8 @@ const myExtendedClass = new MyExtendedClass('string'); >'string' : "string" const AnotherMixedClass = MyMixin(MyExtendedClass); ->AnotherMixedClass : typeof MyExtendedClass & (new (...args: any[]) => MyMixin) ->MyMixin(MyExtendedClass) : typeof MyExtendedClass & (new (...args: any[]) => MyMixin) ->MyMixin : MyBaseClass>(base: T) => T & (new (...args: any[]) => MyMixin) +>AnotherMixedClass : typeof MyExtendedClass & import("tests/cases/compiler/BaseClass").Constructor +>MyMixin(MyExtendedClass) : typeof MyExtendedClass & import("tests/cases/compiler/BaseClass").Constructor +>MyMixin : >>(base: T) => T & import("tests/cases/compiler/BaseClass").Constructor >MyExtendedClass : typeof MyExtendedClass diff --git a/tests/baselines/reference/giant.types b/tests/baselines/reference/giant.types index b571ea79b8183..b67b9c1efd1eb 100644 --- a/tests/baselines/reference/giant.types +++ b/tests/baselines/reference/giant.types @@ -870,7 +870,7 @@ export interface eI { >pa2 : any } export module eM { ->eM : typeof eM +>eM : typeof import("tests/cases/compiler/giant").eM var V; >V : any diff --git a/tests/baselines/reference/importCallExpression3ESNext.types b/tests/baselines/reference/importCallExpression3ESNext.types index 4d81b4ec33115..416574f213ef2 100644 --- a/tests/baselines/reference/importCallExpression3ESNext.types +++ b/tests/baselines/reference/importCallExpression3ESNext.types @@ -13,12 +13,12 @@ async function foo() { class C extends (await import("./0")).B {} >C : C ->(await import("./0")).B : B +>(await import("./0")).B : import("tests/cases/conformance/dynamicImport/0").B >(await import("./0")) : typeof import("tests/cases/conformance/dynamicImport/0") >await import("./0") : typeof import("tests/cases/conformance/dynamicImport/0") >import("./0") : Promise >"./0" : "./0" ->B : typeof B +>B : typeof import("tests/cases/conformance/dynamicImport/0").B var c = new C(); >c : C diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt b/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt deleted file mode 100644 index 6c394c98bdfa1..0000000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -tests/cases/conformance/dynamicImport/1.ts(1,5): error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/dynamicImport/0"' from external module "tests/cases/conformance/dynamicImport/0" but cannot be named. - - -==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== - export function foo() { return "foo"; } - -==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== - var p1 = import("./0"); - ~~ -!!! error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/dynamicImport/0"' from external module "tests/cases/conformance/dynamicImport/0" but cannot be named. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit2.js b/tests/baselines/reference/importCallExpressionDeclarationEmit2.js index 7659e94ee810b..a83aa5b84c9dd 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit2.js +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit2.js @@ -14,3 +14,5 @@ var p1 = import("./0"); //// [0.d.ts] export declare function foo(): string; +//// [1.d.ts] +declare var p1: Promise; diff --git a/tests/baselines/reference/importCallExpressionInAMD3.types b/tests/baselines/reference/importCallExpressionInAMD3.types index 4d81b4ec33115..416574f213ef2 100644 --- a/tests/baselines/reference/importCallExpressionInAMD3.types +++ b/tests/baselines/reference/importCallExpressionInAMD3.types @@ -13,12 +13,12 @@ async function foo() { class C extends (await import("./0")).B {} >C : C ->(await import("./0")).B : B +>(await import("./0")).B : import("tests/cases/conformance/dynamicImport/0").B >(await import("./0")) : typeof import("tests/cases/conformance/dynamicImport/0") >await import("./0") : typeof import("tests/cases/conformance/dynamicImport/0") >import("./0") : Promise >"./0" : "./0" ->B : typeof B +>B : typeof import("tests/cases/conformance/dynamicImport/0").B var c = new C(); >c : C diff --git a/tests/baselines/reference/importCallExpressionInCJS4.types b/tests/baselines/reference/importCallExpressionInCJS4.types index 4d81b4ec33115..416574f213ef2 100644 --- a/tests/baselines/reference/importCallExpressionInCJS4.types +++ b/tests/baselines/reference/importCallExpressionInCJS4.types @@ -13,12 +13,12 @@ async function foo() { class C extends (await import("./0")).B {} >C : C ->(await import("./0")).B : B +>(await import("./0")).B : import("tests/cases/conformance/dynamicImport/0").B >(await import("./0")) : typeof import("tests/cases/conformance/dynamicImport/0") >await import("./0") : typeof import("tests/cases/conformance/dynamicImport/0") >import("./0") : Promise >"./0" : "./0" ->B : typeof B +>B : typeof import("tests/cases/conformance/dynamicImport/0").B var c = new C(); >c : C diff --git a/tests/baselines/reference/importCallExpressionInSystem3.types b/tests/baselines/reference/importCallExpressionInSystem3.types index 4d81b4ec33115..416574f213ef2 100644 --- a/tests/baselines/reference/importCallExpressionInSystem3.types +++ b/tests/baselines/reference/importCallExpressionInSystem3.types @@ -13,12 +13,12 @@ async function foo() { class C extends (await import("./0")).B {} >C : C ->(await import("./0")).B : B +>(await import("./0")).B : import("tests/cases/conformance/dynamicImport/0").B >(await import("./0")) : typeof import("tests/cases/conformance/dynamicImport/0") >await import("./0") : typeof import("tests/cases/conformance/dynamicImport/0") >import("./0") : Promise >"./0" : "./0" ->B : typeof B +>B : typeof import("tests/cases/conformance/dynamicImport/0").B var c = new C(); >c : C diff --git a/tests/baselines/reference/importCallExpressionInUMD3.types b/tests/baselines/reference/importCallExpressionInUMD3.types index 4d81b4ec33115..416574f213ef2 100644 --- a/tests/baselines/reference/importCallExpressionInUMD3.types +++ b/tests/baselines/reference/importCallExpressionInUMD3.types @@ -13,12 +13,12 @@ async function foo() { class C extends (await import("./0")).B {} >C : C ->(await import("./0")).B : B +>(await import("./0")).B : import("tests/cases/conformance/dynamicImport/0").B >(await import("./0")) : typeof import("tests/cases/conformance/dynamicImport/0") >await import("./0") : typeof import("tests/cases/conformance/dynamicImport/0") >import("./0") : Promise >"./0" : "./0" ->B : typeof B +>B : typeof import("tests/cases/conformance/dynamicImport/0").B var c = new C(); >c : C diff --git a/tests/baselines/reference/importShouldNotBeElidedInDeclarationEmit.js b/tests/baselines/reference/importShouldNotBeElidedInDeclarationEmit.js index a1316dbdd4640..bb453e398b28b 100644 --- a/tests/baselines/reference/importShouldNotBeElidedInDeclarationEmit.js +++ b/tests/baselines/reference/importShouldNotBeElidedInDeclarationEmit.js @@ -21,6 +21,4 @@ exports.thing = umd_1.makeThing(); //// [index.d.ts] -export declare const thing: { - a: number; -}; +export declare const thing: import("./node_modules/umd").Thing; diff --git a/tests/baselines/reference/importShouldNotBeElidedInDeclarationEmit.types b/tests/baselines/reference/importShouldNotBeElidedInDeclarationEmit.types index c12cd511cb9d9..c0db43ab66063 100644 --- a/tests/baselines/reference/importShouldNotBeElidedInDeclarationEmit.types +++ b/tests/baselines/reference/importShouldNotBeElidedInDeclarationEmit.types @@ -15,10 +15,10 @@ export declare function makeThing(): Thing; === tests/cases/compiler/index.ts === import { makeThing } from "umd"; ->makeThing : () => { a: number; } +>makeThing : () => import("tests/cases/compiler/node_modules/umd").Thing export const thing = makeThing(); ->thing : { a: number; } ->makeThing() : { a: number; } ->makeThing : () => { a: number; } +>thing : import("tests/cases/compiler/node_modules/umd").Thing +>makeThing() : import("tests/cases/compiler/node_modules/umd").Thing +>makeThing : () => import("tests/cases/compiler/node_modules/umd").Thing diff --git a/tests/baselines/reference/localTypes5.types b/tests/baselines/reference/localTypes5.types index 54e28d35a32dc..abafad755f476 100644 --- a/tests/baselines/reference/localTypes5.types +++ b/tests/baselines/reference/localTypes5.types @@ -1,18 +1,18 @@ === tests/cases/conformance/types/localTypes/localTypes5.ts === function foo() { ->foo : () => X.m..Y +>foo : () => X.m.(Anonymous function).Y >A : A class X { >X : X m() { ->m : () => .Y +>m : () => (Anonymous function).Y >B : B >C : C return (function () { ->(function () { class Y { } return new Y(); })() : .Y +>(function () { class Y { } return new Y(); })() : (Anonymous function).Y >(function () { class Y { } return new Y(); }) : () => Y >function () { class Y { } return new Y(); } : () => Y >D : D @@ -35,13 +35,13 @@ function foo() { >X : typeof X return x.m(); ->x.m() : X.m..Y ->x.m : () => X.m..Y +>x.m() : X.m.(Anonymous function).Y +>x.m : () => X.m.(Anonymous function).Y >x : X ->m : () => X.m..Y +>m : () => X.m.(Anonymous function).Y } var x = foo(); ->x : foo.X.m..Y ->foo() : foo.X.m..Y ->foo : () => X.m..Y +>x : foo.X.m.(Anonymous function).Y +>foo() : foo.X.m.(Anonymous function).Y +>foo : () => X.m.(Anonymous function).Y diff --git a/tests/baselines/reference/mergedDeclarationExports.types b/tests/baselines/reference/mergedDeclarationExports.types index 2f30831c84b73..1292483830bc3 100644 --- a/tests/baselines/reference/mergedDeclarationExports.types +++ b/tests/baselines/reference/mergedDeclarationExports.types @@ -33,7 +33,7 @@ interface d {} >d : d export class d {} ->d : d +>d : import("tests/cases/compiler/mergedDeclarationExports").d // both namespaces namespace N { } diff --git a/tests/baselines/reference/mixinClassesAnnotated.types b/tests/baselines/reference/mixinClassesAnnotated.types index 9d30171e3d891..aba1934a21184 100644 --- a/tests/baselines/reference/mixinClassesAnnotated.types +++ b/tests/baselines/reference/mixinClassesAnnotated.types @@ -51,7 +51,7 @@ const Printable = >(superClass: T): ConstructorT : T class extends superClass { ->class extends superClass { static message = "hello"; print() { const output = this.x + "," + this.y; } } : { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); message: string; } & T +>class extends superClass { static message = "hello"; print() { const output = this.x + "," + this.y; } } : { new (...args: any[]): (Anonymous class); prototype: Printable.(Anonymous class); message: string; } & T >superClass : Base static message = "hello"; diff --git a/tests/baselines/reference/mixinClassesAnonymous.types b/tests/baselines/reference/mixinClassesAnonymous.types index 516b15af2f351..2d9ef464172b7 100644 --- a/tests/baselines/reference/mixinClassesAnonymous.types +++ b/tests/baselines/reference/mixinClassesAnonymous.types @@ -31,14 +31,14 @@ class Derived extends Base { } const Printable = >(superClass: T) => class extends superClass { ->Printable : >(superClass: T) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); message: string; } & T ->>(superClass: T) => class extends superClass { static message = "hello"; print() { const output = this.x + "," + this.y; }} : >(superClass: T) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); message: string; } & T +>Printable : >(superClass: T) => { new (...args: any[]): (Anonymous class); prototype: Printable.(Anonymous class); message: string; } & T +>>(superClass: T) => class extends superClass { static message = "hello"; print() { const output = this.x + "," + this.y; }} : >(superClass: T) => { new (...args: any[]): (Anonymous class); prototype: Printable.(Anonymous class); message: string; } & T >T : T >Constructor : Constructor >Base : Base >superClass : T >T : T ->class extends superClass { static message = "hello"; print() { const output = this.x + "," + this.y; }} : { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); message: string; } & T +>class extends superClass { static message = "hello"; print() { const output = this.x + "," + this.y; }} : { new (...args: any[]): (Anonymous class); prototype: Printable.(Anonymous class); message: string; } & T >superClass : Base static message = "hello"; @@ -104,16 +104,16 @@ const Thing1 = Tagged(Derived); >Derived : typeof Derived const Thing2 = Tagged(Printable(Derived)); ->Thing2 : { new (...args: any[]): Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived ->Tagged(Printable(Derived)) : { new (...args: any[]): Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived +>Thing2 : { new (...args: any[]): Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived +>Tagged(Printable(Derived)) : { new (...args: any[]): Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived >Tagged : >(superClass: T) => { new (...args: any[]): C; prototype: Tagged.C; } & T ->Printable(Derived) : { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived ->Printable : >(superClass: T) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); message: string; } & T +>Printable(Derived) : { new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived +>Printable : >(superClass: T) => { new (...args: any[]): (Anonymous class); prototype: Printable.(Anonymous class); message: string; } & T >Derived : typeof Derived Thing2.message; >Thing2.message : string ->Thing2 : { new (...args: any[]): Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived +>Thing2 : { new (...args: any[]): Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived >message : string function f1() { @@ -142,40 +142,40 @@ function f2() { >f2 : () => void const thing = new Thing2(1, 2, 3); ->thing : Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C & .(Anonymous class) & Derived ->new Thing2(1, 2, 3) : Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C & .(Anonymous class) & Derived ->Thing2 : { new (...args: any[]): Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived +>thing : Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C & Printable.(Anonymous class) & Derived +>new Thing2(1, 2, 3) : Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C & Printable.(Anonymous class) & Derived +>Thing2 : { new (...args: any[]): Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived >1 : 1 >2 : 2 >3 : 3 thing.x; >thing.x : number ->thing : Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C & .(Anonymous class) & Derived +>thing : Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C & Printable.(Anonymous class) & Derived >x : number thing._tag; >thing._tag : string ->thing : Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C & .(Anonymous class) & Derived +>thing : Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C & Printable.(Anonymous class) & Derived >_tag : string thing.print(); >thing.print() : void >thing.print : () => void ->thing : Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C & .(Anonymous class) & Derived +>thing : Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C & Printable.(Anonymous class) & Derived >print : () => void } class Thing3 extends Thing2 { >Thing3 : Thing3 ->Thing2 : Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C & .(Anonymous class) & Derived +>Thing2 : Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C & Printable.(Anonymous class) & Derived constructor(tag: string) { >tag : string super(10, 20, 30); >super(10, 20, 30) : void ->super : { new (...args: any[]): Tagged<{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); message: string; } & typeof Derived +>super : { new (...args: any[]): Tagged<{ new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived>.C; prototype: Tagged.C; } & { new (...args: any[]): Printable.(Anonymous class); prototype: Printable.(Anonymous class); message: string; } & typeof Derived >10 : 10 >20 : 20 >30 : 30 @@ -201,15 +201,15 @@ class Thing3 extends Thing2 { // Repro from #13805 const Timestamped = >(Base: CT) => { ->Timestamped : >(Base: CT) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & CT ->>(Base: CT) => { return class extends Base { timestamp = new Date(); };} : >(Base: CT) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & CT +>Timestamped : >(Base: CT) => { new (...args: any[]): (Anonymous class); prototype: Timestamped.(Anonymous class); } & CT +>>(Base: CT) => { return class extends Base { timestamp = new Date(); };} : >(Base: CT) => { new (...args: any[]): (Anonymous class); prototype: Timestamped.(Anonymous class); } & CT >CT : CT >Constructor : Constructor >Base : CT >CT : CT return class extends Base { ->class extends Base { timestamp = new Date(); } : { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & CT +>class extends Base { timestamp = new Date(); } : { new (...args: any[]): (Anonymous class); prototype: Timestamped.(Anonymous class); } & CT >Base : object timestamp = new Date(); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports1.types b/tests/baselines/reference/moduleAugmentationImportsAndExports1.types index 8315676d230b1..974a2046b2061 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports1.types +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports1.types @@ -52,9 +52,9 @@ let a: A; let b = a.foo().n; >b : number >a.foo().n : number ->a.foo() : B ->a.foo : () => B +>a.foo() : import("tests/cases/compiler/f2").B +>a.foo : () => import("tests/cases/compiler/f2").B >a : A ->foo : () => B +>foo : () => import("tests/cases/compiler/f2").B >n : number diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports4.types b/tests/baselines/reference/moduleAugmentationImportsAndExports4.types index 771731ecdb38c..d519ed0933a10 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports4.types +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports4.types @@ -81,10 +81,10 @@ let a: A; let b = a.foo().n; >b : number >a.foo().n : number ->a.foo() : B ->a.foo : () => B +>a.foo() : import("tests/cases/compiler/f2").B +>a.foo : () => import("tests/cases/compiler/f2").B >a : A ->foo : () => B +>foo : () => import("tests/cases/compiler/f2").B >n : number let c = a.bar().a; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports5.types b/tests/baselines/reference/moduleAugmentationImportsAndExports5.types index 771731ecdb38c..d519ed0933a10 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports5.types +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports5.types @@ -81,10 +81,10 @@ let a: A; let b = a.foo().n; >b : number >a.foo().n : number ->a.foo() : B ->a.foo : () => B +>a.foo() : import("tests/cases/compiler/f2").B +>a.foo : () => import("tests/cases/compiler/f2").B >a : A ->foo : () => B +>foo : () => import("tests/cases/compiler/f2").B >n : number let c = a.bar().a; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports6.types b/tests/baselines/reference/moduleAugmentationImportsAndExports6.types index 4457aefb78dc2..d2778702f588c 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports6.types +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports6.types @@ -81,10 +81,10 @@ let a: A; let b = a.foo().n; >b : number >a.foo().n : number ->a.foo() : B ->a.foo : () => B +>a.foo() : import("tests/cases/compiler/f2").B +>a.foo : () => import("tests/cases/compiler/f2").B >a : A ->foo : () => B +>foo : () => import("tests/cases/compiler/f2").B >n : number let c = a.bar().a; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule1.types b/tests/baselines/reference/moduleAugmentationInAmbientModule1.types index 428df933b131d..478b91f4cefeb 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule1.types +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule1.types @@ -10,10 +10,10 @@ let x: Observable; x.foo().x; >x.foo().x : number ->x.foo() : Cls ->x.foo : () => Cls +>x.foo() : import("M").Cls +>x.foo : () => import("M").Cls >x : Observable ->foo : () => Cls +>foo : () => import("M").Cls >x : number === tests/cases/compiler/O.d.ts === diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule2.types b/tests/baselines/reference/moduleAugmentationInAmbientModule2.types index 190a8d568b3c6..e61bc65d71d13 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule2.types +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule2.types @@ -11,10 +11,10 @@ let x: Observable; x.foo().x; >x.foo().x : number ->x.foo() : Cls ->x.foo : () => Cls +>x.foo() : import("M").Cls +>x.foo : () => import("M").Cls >x : Observable ->foo : () => Cls +>foo : () => import("M").Cls >x : number === tests/cases/compiler/O.d.ts === diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule3.types b/tests/baselines/reference/moduleAugmentationInAmbientModule3.types index 06efc3c4e869a..373ef3a4e9a23 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule3.types +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule3.types @@ -11,18 +11,18 @@ let x: Observable; x.foo().x; >x.foo().x : number ->x.foo() : Cls ->x.foo : () => Cls +>x.foo() : import("M").Cls +>x.foo : () => import("M").Cls >x : Observable ->foo : () => Cls +>foo : () => import("M").Cls >x : number x.foo2().x2; >x.foo2().x2 : number ->x.foo2() : Cls2 ->x.foo2 : () => Cls2 +>x.foo2() : import("Map").Cls2 +>x.foo2 : () => import("Map").Cls2 >x : Observable ->foo2 : () => Cls2 +>foo2 : () => import("Map").Cls2 >x2 : number === tests/cases/compiler/O.d.ts === diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule4.types b/tests/baselines/reference/moduleAugmentationInAmbientModule4.types index bdb2501ac8c0a..c9849455be2f6 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule4.types +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule4.types @@ -12,18 +12,18 @@ let x: Observable; x.foo().x; >x.foo().x : number ->x.foo() : Cls ->x.foo : () => Cls +>x.foo() : import("M").Cls +>x.foo : () => import("M").Cls >x : Observable ->foo : () => Cls +>foo : () => import("M").Cls >x : number x.foo2().x2; >x.foo2().x2 : number ->x.foo2() : Cls2 ->x.foo2 : () => Cls2 +>x.foo2() : import("Map").Cls2 +>x.foo2 : () => import("Map").Cls2 >x : Observable ->foo2 : () => Cls2 +>foo2 : () => import("Map").Cls2 >x2 : number === tests/cases/compiler/O.d.ts === diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule5.types b/tests/baselines/reference/moduleAugmentationInAmbientModule5.types index 82649bd9a6b7c..94900ecb76401 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule5.types +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule5.types @@ -10,10 +10,10 @@ let x = [1]; let y = x.getA().x; >y : number >x.getA().x : number ->x.getA() : A ->x.getA : () => A +>x.getA() : import("A").A +>x.getA : () => import("A").A >x : number[] ->getA : () => A +>getA : () => import("A").A >x : number === tests/cases/compiler/array.d.ts === diff --git a/tests/baselines/reference/moduleAugmentationsBundledOutput1.types b/tests/baselines/reference/moduleAugmentationsBundledOutput1.types index 6c5ebdccdc34b..6811e5e729efe 100644 --- a/tests/baselines/reference/moduleAugmentationsBundledOutput1.types +++ b/tests/baselines/reference/moduleAugmentationsBundledOutput1.types @@ -150,10 +150,10 @@ c.baz1().x.toExponential(); >c.baz1().x.toExponential() : string >c.baz1().x.toExponential : (fractionDigits?: number) => string >c.baz1().x : number ->c.baz1() : C1 ->c.baz1 : () => C1 +>c.baz1() : import("tests/cases/compiler/m3").C1 +>c.baz1 : () => import("tests/cases/compiler/m3").C1 >c : Cls ->baz1 : () => C1 +>baz1 : () => import("tests/cases/compiler/m3").C1 >x : number >toExponential : (fractionDigits?: number) => string @@ -161,10 +161,10 @@ c.baz2().x.toLowerCase(); >c.baz2().x.toLowerCase() : string >c.baz2().x.toLowerCase : () => string >c.baz2().x : string ->c.baz2() : C2 ->c.baz2 : () => C2 +>c.baz2() : import("tests/cases/compiler/m3").C2 +>c.baz2 : () => import("tests/cases/compiler/m3").C2 >c : Cls ->baz2 : () => C2 +>baz2 : () => import("tests/cases/compiler/m3").C2 >x : string >toLowerCase : () => string diff --git a/tests/baselines/reference/moduleAugmentationsImports1.types b/tests/baselines/reference/moduleAugmentationsImports1.types index 9df5d5b72d4c9..c935a8c1265a0 100644 --- a/tests/baselines/reference/moduleAugmentationsImports1.types +++ b/tests/baselines/reference/moduleAugmentationsImports1.types @@ -87,10 +87,10 @@ let b = a.getB().x.toFixed(); >a.getB().x.toFixed() : string >a.getB().x.toFixed : (fractionDigits?: number) => string >a.getB().x : number ->a.getB() : B ->a.getB : () => B +>a.getB() : import("tests/cases/compiler/b").B +>a.getB : () => import("tests/cases/compiler/b").B >a : A ->getB : () => B +>getB : () => import("tests/cases/compiler/b").B >x : number >toFixed : (fractionDigits?: number) => string @@ -99,10 +99,10 @@ let c = a.getCls().y.toLowerCase(); >a.getCls().y.toLowerCase() : string >a.getCls().y.toLowerCase : () => string >a.getCls().y : string ->a.getCls() : Cls ->a.getCls : () => Cls +>a.getCls() : import("C").Cls +>a.getCls : () => import("C").Cls >a : A ->getCls : () => Cls +>getCls : () => import("C").Cls >y : string >toLowerCase : () => string diff --git a/tests/baselines/reference/moduleAugmentationsImports2.types b/tests/baselines/reference/moduleAugmentationsImports2.types index c94186c670adc..6dc93399b4892 100644 --- a/tests/baselines/reference/moduleAugmentationsImports2.types +++ b/tests/baselines/reference/moduleAugmentationsImports2.types @@ -92,10 +92,10 @@ let b = a.getB().x.toFixed(); >a.getB().x.toFixed() : string >a.getB().x.toFixed : (fractionDigits?: number) => string >a.getB().x : number ->a.getB() : B ->a.getB : () => B +>a.getB() : import("tests/cases/compiler/b").B +>a.getB : () => import("tests/cases/compiler/b").B >a : A ->getB : () => B +>getB : () => import("tests/cases/compiler/b").B >x : number >toFixed : (fractionDigits?: number) => string @@ -104,10 +104,10 @@ let c = a.getCls().y.toLowerCase(); >a.getCls().y.toLowerCase() : string >a.getCls().y.toLowerCase : () => string >a.getCls().y : string ->a.getCls() : Cls ->a.getCls : () => Cls +>a.getCls() : import("C").Cls +>a.getCls : () => import("C").Cls >a : A ->getCls : () => Cls +>getCls : () => import("C").Cls >y : string >toLowerCase : () => string diff --git a/tests/baselines/reference/moduleAugmentationsImports3.types b/tests/baselines/reference/moduleAugmentationsImports3.types index 549885a3e0db8..a867ee963d2dc 100644 --- a/tests/baselines/reference/moduleAugmentationsImports3.types +++ b/tests/baselines/reference/moduleAugmentationsImports3.types @@ -15,10 +15,10 @@ let b = a.getB().x.toFixed(); >a.getB().x.toFixed() : string >a.getB().x.toFixed : (fractionDigits?: number) => string >a.getB().x : number ->a.getB() : B ->a.getB : () => B +>a.getB() : import("tests/cases/compiler/b").B +>a.getB : () => import("tests/cases/compiler/b").B >a : A ->getB : () => B +>getB : () => import("tests/cases/compiler/b").B >x : number >toFixed : (fractionDigits?: number) => string @@ -27,10 +27,10 @@ let c = a.getCls().y.toLowerCase(); >a.getCls().y.toLowerCase() : string >a.getCls().y.toLowerCase : () => string >a.getCls().y : string ->a.getCls() : Cls ->a.getCls : () => Cls +>a.getCls() : import("C").Cls +>a.getCls : () => import("C").Cls >a : A ->getCls : () => Cls +>getCls : () => import("C").Cls >y : string >toLowerCase : () => string diff --git a/tests/baselines/reference/moduleAugmentationsImports4.types b/tests/baselines/reference/moduleAugmentationsImports4.types index 530cc5d561915..6fc1802dec1ee 100644 --- a/tests/baselines/reference/moduleAugmentationsImports4.types +++ b/tests/baselines/reference/moduleAugmentationsImports4.types @@ -16,10 +16,10 @@ let b = a.getB().x.toFixed(); >a.getB().x.toFixed() : string >a.getB().x.toFixed : (fractionDigits?: number) => string >a.getB().x : number ->a.getB() : B ->a.getB : () => B +>a.getB() : import("tests/cases/compiler/b").B +>a.getB : () => import("tests/cases/compiler/b").B >a : A ->getB : () => B +>getB : () => import("tests/cases/compiler/b").B >x : number >toFixed : (fractionDigits?: number) => string @@ -28,10 +28,10 @@ let c = a.getCls().y.toLowerCase(); >a.getCls().y.toLowerCase() : string >a.getCls().y.toLowerCase : () => string >a.getCls().y : string ->a.getCls() : Cls ->a.getCls : () => Cls +>a.getCls() : import("C").Cls +>a.getCls : () => import("C").Cls >a : A ->getCls : () => Cls +>getCls : () => import("C").Cls >y : string >toLowerCase : () => string diff --git a/tests/baselines/reference/moduleDuplicateIdentifiers.types b/tests/baselines/reference/moduleDuplicateIdentifiers.types index ec95d6bbf9dce..4019cf50d7ed8 100644 --- a/tests/baselines/reference/moduleDuplicateIdentifiers.types +++ b/tests/baselines/reference/moduleDuplicateIdentifiers.types @@ -46,7 +46,7 @@ export class Kettle { } export class Kettle { // Should error ->Kettle : Kettle +>Kettle : import("tests/cases/compiler/moduleDuplicateIdentifiers").Kettle member2 = 42; >member2 : number diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_preserveSymlinks.errors.txt b/tests/baselines/reference/moduleResolutionWithSymlinks_preserveSymlinks.errors.txt index b6459ad491089..3cfa184d7f5da 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_preserveSymlinks.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_preserveSymlinks.errors.txt @@ -1,4 +1,4 @@ -/app/app.ts(9,1): error TS2719: Type 'C' is not assignable to type 'C'. Two different types with this name exist, but they are unrelated. +/app/app.ts(9,1): error TS2322: Type 'import("/app/node_modules/linked2/index").C' is not assignable to type 'import("/app/node_modules/linked/index").C'. Types have separate declarations of a private property 'x'. @@ -13,8 +13,8 @@ // Should fail. We no longer resolve any symlinks. x = new C2(); ~ -!!! error TS2719: Type 'C' is not assignable to type 'C'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Types have separate declarations of a private property 'x'. +!!! error TS2322: Type 'import("/app/node_modules/linked2/index").C' is not assignable to type 'import("/app/node_modules/linked/index").C'. +!!! error TS2322: Types have separate declarations of a private property 'x'. ==== /linked/index.d.ts (0 errors) ==== export { real } from "real"; diff --git a/tests/baselines/reference/multipleDefaultExports01.types b/tests/baselines/reference/multipleDefaultExports01.types index 175296722ef85..3b34a7a5cc8ec 100644 --- a/tests/baselines/reference/multipleDefaultExports01.types +++ b/tests/baselines/reference/multipleDefaultExports01.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/modules/m1.ts === export default class foo { ->foo : foo +>foo : import("tests/cases/conformance/es6/modules/m1").default } diff --git a/tests/baselines/reference/multipleDefaultExports03.types b/tests/baselines/reference/multipleDefaultExports03.types index 9b03e67897a4a..a9d31bad4bb01 100644 --- a/tests/baselines/reference/multipleDefaultExports03.types +++ b/tests/baselines/reference/multipleDefaultExports03.types @@ -4,5 +4,5 @@ export default class C { } export default class C { ->C : C +>C : import("tests/cases/conformance/es6/modules/multipleDefaultExports03").default } diff --git a/tests/baselines/reference/multipleExportDefault3.types b/tests/baselines/reference/multipleExportDefault3.types index d50c49edccd24..9e9eb39ce8434 100644 --- a/tests/baselines/reference/multipleExportDefault3.types +++ b/tests/baselines/reference/multipleExportDefault3.types @@ -9,6 +9,6 @@ export default { }; export default class C { } ->C : C +>C : import("tests/cases/conformance/externalModules/multipleExportDefault3").default diff --git a/tests/baselines/reference/multipleExportDefault5.types b/tests/baselines/reference/multipleExportDefault5.types index 838a145bfe7e5..ab7b3ed9b0cc4 100644 --- a/tests/baselines/reference/multipleExportDefault5.types +++ b/tests/baselines/reference/multipleExportDefault5.types @@ -3,5 +3,5 @@ export default function bar() { } >bar : () => void export default class C {} ->C : C +>C : import("tests/cases/conformance/externalModules/multipleExportDefault5").default diff --git a/tests/baselines/reference/overrideBaseIntersectionMethod.types b/tests/baselines/reference/overrideBaseIntersectionMethod.types index b5412b18c0707..da516abe3d427 100644 --- a/tests/baselines/reference/overrideBaseIntersectionMethod.types +++ b/tests/baselines/reference/overrideBaseIntersectionMethod.types @@ -8,14 +8,14 @@ type Constructor = new (...args: any[]) => T; >T : T const WithLocation = >(Base: T) => class extends Base { ->WithLocation : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & T ->>(Base: T) => class extends Base { getLocation(): [number, number] { const [x,y] = super.getLocation(); return [this.x | x, this.y | y]; }} : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & T +>WithLocation : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithLocation.(Anonymous class); } & T +>>(Base: T) => class extends Base { getLocation(): [number, number] { const [x,y] = super.getLocation(); return [this.x | x, this.y | y]; }} : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithLocation.(Anonymous class); } & T >T : T >Constructor : Constructor >Point : Point >Base : T >T : T ->class extends Base { getLocation(): [number, number] { const [x,y] = super.getLocation(); return [this.x | x, this.y | y]; }} : { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & T +>class extends Base { getLocation(): [number, number] { const [x,y] = super.getLocation(); return [this.x | x, this.y | y]; }} : { new (...args: any[]): (Anonymous class); prototype: WithLocation.(Anonymous class); } & T >Base : Point getLocation(): [number, number] { @@ -63,8 +63,8 @@ class Point { class Foo extends WithLocation(Point) { >Foo : Foo ->WithLocation(Point) : .(Anonymous class) & Point ->WithLocation : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & T +>WithLocation(Point) : WithLocation.(Anonymous class) & Point +>WithLocation : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithLocation.(Anonymous class); } & T >Point : typeof Point calculate() { @@ -85,7 +85,7 @@ class Foo extends WithLocation(Point) { return super.getLocation() >super.getLocation() : [number, number] >super.getLocation : () => [number, number] ->super : .(Anonymous class) & Point +>super : WithLocation.(Anonymous class) & Point >getLocation : () => [number, number] } whereAmI() { diff --git a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.errors.txt b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.errors.txt deleted file mode 100644 index f2419b360d622..0000000000000 --- a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.errors.txt +++ /dev/null @@ -1,160 +0,0 @@ -tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts(3,16): error TS4038: Return type of public static getter 'myPublicStaticMethod' from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts(9,9): error TS4041: Return type of public getter 'myPublicMethod' from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts(15,16): error TS4038: Return type of public static getter 'myPublicStaticMethod1' from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts(21,9): error TS4041: Return type of public getter 'myPublicMethod1' from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts(57,16): error TS4038: Return type of public static getter 'myPublicStaticMethod' from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts(60,9): error TS4041: Return type of public getter 'myPublicMethod' from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts(63,16): error TS4038: Return type of public static getter 'myPublicStaticMethod1' from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts(66,9): error TS4041: Return type of public getter 'myPublicMethod1' from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - - -==== tests/cases/compiler/privacyCannotNameAccessorDeclFile_consumer.ts (8 errors) ==== - import exporter = require("./privacyCannotNameAccessorDeclFile_exporter"); - export class publicClassWithWithPrivateGetAccessorTypes { - static get myPublicStaticMethod() { // Error - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS4038: Return type of public static getter 'myPublicStaticMethod' from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget1(); - } - private static get myPrivateStaticMethod() { - return exporter.createExportedWidget1(); - } - get myPublicMethod() { // Error - ~~~~~~~~~~~~~~ -!!! error TS4041: Return type of public getter 'myPublicMethod' from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget1(); - } - private get myPrivateMethod() { - return exporter.createExportedWidget1(); - } - static get myPublicStaticMethod1() { // Error - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4038: Return type of public static getter 'myPublicStaticMethod1' from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget3(); - } - private static get myPrivateStaticMethod1() { - return exporter.createExportedWidget3(); - } - get myPublicMethod1() { // Error - ~~~~~~~~~~~~~~~ -!!! error TS4041: Return type of public getter 'myPublicMethod1' from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget3(); - } - private get myPrivateMethod1() { - return exporter.createExportedWidget3(); - } - } - - class privateClassWithWithPrivateGetAccessorTypes { - static get myPublicStaticMethod() { - return exporter.createExportedWidget1(); - } - private static get myPrivateStaticMethod() { - return exporter.createExportedWidget1(); - } - get myPublicMethod() { - return exporter.createExportedWidget1(); - } - private get myPrivateMethod() { - return exporter.createExportedWidget1(); - } - static get myPublicStaticMethod1() { - return exporter.createExportedWidget3(); - } - private static get myPrivateStaticMethod1() { - return exporter.createExportedWidget3(); - } - get myPublicMethod1() { - return exporter.createExportedWidget3(); - } - private get myPrivateMethod1() { - return exporter.createExportedWidget3(); - } - } - - export class publicClassWithPrivateModuleGetAccessorTypes { - static get myPublicStaticMethod() { // Error - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS4038: Return type of public static getter 'myPublicStaticMethod' from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget2(); - } - get myPublicMethod() { // Error - ~~~~~~~~~~~~~~ -!!! error TS4041: Return type of public getter 'myPublicMethod' from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget2(); - } - static get myPublicStaticMethod1() { // Error - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4038: Return type of public static getter 'myPublicStaticMethod1' from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget4(); - } - get myPublicMethod1() { // Error - ~~~~~~~~~~~~~~~ -!!! error TS4041: Return type of public getter 'myPublicMethod1' from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget4(); - } - } - - class privateClassWithPrivateModuleGetAccessorTypes { - static get myPublicStaticMethod() { - return exporter.createExportedWidget2(); - } - get myPublicMethod() { - return exporter.createExportedWidget2(); - } - static get myPublicStaticMethod1() { - return exporter.createExportedWidget4(); - } - get myPublicMethod1() { - return exporter.createExportedWidget4(); - } - } -==== tests/cases/compiler/privacyCannotNameAccessorDeclFile_GlobalWidgets.ts (0 errors) ==== - declare module "GlobalWidgets" { - export class Widget3 { - name: string; - } - export function createWidget3(): Widget3; - - export module SpecializedGlobalWidget { - export class Widget4 { - name: string; - } - function createWidget4(): Widget4; - } - } - -==== tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets.ts (0 errors) ==== - export class Widget1 { - name = 'one'; - } - export function createWidget1() { - return new Widget1(); - } - - export module SpecializedWidget { - export class Widget2 { - name = 'one'; - } - export function createWidget2() { - return new Widget2(); - } - } - -==== tests/cases/compiler/privacyCannotNameAccessorDeclFile_exporter.ts (0 errors) ==== - /// - import Widgets = require("./privacyCannotNameAccessorDeclFile_Widgets"); - import Widgets1 = require("GlobalWidgets"); - export function createExportedWidget1() { - return Widgets.createWidget1(); - } - export function createExportedWidget2() { - return Widgets.SpecializedWidget.createWidget2(); - } - export function createExportedWidget3() { - return Widgets1.createWidget3(); - } - export function createExportedWidget4() { - return Widgets1.SpecializedGlobalWidget.createWidget4(); - } - \ No newline at end of file diff --git a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js index 16cc0f6924f86..42f7639986913 100644 --- a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js @@ -414,3 +414,21 @@ export declare function createExportedWidget1(): Widgets.Widget1; export declare function createExportedWidget2(): Widgets.SpecializedWidget.Widget2; export declare function createExportedWidget3(): Widgets1.Widget3; export declare function createExportedWidget4(): Widgets1.SpecializedGlobalWidget.Widget4; +//// [privacyCannotNameAccessorDeclFile_consumer.d.ts] +/// +export declare class publicClassWithWithPrivateGetAccessorTypes { + static readonly myPublicStaticMethod: import("./privacyCannotNameAccessorDeclFile_Widgets").Widget1; + private static readonly myPrivateStaticMethod; + readonly myPublicMethod: import("./privacyCannotNameAccessorDeclFile_Widgets").Widget1; + private readonly myPrivateMethod; + static readonly myPublicStaticMethod1: import("GlobalWidgets").Widget3; + private static readonly myPrivateStaticMethod1; + readonly myPublicMethod1: import("GlobalWidgets").Widget3; + private readonly myPrivateMethod1; +} +export declare class publicClassWithPrivateModuleGetAccessorTypes { + static readonly myPublicStaticMethod: import("./privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2; + readonly myPublicMethod: import("./privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2; + static readonly myPublicStaticMethod1: import("GlobalWidgets").SpecializedGlobalWidget.Widget4; + readonly myPublicMethod1: import("GlobalWidgets").SpecializedGlobalWidget.Widget4; +} diff --git a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.types b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.types index acff252dad755..bade274b3aa0d 100644 --- a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.types +++ b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.types @@ -6,76 +6,76 @@ export class publicClassWithWithPrivateGetAccessorTypes { >publicClassWithWithPrivateGetAccessorTypes : publicClassWithWithPrivateGetAccessorTypes static get myPublicStaticMethod() { // Error ->myPublicStaticMethod : Widget1 +>myPublicStaticMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 } private static get myPrivateStaticMethod() { ->myPrivateStaticMethod : Widget1 +>myPrivateStaticMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 } get myPublicMethod() { // Error ->myPublicMethod : Widget1 +>myPublicMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 } private get myPrivateMethod() { ->myPrivateMethod : Widget1 +>myPrivateMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 } static get myPublicStaticMethod1() { // Error ->myPublicStaticMethod1 : Widget3 +>myPublicStaticMethod1 : import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private static get myPrivateStaticMethod1() { ->myPrivateStaticMethod1 : Widget3 +>myPrivateStaticMethod1 : import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } get myPublicMethod1() { // Error ->myPublicMethod1 : Widget3 +>myPublicMethod1 : import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private get myPrivateMethod1() { ->myPrivateMethod1 : Widget3 +>myPrivateMethod1 : import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } } @@ -83,76 +83,76 @@ class privateClassWithWithPrivateGetAccessorTypes { >privateClassWithWithPrivateGetAccessorTypes : privateClassWithWithPrivateGetAccessorTypes static get myPublicStaticMethod() { ->myPublicStaticMethod : Widget1 +>myPublicStaticMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 } private static get myPrivateStaticMethod() { ->myPrivateStaticMethod : Widget1 +>myPrivateStaticMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 } get myPublicMethod() { ->myPublicMethod : Widget1 +>myPublicMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 } private get myPrivateMethod() { ->myPrivateMethod : Widget1 +>myPrivateMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").Widget1 } static get myPublicStaticMethod1() { ->myPublicStaticMethod1 : Widget3 +>myPublicStaticMethod1 : import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private static get myPrivateStaticMethod1() { ->myPrivateStaticMethod1 : Widget3 +>myPrivateStaticMethod1 : import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } get myPublicMethod1() { ->myPublicMethod1 : Widget3 +>myPublicMethod1 : import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private get myPrivateMethod1() { ->myPrivateMethod1 : Widget3 +>myPrivateMethod1 : import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } } @@ -160,40 +160,40 @@ export class publicClassWithPrivateModuleGetAccessorTypes { >publicClassWithPrivateModuleGetAccessorTypes : publicClassWithPrivateModuleGetAccessorTypes static get myPublicStaticMethod() { // Error ->myPublicStaticMethod : SpecializedWidget.Widget2 +>myPublicStaticMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 } get myPublicMethod() { // Error ->myPublicMethod : SpecializedWidget.Widget2 +>myPublicMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 } static get myPublicStaticMethod1() { // Error ->myPublicStaticMethod1 : SpecializedGlobalWidget.Widget4 +>myPublicStaticMethod1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } get myPublicMethod1() { // Error ->myPublicMethod1 : SpecializedGlobalWidget.Widget4 +>myPublicMethod1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } } @@ -201,40 +201,40 @@ class privateClassWithPrivateModuleGetAccessorTypes { >privateClassWithPrivateModuleGetAccessorTypes : privateClassWithPrivateModuleGetAccessorTypes static get myPublicStaticMethod() { ->myPublicStaticMethod : SpecializedWidget.Widget2 +>myPublicStaticMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 } get myPublicMethod() { ->myPublicMethod : SpecializedWidget.Widget2 +>myPublicMethod : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2 } static get myPublicStaticMethod1() { ->myPublicStaticMethod1 : SpecializedGlobalWidget.Widget4 +>myPublicStaticMethod1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } get myPublicMethod1() { ->myPublicMethod1 : SpecializedGlobalWidget.Widget4 +>myPublicMethod1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } } === tests/cases/compiler/privacyCannotNameAccessorDeclFile_GlobalWidgets.ts === diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.errors.txt b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.errors.txt deleted file mode 100644 index 0596281df4485..0000000000000 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.errors.txt +++ /dev/null @@ -1,135 +0,0 @@ -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(3,12): error TS4026: Public static property 'myPublicStaticProperty' of exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(5,5): error TS4029: Public property 'myPublicProperty' of exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(8,12): error TS4026: Public static property 'myPublicStaticProperty1' of exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(10,5): error TS4029: Public property 'myPublicProperty1' of exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(26,12): error TS4023: Exported variable 'publicVarWithPrivatePropertyTypes' has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(28,12): error TS4023: Exported variable 'publicVarWithPrivatePropertyTypes1' has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(32,12): error TS4026: Public static property 'myPublicStaticProperty' of exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(33,5): error TS4029: Public property 'myPublicProperty' of exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(34,12): error TS4026: Public static property 'myPublicStaticProperty1' of exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(35,5): error TS4029: Public property 'myPublicProperty1' of exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(37,12): error TS4023: Exported variable 'publicVarWithPrivateModulePropertyTypes' has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(38,12): error TS4023: Exported variable 'publicVarWithPrivateModulePropertyTypes1' has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - - -==== tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts (12 errors) ==== - import exporter = require("./privacyCannotNameVarTypeDeclFile_exporter"); - export class publicClassWithWithPrivatePropertyTypes { - static myPublicStaticProperty = exporter.createExportedWidget1(); // Error - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4026: Public static property 'myPublicStaticProperty' of exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. - private static myPrivateStaticProperty = exporter.createExportedWidget1(); - myPublicProperty = exporter.createExportedWidget1(); // Error - ~~~~~~~~~~~~~~~~ -!!! error TS4029: Public property 'myPublicProperty' of exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. - private myPrivateProperty = exporter.createExportedWidget1(); - - static myPublicStaticProperty1 = exporter.createExportedWidget3(); // Error - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4026: Public static property 'myPublicStaticProperty1' of exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - private static myPrivateStaticProperty1 = exporter.createExportedWidget3(); - myPublicProperty1 = exporter.createExportedWidget3(); // Error - ~~~~~~~~~~~~~~~~~ -!!! error TS4029: Public property 'myPublicProperty1' of exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - private myPrivateProperty1 = exporter.createExportedWidget3(); - } - - class privateClassWithWithPrivatePropertyTypes { - static myPublicStaticProperty = exporter.createExportedWidget1(); - private static myPrivateStaticProperty = exporter.createExportedWidget1(); - myPublicProperty = exporter.createExportedWidget1(); - private myPrivateProperty = exporter.createExportedWidget1(); - - static myPublicStaticProperty1 = exporter.createExportedWidget3(); - private static myPrivateStaticProperty1 = exporter.createExportedWidget3(); - myPublicProperty1 = exporter.createExportedWidget3(); - private myPrivateProperty1 = exporter.createExportedWidget3(); - } - - export var publicVarWithPrivatePropertyTypes= exporter.createExportedWidget1(); // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4023: Exported variable 'publicVarWithPrivatePropertyTypes' has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. - var privateVarWithPrivatePropertyTypes= exporter.createExportedWidget1(); - export var publicVarWithPrivatePropertyTypes1 = exporter.createExportedWidget3(); // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4023: Exported variable 'publicVarWithPrivatePropertyTypes1' has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - var privateVarWithPrivatePropertyTypes1 = exporter.createExportedWidget3(); - - export class publicClassWithPrivateModulePropertyTypes { - static myPublicStaticProperty= exporter.createExportedWidget2(); // Error - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4026: Public static property 'myPublicStaticProperty' of exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. - myPublicProperty = exporter.createExportedWidget2(); // Error - ~~~~~~~~~~~~~~~~ -!!! error TS4029: Public property 'myPublicProperty' of exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. - static myPublicStaticProperty1 = exporter.createExportedWidget4(); // Error - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4026: Public static property 'myPublicStaticProperty1' of exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - myPublicProperty1 = exporter.createExportedWidget4(); // Error - ~~~~~~~~~~~~~~~~~ -!!! error TS4029: Public property 'myPublicProperty1' of exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - } - export var publicVarWithPrivateModulePropertyTypes= exporter.createExportedWidget2(); // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4023: Exported variable 'publicVarWithPrivateModulePropertyTypes' has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named. - export var publicVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4023: Exported variable 'publicVarWithPrivateModulePropertyTypes1' has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - - class privateClassWithPrivateModulePropertyTypes { - static myPublicStaticProperty= exporter.createExportedWidget2(); - myPublicProperty= exporter.createExportedWidget2(); - static myPublicStaticProperty1 = exporter.createExportedWidget4(); - myPublicProperty1 = exporter.createExportedWidget4(); - } - var privateVarWithPrivateModulePropertyTypes= exporter.createExportedWidget2(); - var privateVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); -==== tests/cases/compiler/privacyCannotNameVarTypeDeclFile_GlobalWidgets.ts (0 errors) ==== - declare module "GlobalWidgets" { - export class Widget3 { - name: string; - } - export function createWidget3(): Widget3; - - export module SpecializedGlobalWidget { - export class Widget4 { - name: string; - } - function createWidget4(): Widget4; - } - } - -==== tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets.ts (0 errors) ==== - export class Widget1 { - name = 'one'; - } - export function createWidget1() { - return new Widget1(); - } - - export module SpecializedWidget { - export class Widget2 { - name = 'one'; - } - export function createWidget2() { - return new Widget2(); - } - } - -==== tests/cases/compiler/privacyCannotNameVarTypeDeclFile_exporter.ts (0 errors) ==== - /// - import Widgets = require("./privacyCannotNameVarTypeDeclFile_Widgets"); - import Widgets1 = require("GlobalWidgets"); - export function createExportedWidget1() { - return Widgets.createWidget1(); - } - export function createExportedWidget2() { - return Widgets.SpecializedWidget.createWidget2(); - } - export function createExportedWidget3() { - return Widgets1.createWidget3(); - } - export function createExportedWidget4() { - return Widgets1.SpecializedGlobalWidget.createWidget4(); - } - \ No newline at end of file diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js index ba519bb081a59..80c9e0157ee49 100644 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js @@ -241,3 +241,25 @@ export declare function createExportedWidget1(): Widgets.Widget1; export declare function createExportedWidget2(): Widgets.SpecializedWidget.Widget2; export declare function createExportedWidget3(): Widgets1.Widget3; export declare function createExportedWidget4(): Widgets1.SpecializedGlobalWidget.Widget4; +//// [privacyCannotNameVarTypeDeclFile_consumer.d.ts] +/// +export declare class publicClassWithWithPrivatePropertyTypes { + static myPublicStaticProperty: import("./privacyCannotNameVarTypeDeclFile_Widgets").Widget1; + private static myPrivateStaticProperty; + myPublicProperty: import("./privacyCannotNameVarTypeDeclFile_Widgets").Widget1; + private myPrivateProperty; + static myPublicStaticProperty1: import("GlobalWidgets").Widget3; + private static myPrivateStaticProperty1; + myPublicProperty1: import("GlobalWidgets").Widget3; + private myPrivateProperty1; +} +export declare var publicVarWithPrivatePropertyTypes: import("./privacyCannotNameVarTypeDeclFile_Widgets").Widget1; +export declare var publicVarWithPrivatePropertyTypes1: import("GlobalWidgets").Widget3; +export declare class publicClassWithPrivateModulePropertyTypes { + static myPublicStaticProperty: import("./privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2; + myPublicProperty: import("./privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2; + static myPublicStaticProperty1: import("GlobalWidgets").SpecializedGlobalWidget.Widget4; + myPublicProperty1: import("GlobalWidgets").SpecializedGlobalWidget.Widget4; +} +export declare var publicVarWithPrivateModulePropertyTypes: import("./privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2; +export declare var publicVarWithPrivateModulePropertyTypes1: import("GlobalWidgets").SpecializedGlobalWidget.Widget4; diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.types b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.types index 0263f5c82f375..36b6760be0fb3 100644 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.types +++ b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.types @@ -6,239 +6,239 @@ export class publicClassWithWithPrivatePropertyTypes { >publicClassWithWithPrivatePropertyTypes : publicClassWithWithPrivatePropertyTypes static myPublicStaticProperty = exporter.createExportedWidget1(); // Error ->myPublicStaticProperty : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPublicStaticProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 private static myPrivateStaticProperty = exporter.createExportedWidget1(); ->myPrivateStaticProperty : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPrivateStaticProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 myPublicProperty = exporter.createExportedWidget1(); // Error ->myPublicProperty : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPublicProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 private myPrivateProperty = exporter.createExportedWidget1(); ->myPrivateProperty : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPrivateProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 static myPublicStaticProperty1 = exporter.createExportedWidget3(); // Error ->myPublicStaticProperty1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPublicStaticProperty1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 private static myPrivateStaticProperty1 = exporter.createExportedWidget3(); ->myPrivateStaticProperty1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPrivateStaticProperty1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 myPublicProperty1 = exporter.createExportedWidget3(); // Error ->myPublicProperty1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPublicProperty1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 private myPrivateProperty1 = exporter.createExportedWidget3(); ->myPrivateProperty1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPrivateProperty1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } class privateClassWithWithPrivatePropertyTypes { >privateClassWithWithPrivatePropertyTypes : privateClassWithWithPrivatePropertyTypes static myPublicStaticProperty = exporter.createExportedWidget1(); ->myPublicStaticProperty : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPublicStaticProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 private static myPrivateStaticProperty = exporter.createExportedWidget1(); ->myPrivateStaticProperty : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPrivateStaticProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 myPublicProperty = exporter.createExportedWidget1(); ->myPublicProperty : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPublicProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 private myPrivateProperty = exporter.createExportedWidget1(); ->myPrivateProperty : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPrivateProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 static myPublicStaticProperty1 = exporter.createExportedWidget3(); ->myPublicStaticProperty1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPublicStaticProperty1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 private static myPrivateStaticProperty1 = exporter.createExportedWidget3(); ->myPrivateStaticProperty1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPrivateStaticProperty1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 myPublicProperty1 = exporter.createExportedWidget3(); ->myPublicProperty1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPublicProperty1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 private myPrivateProperty1 = exporter.createExportedWidget3(); ->myPrivateProperty1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPrivateProperty1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } export var publicVarWithPrivatePropertyTypes= exporter.createExportedWidget1(); // Error ->publicVarWithPrivatePropertyTypes : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>publicVarWithPrivatePropertyTypes : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 var privateVarWithPrivatePropertyTypes= exporter.createExportedWidget1(); ->privateVarWithPrivatePropertyTypes : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>privateVarWithPrivatePropertyTypes : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").Widget1 export var publicVarWithPrivatePropertyTypes1 = exporter.createExportedWidget3(); // Error ->publicVarWithPrivatePropertyTypes1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>publicVarWithPrivatePropertyTypes1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 var privateVarWithPrivatePropertyTypes1 = exporter.createExportedWidget3(); ->privateVarWithPrivatePropertyTypes1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>privateVarWithPrivatePropertyTypes1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 export class publicClassWithPrivateModulePropertyTypes { >publicClassWithPrivateModulePropertyTypes : publicClassWithPrivateModulePropertyTypes static myPublicStaticProperty= exporter.createExportedWidget2(); // Error ->myPublicStaticProperty : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>myPublicStaticProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 myPublicProperty = exporter.createExportedWidget2(); // Error ->myPublicProperty : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>myPublicProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 static myPublicStaticProperty1 = exporter.createExportedWidget4(); // Error ->myPublicStaticProperty1 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>myPublicStaticProperty1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 myPublicProperty1 = exporter.createExportedWidget4(); // Error ->myPublicProperty1 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>myPublicProperty1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } export var publicVarWithPrivateModulePropertyTypes= exporter.createExportedWidget2(); // Error ->publicVarWithPrivateModulePropertyTypes : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>publicVarWithPrivateModulePropertyTypes : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 export var publicVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); // Error ->publicVarWithPrivateModulePropertyTypes1 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>publicVarWithPrivateModulePropertyTypes1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 class privateClassWithPrivateModulePropertyTypes { >privateClassWithPrivateModulePropertyTypes : privateClassWithPrivateModulePropertyTypes static myPublicStaticProperty= exporter.createExportedWidget2(); ->myPublicStaticProperty : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>myPublicStaticProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 myPublicProperty= exporter.createExportedWidget2(); ->myPublicProperty : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>myPublicProperty : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 static myPublicStaticProperty1 = exporter.createExportedWidget4(); ->myPublicStaticProperty1 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>myPublicStaticProperty1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 myPublicProperty1 = exporter.createExportedWidget4(); ->myPublicProperty1 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>myPublicProperty1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } var privateVarWithPrivateModulePropertyTypes= exporter.createExportedWidget2(); ->privateVarWithPrivateModulePropertyTypes : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>privateVarWithPrivateModulePropertyTypes : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets").SpecializedWidget.Widget2 var privateVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); ->privateVarWithPrivateModulePropertyTypes1 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>privateVarWithPrivateModulePropertyTypes1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 === tests/cases/compiler/privacyCannotNameVarTypeDeclFile_GlobalWidgets.ts === declare module "GlobalWidgets" { diff --git a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.errors.txt b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.errors.txt deleted file mode 100644 index 432e209eaa840..0000000000000 --- a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.errors.txt +++ /dev/null @@ -1,227 +0,0 @@ -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(3,33): error TS4068: Parameter 'param' of public static method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(7,20): error TS4071: Parameter 'param' of public method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(11,17): error TS4061: Parameter 'param' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(11,59): error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(11,110): error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(15,33): error TS4068: Parameter 'param' of public static method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(19,20): error TS4071: Parameter 'param' of public method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(23,17): error TS4061: Parameter 'param' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(23,59): error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(23,110): error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(52,56): error TS4076: Parameter 'param' of exported function has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(56,57): error TS4076: Parameter 'param' of exported function has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(63,33): error TS4068: Parameter 'param' of public static method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(65,20): error TS4071: Parameter 'param' of public method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(67,17): error TS4061: Parameter 'param' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(67,58): error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(67,108): error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(71,33): error TS4068: Parameter 'param' of public static method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(73,20): error TS4071: Parameter 'param' of public method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(75,17): error TS4061: Parameter 'param' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(75,58): error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(75,108): error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(78,63): error TS4076: Parameter 'param' of exported function has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(80,64): error TS4076: Parameter 'param' of exported function has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - - -==== tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts (24 errors) ==== - import exporter = require("./privacyFunctionCannotNameParameterTypeDeclFile_exporter"); - export class publicClassWithWithPrivateParmeterTypes { - static myPublicStaticMethod(param = exporter.createExportedWidget1()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4068: Parameter 'param' of public static method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - } - private static myPrivateStaticMethod(param = exporter.createExportedWidget1()) { - } - myPublicMethod(param = exporter.createExportedWidget1()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4071: Parameter 'param' of public method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - } - private myPrivateMethod(param = exporter.createExportedWidget1()) { - } - constructor(param = exporter.createExportedWidget1(), private param1 = exporter.createExportedWidget1(), public param2 = exporter.createExportedWidget1()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - } - } - export class publicClassWithWithPrivateParmeterTypes1 { - static myPublicStaticMethod(param = exporter.createExportedWidget3()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4068: Parameter 'param' of public static method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - } - private static myPrivateStaticMethod(param = exporter.createExportedWidget3()) { - } - myPublicMethod(param = exporter.createExportedWidget3()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4071: Parameter 'param' of public method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - } - private myPrivateMethod(param = exporter.createExportedWidget3()) { - } - constructor(param = exporter.createExportedWidget3(), private param1 = exporter.createExportedWidget3(), public param2 = exporter.createExportedWidget3()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - } - } - - class privateClassWithWithPrivateParmeterTypes { - static myPublicStaticMethod(param = exporter.createExportedWidget1()) { - } - private static myPrivateStaticMethod(param = exporter.createExportedWidget1()) { - } - myPublicMethod(param = exporter.createExportedWidget1()) { - } - private myPrivateMethod(param = exporter.createExportedWidget1()) { - } - constructor(param = exporter.createExportedWidget1(), private param1 = exporter.createExportedWidget1(), public param2 = exporter.createExportedWidget1()) { - } - } - class privateClassWithWithPrivateParmeterTypes2 { - static myPublicStaticMethod(param = exporter.createExportedWidget3()) { - } - private static myPrivateStaticMethod(param = exporter.createExportedWidget3()) { - } - myPublicMethod(param = exporter.createExportedWidget3()) { - } - private myPrivateMethod(param = exporter.createExportedWidget3()) { - } - constructor(param = exporter.createExportedWidget3(), private param1 = exporter.createExportedWidget3(), public param2 = exporter.createExportedWidget3()) { - } - } - - export function publicFunctionWithPrivateParmeterTypes(param = exporter.createExportedWidget1()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4076: Parameter 'param' of exported function has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - } - function privateFunctionWithPrivateParmeterTypes(param = exporter.createExportedWidget1()) { - } - export function publicFunctionWithPrivateParmeterTypes1(param = exporter.createExportedWidget3()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4076: Parameter 'param' of exported function has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - } - function privateFunctionWithPrivateParmeterTypes1(param = exporter.createExportedWidget3()) { - } - - - export class publicClassWithPrivateModuleParameterTypes { - static myPublicStaticMethod(param= exporter.createExportedWidget2()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4068: Parameter 'param' of public static method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - } - myPublicMethod(param= exporter.createExportedWidget2()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4071: Parameter 'param' of public method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - } - constructor(param= exporter.createExportedWidget2(), private param1= exporter.createExportedWidget2(), public param2= exporter.createExportedWidget2()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - } - } - export class publicClassWithPrivateModuleParameterTypes2 { - static myPublicStaticMethod(param= exporter.createExportedWidget4()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4068: Parameter 'param' of public static method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - } - myPublicMethod(param= exporter.createExportedWidget4()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4071: Parameter 'param' of public method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - } - constructor(param= exporter.createExportedWidget4(), private param1= exporter.createExportedWidget4(), public param2= exporter.createExportedWidget4()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - } - } - export function publicFunctionWithPrivateModuleParameterTypes(param= exporter.createExportedWidget2()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4076: Parameter 'param' of exported function has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. - } - export function publicFunctionWithPrivateModuleParameterTypes1(param= exporter.createExportedWidget4()) { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4076: Parameter 'param' of exported function has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - } - - - class privateClassWithPrivateModuleParameterTypes { - static myPublicStaticMethod(param= exporter.createExportedWidget2()) { - } - myPublicMethod(param= exporter.createExportedWidget2()) { - } - constructor(param= exporter.createExportedWidget2(), private param1= exporter.createExportedWidget2(), public param2= exporter.createExportedWidget2()) { - } - } - class privateClassWithPrivateModuleParameterTypes1 { - static myPublicStaticMethod(param= exporter.createExportedWidget4()) { - } - myPublicMethod(param= exporter.createExportedWidget4()) { - } - constructor(param= exporter.createExportedWidget4(), private param1= exporter.createExportedWidget4(), public param2= exporter.createExportedWidget4()) { - } - } - function privateFunctionWithPrivateModuleParameterTypes(param= exporter.createExportedWidget2()) { - } - function privateFunctionWithPrivateModuleParameterTypes1(param= exporter.createExportedWidget4()) { - } -==== tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_GlobalWidgets.ts (0 errors) ==== - declare module "GlobalWidgets" { - export class Widget3 { - name: string; - } - export function createWidget3(): Widget3; - - export module SpecializedGlobalWidget { - export class Widget4 { - name: string; - } - function createWidget4(): Widget4; - } - } - -==== tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets.ts (0 errors) ==== - export class Widget1 { - name = 'one'; - } - export function createWidget1() { - return new Widget1(); - } - - export module SpecializedWidget { - export class Widget2 { - name = 'one'; - } - export function createWidget2() { - return new Widget2(); - } - } - -==== tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_exporter.ts (0 errors) ==== - /// - import Widgets = require("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets"); - import Widgets1 = require("GlobalWidgets"); - export function createExportedWidget1() { - return Widgets.createWidget1(); - } - export function createExportedWidget2() { - return Widgets.SpecializedWidget.createWidget2(); - } - export function createExportedWidget3() { - return Widgets1.createWidget3(); - } - export function createExportedWidget4() { - return Widgets1.SpecializedGlobalWidget.createWidget4(); - } - \ No newline at end of file diff --git a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js index 3a61785c7f71d..c0cc5b584c97a 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js @@ -427,3 +427,41 @@ export declare function createExportedWidget1(): Widgets.Widget1; export declare function createExportedWidget2(): Widgets.SpecializedWidget.Widget2; export declare function createExportedWidget3(): Widgets1.Widget3; export declare function createExportedWidget4(): Widgets1.SpecializedGlobalWidget.Widget4; +//// [privacyFunctionCannotNameParameterTypeDeclFile_consumer.d.ts] +/// +export declare class publicClassWithWithPrivateParmeterTypes { + private param1; + param2: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1; + static myPublicStaticMethod(param?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1): void; + private static myPrivateStaticMethod; + myPublicMethod(param?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1): void; + private myPrivateMethod; + constructor(param?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1, param1?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1, param2?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1); +} +export declare class publicClassWithWithPrivateParmeterTypes1 { + private param1; + param2: import("GlobalWidgets").Widget3; + static myPublicStaticMethod(param?: import("GlobalWidgets").Widget3): void; + private static myPrivateStaticMethod; + myPublicMethod(param?: import("GlobalWidgets").Widget3): void; + private myPrivateMethod; + constructor(param?: import("GlobalWidgets").Widget3, param1?: import("GlobalWidgets").Widget3, param2?: import("GlobalWidgets").Widget3); +} +export declare function publicFunctionWithPrivateParmeterTypes(param?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1): void; +export declare function publicFunctionWithPrivateParmeterTypes1(param?: import("GlobalWidgets").Widget3): void; +export declare class publicClassWithPrivateModuleParameterTypes { + private param1; + param2: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2; + static myPublicStaticMethod(param?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2): void; + myPublicMethod(param?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2): void; + constructor(param?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2, param1?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2, param2?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2); +} +export declare class publicClassWithPrivateModuleParameterTypes2 { + private param1; + param2: import("GlobalWidgets").SpecializedGlobalWidget.Widget4; + static myPublicStaticMethod(param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4): void; + myPublicMethod(param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4): void; + constructor(param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4, param1?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4, param2?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4); +} +export declare function publicFunctionWithPrivateModuleParameterTypes(param?: import("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2): void; +export declare function publicFunctionWithPrivateModuleParameterTypes1(param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4): void; diff --git a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.types b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.types index 7c9147180f3ea..7f9f9493e3e0e 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.types +++ b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.types @@ -6,106 +6,106 @@ export class publicClassWithWithPrivateParmeterTypes { >publicClassWithWithPrivateParmeterTypes : publicClassWithWithPrivateParmeterTypes static myPublicStaticMethod(param = exporter.createExportedWidget1()) { // Error ->myPublicStaticMethod : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPublicStaticMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } private static myPrivateStaticMethod(param = exporter.createExportedWidget1()) { ->myPrivateStaticMethod : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPrivateStaticMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } myPublicMethod(param = exporter.createExportedWidget1()) { // Error ->myPublicMethod : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPublicMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } private myPrivateMethod(param = exporter.createExportedWidget1()) { ->myPrivateMethod : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPrivateMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } constructor(param = exporter.createExportedWidget1(), private param1 = exporter.createExportedWidget1(), public param2 = exporter.createExportedWidget1()) { // Error ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 ->param1 : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>param1 : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 ->param2 : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>param2 : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } } export class publicClassWithWithPrivateParmeterTypes1 { >publicClassWithWithPrivateParmeterTypes1 : publicClassWithWithPrivateParmeterTypes1 static myPublicStaticMethod(param = exporter.createExportedWidget3()) { // Error ->myPublicStaticMethod : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPublicStaticMethod : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private static myPrivateStaticMethod(param = exporter.createExportedWidget3()) { ->myPrivateStaticMethod : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPrivateStaticMethod : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } myPublicMethod(param = exporter.createExportedWidget3()) { // Error ->myPublicMethod : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPublicMethod : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private myPrivateMethod(param = exporter.createExportedWidget3()) { ->myPrivateMethod : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPrivateMethod : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } constructor(param = exporter.createExportedWidget3(), private param1 = exporter.createExportedWidget3(), public param2 = exporter.createExportedWidget3()) { // Error ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 ->param1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 +>param1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 ->param2 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 +>param2 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } } @@ -113,140 +113,140 @@ class privateClassWithWithPrivateParmeterTypes { >privateClassWithWithPrivateParmeterTypes : privateClassWithWithPrivateParmeterTypes static myPublicStaticMethod(param = exporter.createExportedWidget1()) { ->myPublicStaticMethod : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPublicStaticMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } private static myPrivateStaticMethod(param = exporter.createExportedWidget1()) { ->myPrivateStaticMethod : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPrivateStaticMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } myPublicMethod(param = exporter.createExportedWidget1()) { ->myPublicMethod : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPublicMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } private myPrivateMethod(param = exporter.createExportedWidget1()) { ->myPrivateMethod : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>myPrivateMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } constructor(param = exporter.createExportedWidget1(), private param1 = exporter.createExportedWidget1(), public param2 = exporter.createExportedWidget1()) { ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 ->param1 : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>param1 : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 ->param2 : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>param2 : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } } class privateClassWithWithPrivateParmeterTypes2 { >privateClassWithWithPrivateParmeterTypes2 : privateClassWithWithPrivateParmeterTypes2 static myPublicStaticMethod(param = exporter.createExportedWidget3()) { ->myPublicStaticMethod : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPublicStaticMethod : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private static myPrivateStaticMethod(param = exporter.createExportedWidget3()) { ->myPrivateStaticMethod : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPrivateStaticMethod : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } myPublicMethod(param = exporter.createExportedWidget3()) { ->myPublicMethod : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPublicMethod : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private myPrivateMethod(param = exporter.createExportedWidget3()) { ->myPrivateMethod : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>myPrivateMethod : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } constructor(param = exporter.createExportedWidget3(), private param1 = exporter.createExportedWidget3(), public param2 = exporter.createExportedWidget3()) { ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 ->param1 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 +>param1 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 ->param2 : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 +>param2 : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } } export function publicFunctionWithPrivateParmeterTypes(param = exporter.createExportedWidget1()) { // Error ->publicFunctionWithPrivateParmeterTypes : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>publicFunctionWithPrivateParmeterTypes : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } function privateFunctionWithPrivateParmeterTypes(param = exporter.createExportedWidget1()) { ->privateFunctionWithPrivateParmeterTypes : (param?: Widget1) => void ->param : Widget1 ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>privateFunctionWithPrivateParmeterTypes : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").Widget1 } export function publicFunctionWithPrivateParmeterTypes1(param = exporter.createExportedWidget3()) { // Error ->publicFunctionWithPrivateParmeterTypes1 : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>publicFunctionWithPrivateParmeterTypes1 : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } function privateFunctionWithPrivateParmeterTypes1(param = exporter.createExportedWidget3()) { ->privateFunctionWithPrivateParmeterTypes1 : (param?: Widget3) => void ->param : Widget3 ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>privateFunctionWithPrivateParmeterTypes1 : (param?: import("GlobalWidgets").Widget3) => void +>param : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } @@ -254,91 +254,91 @@ export class publicClassWithPrivateModuleParameterTypes { >publicClassWithPrivateModuleParameterTypes : publicClassWithPrivateModuleParameterTypes static myPublicStaticMethod(param= exporter.createExportedWidget2()) { // Error ->myPublicStaticMethod : (param?: SpecializedWidget.Widget2) => void ->param : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>myPublicStaticMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 } myPublicMethod(param= exporter.createExportedWidget2()) { // Error ->myPublicMethod : (param?: SpecializedWidget.Widget2) => void ->param : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>myPublicMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 } constructor(param= exporter.createExportedWidget2(), private param1= exporter.createExportedWidget2(), public param2= exporter.createExportedWidget2()) { // Error ->param : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 ->param1 : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>param1 : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 ->param2 : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>param2 : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 } } export class publicClassWithPrivateModuleParameterTypes2 { >publicClassWithPrivateModuleParameterTypes2 : publicClassWithPrivateModuleParameterTypes2 static myPublicStaticMethod(param= exporter.createExportedWidget4()) { // Error ->myPublicStaticMethod : (param?: SpecializedGlobalWidget.Widget4) => void ->param : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>myPublicStaticMethod : (param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4) => void +>param : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } myPublicMethod(param= exporter.createExportedWidget4()) { // Error ->myPublicMethod : (param?: SpecializedGlobalWidget.Widget4) => void ->param : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>myPublicMethod : (param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4) => void +>param : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } constructor(param= exporter.createExportedWidget4(), private param1= exporter.createExportedWidget4(), public param2= exporter.createExportedWidget4()) { // Error ->param : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>param : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 ->param1 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>param1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 ->param2 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>param2 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } } export function publicFunctionWithPrivateModuleParameterTypes(param= exporter.createExportedWidget2()) { // Error ->publicFunctionWithPrivateModuleParameterTypes : (param?: SpecializedWidget.Widget2) => void ->param : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>publicFunctionWithPrivateModuleParameterTypes : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 } export function publicFunctionWithPrivateModuleParameterTypes1(param= exporter.createExportedWidget4()) { // Error ->publicFunctionWithPrivateModuleParameterTypes1 : (param?: SpecializedGlobalWidget.Widget4) => void ->param : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>publicFunctionWithPrivateModuleParameterTypes1 : (param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4) => void +>param : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } @@ -346,91 +346,91 @@ class privateClassWithPrivateModuleParameterTypes { >privateClassWithPrivateModuleParameterTypes : privateClassWithPrivateModuleParameterTypes static myPublicStaticMethod(param= exporter.createExportedWidget2()) { ->myPublicStaticMethod : (param?: SpecializedWidget.Widget2) => void ->param : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>myPublicStaticMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 } myPublicMethod(param= exporter.createExportedWidget2()) { ->myPublicMethod : (param?: SpecializedWidget.Widget2) => void ->param : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>myPublicMethod : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 } constructor(param= exporter.createExportedWidget2(), private param1= exporter.createExportedWidget2(), public param2= exporter.createExportedWidget2()) { ->param : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 ->param1 : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>param1 : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 ->param2 : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>param2 : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 } } class privateClassWithPrivateModuleParameterTypes1 { >privateClassWithPrivateModuleParameterTypes1 : privateClassWithPrivateModuleParameterTypes1 static myPublicStaticMethod(param= exporter.createExportedWidget4()) { ->myPublicStaticMethod : (param?: SpecializedGlobalWidget.Widget4) => void ->param : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>myPublicStaticMethod : (param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4) => void +>param : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } myPublicMethod(param= exporter.createExportedWidget4()) { ->myPublicMethod : (param?: SpecializedGlobalWidget.Widget4) => void ->param : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>myPublicMethod : (param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4) => void +>param : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } constructor(param= exporter.createExportedWidget4(), private param1= exporter.createExportedWidget4(), public param2= exporter.createExportedWidget4()) { ->param : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>param : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 ->param1 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>param1 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 ->param2 : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>param2 : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } } function privateFunctionWithPrivateModuleParameterTypes(param= exporter.createExportedWidget2()) { ->privateFunctionWithPrivateModuleParameterTypes : (param?: SpecializedWidget.Widget2) => void ->param : SpecializedWidget.Widget2 ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>privateFunctionWithPrivateModuleParameterTypes : (param?: import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2) => void +>param : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets").SpecializedWidget.Widget2 } function privateFunctionWithPrivateModuleParameterTypes1(param= exporter.createExportedWidget4()) { ->privateFunctionWithPrivateModuleParameterTypes1 : (param?: SpecializedGlobalWidget.Widget4) => void ->param : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>privateFunctionWithPrivateModuleParameterTypes1 : (param?: import("GlobalWidgets").SpecializedGlobalWidget.Widget4) => void +>param : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } === tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_GlobalWidgets.ts === declare module "GlobalWidgets" { diff --git a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.errors.txt b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.errors.txt deleted file mode 100644 index 1a915d8b82cc4..0000000000000 --- a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.errors.txt +++ /dev/null @@ -1,198 +0,0 @@ -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(3,12): error TS4050: Return type of public static method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(9,5): error TS4053: Return type of public method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(15,12): error TS4050: Return type of public static method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(21,5): error TS4053: Return type of public method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(56,17): error TS4058: Return type of exported function has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(62,17): error TS4058: Return type of exported function has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(70,12): error TS4050: Return type of public static method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(73,5): error TS4053: Return type of public method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(76,12): error TS4050: Return type of public static method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(79,5): error TS4053: Return type of public method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(83,17): error TS4058: Return type of exported function has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. -tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(86,17): error TS4058: Return type of exported function has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - - -==== tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts (12 errors) ==== - import exporter = require("./privacyFunctionReturnTypeDeclFile_exporter"); - export class publicClassWithWithPrivateParmeterTypes { - static myPublicStaticMethod() { // Error - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS4050: Return type of public static method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget1(); - } - private static myPrivateStaticMethod() { - return exporter.createExportedWidget1();; - } - myPublicMethod() { // Error - ~~~~~~~~~~~~~~ -!!! error TS4053: Return type of public method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget1();; - } - private myPrivateMethod() { - return exporter.createExportedWidget1();; - } - static myPublicStaticMethod1() { // Error - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4050: Return type of public static method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget3(); - } - private static myPrivateStaticMethod1() { - return exporter.createExportedWidget3();; - } - myPublicMethod1() { // Error - ~~~~~~~~~~~~~~~ -!!! error TS4053: Return type of public method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget3();; - } - private myPrivateMethod1() { - return exporter.createExportedWidget3();; - } - } - - class privateClassWithWithPrivateParmeterTypes { - static myPublicStaticMethod() { - return exporter.createExportedWidget1(); - } - private static myPrivateStaticMethod() { - return exporter.createExportedWidget1();; - } - myPublicMethod() { - return exporter.createExportedWidget1();; - } - private myPrivateMethod() { - return exporter.createExportedWidget1();; - } - static myPublicStaticMethod1() { - return exporter.createExportedWidget3(); - } - private static myPrivateStaticMethod1() { - return exporter.createExportedWidget3();; - } - myPublicMethod1() { - return exporter.createExportedWidget3();; - } - private myPrivateMethod1() { - return exporter.createExportedWidget3();; - } - } - - export function publicFunctionWithPrivateParmeterTypes() { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4058: Return type of exported function has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget1(); - } - function privateFunctionWithPrivateParmeterTypes() { - return exporter.createExportedWidget1(); - } - export function publicFunctionWithPrivateParmeterTypes1() { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4058: Return type of exported function has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget3(); - } - function privateFunctionWithPrivateParmeterTypes1() { - return exporter.createExportedWidget3(); - } - - export class publicClassWithPrivateModuleReturnTypes { - static myPublicStaticMethod() { // Error - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS4050: Return type of public static method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget2(); - } - myPublicMethod() { // Error - ~~~~~~~~~~~~~~ -!!! error TS4053: Return type of public method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget2(); - } - static myPublicStaticMethod1() { // Error - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4050: Return type of public static method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget4(); - } - myPublicMethod1() { // Error - ~~~~~~~~~~~~~~~ -!!! error TS4053: Return type of public method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget4(); - } - } - export function publicFunctionWithPrivateModuleReturnTypes() { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4058: Return type of exported function has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. - return exporter.createExportedWidget2(); - } - export function publicFunctionWithPrivateModuleReturnTypes1() { // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4058: Return type of exported function has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. - return exporter.createExportedWidget4(); - } - - class privateClassWithPrivateModuleReturnTypes { - static myPublicStaticMethod() { - return exporter.createExportedWidget2(); - } - myPublicMethod() { - return exporter.createExportedWidget2(); - } - static myPublicStaticMethod1() { // Error - return exporter.createExportedWidget4(); - } - myPublicMethod1() { // Error - return exporter.createExportedWidget4(); - } - } - function privateFunctionWithPrivateModuleReturnTypes() { - return exporter.createExportedWidget2(); - } - function privateFunctionWithPrivateModuleReturnTypes1() { - return exporter.createExportedWidget4(); - } - -==== tests/cases/compiler/privacyFunctionReturnTypeDeclFile_GlobalWidgets.ts (0 errors) ==== - declare module "GlobalWidgets" { - export class Widget3 { - name: string; - } - export function createWidget3(): Widget3; - - export module SpecializedGlobalWidget { - export class Widget4 { - name: string; - } - function createWidget4(): Widget4; - } - } - -==== tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets.ts (0 errors) ==== - export class Widget1 { - name = 'one'; - } - export function createWidget1() { - return new Widget1(); - } - - export module SpecializedWidget { - export class Widget2 { - name = 'one'; - } - export function createWidget2() { - return new Widget2(); - } - } - -==== tests/cases/compiler/privacyFunctionReturnTypeDeclFile_exporter.ts (0 errors) ==== - /// - import Widgets = require("./privacyFunctionReturnTypeDeclFile_Widgets"); - import Widgets1 = require("GlobalWidgets"); - export function createExportedWidget1() { - return Widgets.createWidget1(); - } - export function createExportedWidget2() { - return Widgets.SpecializedWidget.createWidget2(); - } - export function createExportedWidget3() { - return Widgets1.createWidget3(); - } - export function createExportedWidget4() { - return Widgets1.SpecializedGlobalWidget.createWidget4(); - } - \ No newline at end of file diff --git a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js index d6e9f52669737..bde8a71b7c8b6 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js @@ -384,3 +384,25 @@ export declare function createExportedWidget1(): Widgets.Widget1; export declare function createExportedWidget2(): Widgets.SpecializedWidget.Widget2; export declare function createExportedWidget3(): Widgets1.Widget3; export declare function createExportedWidget4(): Widgets1.SpecializedGlobalWidget.Widget4; +//// [privacyFunctionReturnTypeDeclFile_consumer.d.ts] +/// +export declare class publicClassWithWithPrivateParmeterTypes { + static myPublicStaticMethod(): import("./privacyFunctionReturnTypeDeclFile_Widgets").Widget1; + private static myPrivateStaticMethod; + myPublicMethod(): import("./privacyFunctionReturnTypeDeclFile_Widgets").Widget1; + private myPrivateMethod; + static myPublicStaticMethod1(): import("GlobalWidgets").Widget3; + private static myPrivateStaticMethod1; + myPublicMethod1(): import("GlobalWidgets").Widget3; + private myPrivateMethod1; +} +export declare function publicFunctionWithPrivateParmeterTypes(): import("./privacyFunctionReturnTypeDeclFile_Widgets").Widget1; +export declare function publicFunctionWithPrivateParmeterTypes1(): import("GlobalWidgets").Widget3; +export declare class publicClassWithPrivateModuleReturnTypes { + static myPublicStaticMethod(): import("./privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2; + myPublicMethod(): import("./privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2; + static myPublicStaticMethod1(): import("GlobalWidgets").SpecializedGlobalWidget.Widget4; + myPublicMethod1(): import("GlobalWidgets").SpecializedGlobalWidget.Widget4; +} +export declare function publicFunctionWithPrivateModuleReturnTypes(): import("./privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2; +export declare function publicFunctionWithPrivateModuleReturnTypes1(): import("GlobalWidgets").SpecializedGlobalWidget.Widget4; diff --git a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.types b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.types index a5de70a04e9c5..35a2db5920976 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.types +++ b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.types @@ -6,76 +6,76 @@ export class publicClassWithWithPrivateParmeterTypes { >publicClassWithWithPrivateParmeterTypes : publicClassWithWithPrivateParmeterTypes static myPublicStaticMethod() { // Error ->myPublicStaticMethod : () => Widget1 +>myPublicStaticMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } private static myPrivateStaticMethod() { ->myPrivateStaticMethod : () => Widget1 +>myPrivateStaticMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1();; ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } myPublicMethod() { // Error ->myPublicMethod : () => Widget1 +>myPublicMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1();; ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } private myPrivateMethod() { ->myPrivateMethod : () => Widget1 +>myPrivateMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1();; ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } static myPublicStaticMethod1() { // Error ->myPublicStaticMethod1 : () => Widget3 +>myPublicStaticMethod1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private static myPrivateStaticMethod1() { ->myPrivateStaticMethod1 : () => Widget3 +>myPrivateStaticMethod1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3();; ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } myPublicMethod1() { // Error ->myPublicMethod1 : () => Widget3 +>myPublicMethod1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3();; ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private myPrivateMethod1() { ->myPrivateMethod1 : () => Widget3 +>myPrivateMethod1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3();; ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } } @@ -83,232 +83,232 @@ class privateClassWithWithPrivateParmeterTypes { >privateClassWithWithPrivateParmeterTypes : privateClassWithWithPrivateParmeterTypes static myPublicStaticMethod() { ->myPublicStaticMethod : () => Widget1 +>myPublicStaticMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } private static myPrivateStaticMethod() { ->myPrivateStaticMethod : () => Widget1 +>myPrivateStaticMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1();; ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } myPublicMethod() { ->myPublicMethod : () => Widget1 +>myPublicMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1();; ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } private myPrivateMethod() { ->myPrivateMethod : () => Widget1 +>myPrivateMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1();; ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } static myPublicStaticMethod1() { ->myPublicStaticMethod1 : () => Widget3 +>myPublicStaticMethod1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private static myPrivateStaticMethod1() { ->myPrivateStaticMethod1 : () => Widget3 +>myPrivateStaticMethod1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3();; ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } myPublicMethod1() { ->myPublicMethod1 : () => Widget3 +>myPublicMethod1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3();; ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } private myPrivateMethod1() { ->myPrivateMethod1 : () => Widget3 +>myPrivateMethod1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3();; ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } } export function publicFunctionWithPrivateParmeterTypes() { // Error ->publicFunctionWithPrivateParmeterTypes : () => Widget1 +>publicFunctionWithPrivateParmeterTypes : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } function privateFunctionWithPrivateParmeterTypes() { ->privateFunctionWithPrivateParmeterTypes : () => Widget1 +>privateFunctionWithPrivateParmeterTypes : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 return exporter.createExportedWidget1(); ->exporter.createExportedWidget1() : Widget1 ->exporter.createExportedWidget1 : () => Widget1 +>exporter.createExportedWidget1() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 +>exporter.createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 >exporter : typeof exporter ->createExportedWidget1 : () => Widget1 +>createExportedWidget1 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").Widget1 } export function publicFunctionWithPrivateParmeterTypes1() { // Error ->publicFunctionWithPrivateParmeterTypes1 : () => Widget3 +>publicFunctionWithPrivateParmeterTypes1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } function privateFunctionWithPrivateParmeterTypes1() { ->privateFunctionWithPrivateParmeterTypes1 : () => Widget3 +>privateFunctionWithPrivateParmeterTypes1 : () => import("GlobalWidgets").Widget3 return exporter.createExportedWidget3(); ->exporter.createExportedWidget3() : Widget3 ->exporter.createExportedWidget3 : () => Widget3 +>exporter.createExportedWidget3() : import("GlobalWidgets").Widget3 +>exporter.createExportedWidget3 : () => import("GlobalWidgets").Widget3 >exporter : typeof exporter ->createExportedWidget3 : () => Widget3 +>createExportedWidget3 : () => import("GlobalWidgets").Widget3 } export class publicClassWithPrivateModuleReturnTypes { >publicClassWithPrivateModuleReturnTypes : publicClassWithPrivateModuleReturnTypes static myPublicStaticMethod() { // Error ->myPublicStaticMethod : () => SpecializedWidget.Widget2 +>myPublicStaticMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 } myPublicMethod() { // Error ->myPublicMethod : () => SpecializedWidget.Widget2 +>myPublicMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 } static myPublicStaticMethod1() { // Error ->myPublicStaticMethod1 : () => SpecializedGlobalWidget.Widget4 +>myPublicStaticMethod1 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } myPublicMethod1() { // Error ->myPublicMethod1 : () => SpecializedGlobalWidget.Widget4 +>myPublicMethod1 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } } export function publicFunctionWithPrivateModuleReturnTypes() { // Error ->publicFunctionWithPrivateModuleReturnTypes : () => SpecializedWidget.Widget2 +>publicFunctionWithPrivateModuleReturnTypes : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 } export function publicFunctionWithPrivateModuleReturnTypes1() { // Error ->publicFunctionWithPrivateModuleReturnTypes1 : () => SpecializedGlobalWidget.Widget4 +>publicFunctionWithPrivateModuleReturnTypes1 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } class privateClassWithPrivateModuleReturnTypes { >privateClassWithPrivateModuleReturnTypes : privateClassWithPrivateModuleReturnTypes static myPublicStaticMethod() { ->myPublicStaticMethod : () => SpecializedWidget.Widget2 +>myPublicStaticMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 } myPublicMethod() { ->myPublicMethod : () => SpecializedWidget.Widget2 +>myPublicMethod : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 } static myPublicStaticMethod1() { // Error ->myPublicStaticMethod1 : () => SpecializedGlobalWidget.Widget4 +>myPublicStaticMethod1 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } myPublicMethod1() { // Error ->myPublicMethod1 : () => SpecializedGlobalWidget.Widget4 +>myPublicMethod1 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } } function privateFunctionWithPrivateModuleReturnTypes() { ->privateFunctionWithPrivateModuleReturnTypes : () => SpecializedWidget.Widget2 +>privateFunctionWithPrivateModuleReturnTypes : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 return exporter.createExportedWidget2(); ->exporter.createExportedWidget2() : SpecializedWidget.Widget2 ->exporter.createExportedWidget2 : () => SpecializedWidget.Widget2 +>exporter.createExportedWidget2() : import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 +>exporter.createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 >exporter : typeof exporter ->createExportedWidget2 : () => SpecializedWidget.Widget2 +>createExportedWidget2 : () => import("tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets").SpecializedWidget.Widget2 } function privateFunctionWithPrivateModuleReturnTypes1() { ->privateFunctionWithPrivateModuleReturnTypes1 : () => SpecializedGlobalWidget.Widget4 +>privateFunctionWithPrivateModuleReturnTypes1 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 return exporter.createExportedWidget4(); ->exporter.createExportedWidget4() : SpecializedGlobalWidget.Widget4 ->exporter.createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4() : import("GlobalWidgets").SpecializedGlobalWidget.Widget4 +>exporter.createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 >exporter : typeof exporter ->createExportedWidget4 : () => SpecializedGlobalWidget.Widget4 +>createExportedWidget4 : () => import("GlobalWidgets").SpecializedGlobalWidget.Widget4 } === tests/cases/compiler/privacyFunctionReturnTypeDeclFile_GlobalWidgets.ts === diff --git a/tests/baselines/reference/privacyImportParseErrors.types b/tests/baselines/reference/privacyImportParseErrors.types index 2f6c9e87dee2b..d647acf76dbea 100644 --- a/tests/baselines/reference/privacyImportParseErrors.types +++ b/tests/baselines/reference/privacyImportParseErrors.types @@ -1207,7 +1207,7 @@ module m2 { } export module m3 { ->m3 : typeof m3 +>m3 : typeof import("tests/cases/compiler/privacyImportParseErrors").m3 import m3 = require("use_glo_M1_public"); >m3 : any diff --git a/tests/baselines/reference/typeFromParamTagForFunction.types b/tests/baselines/reference/typeFromParamTagForFunction.types index a1f0dc230b5fe..476c6c3c4539e 100644 --- a/tests/baselines/reference/typeFromParamTagForFunction.types +++ b/tests/baselines/reference/typeFromParamTagForFunction.types @@ -86,17 +86,17 @@ export function C() { === tests/cases/conformance/salsa/c.js === const { C } = require("./c-ext"); ->C : typeof C +>C : typeof import("tests/cases/conformance/salsa/c-ext").C >require("./c-ext") : typeof import("tests/cases/conformance/salsa/c-ext") >require : (id: string) => any >"./c-ext" : "./c-ext" /** @param {C} p */ function c(p) { p.x; } ->c : (p: C) => void ->p : C +>c : (p: import("tests/cases/conformance/salsa/c-ext").C) => void +>p : import("tests/cases/conformance/salsa/c-ext").C >p.x : number ->p : C +>p : import("tests/cases/conformance/salsa/c-ext").C >x : number === tests/cases/conformance/salsa/d-ext.js === @@ -144,17 +144,17 @@ export class E { === tests/cases/conformance/salsa/e.js === const { E } = require("./e-ext"); ->E : typeof E +>E : typeof import("tests/cases/conformance/salsa/e-ext").E >require("./e-ext") : typeof import("tests/cases/conformance/salsa/e-ext") >require : (id: string) => any >"./e-ext" : "./e-ext" /** @param {E} p */ function e(p) { p.x; } ->e : (p: E) => void ->p : E +>e : (p: import("tests/cases/conformance/salsa/e-ext").E) => void +>p : import("tests/cases/conformance/salsa/e-ext").E >p.x : number ->p : E +>p : import("tests/cases/conformance/salsa/e-ext").E >x : number === tests/cases/conformance/salsa/f.js === diff --git a/tests/baselines/reference/umd-augmentation-2.types b/tests/baselines/reference/umd-augmentation-2.types index d84c4d4a0207e..6a2ba7eafcb25 100644 --- a/tests/baselines/reference/umd-augmentation-2.types +++ b/tests/baselines/reference/umd-augmentation-2.types @@ -2,8 +2,8 @@ /// /// let v = new Math2d.Vector(3, 2); ->v : Vector ->new Math2d.Vector(3, 2) : Vector +>v : import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector +>new Math2d.Vector(3, 2) : import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector >Math2d.Vector : typeof Math2d.Vector >Math2d : typeof Math2d >Vector : typeof Math2d.Vector @@ -13,19 +13,19 @@ let v = new Math2d.Vector(3, 2); let magnitude = Math2d.getLength(v); >magnitude : number >Math2d.getLength(v) : number ->Math2d.getLength : (p: Vector) => number +>Math2d.getLength : (p: import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector) => number >Math2d : typeof Math2d ->getLength : (p: Vector) => number ->v : Vector +>getLength : (p: import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector) => number +>v : import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector let p: Math2d.Point = v.translate(5, 5); >p : Math2d.Point >Math2d : any >Point : Math2d.Point ->v.translate(5, 5) : Vector ->v.translate : (dx: number, dy: number) => Vector ->v : Vector ->translate : (dx: number, dy: number) => Vector +>v.translate(5, 5) : import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector +>v.translate : (dx: number, dy: number) => import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector +>v : import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector +>translate : (dx: number, dy: number) => import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector >5 : 5 >5 : 5 @@ -34,7 +34,7 @@ p = v.reverse(); >p : Math2d.Point >v.reverse() : Math2d.Point >v.reverse : () => Math2d.Point ->v : Vector +>v : import("tests/cases/conformance/externalModules/node_modules/math2d/index").Vector >reverse : () => Math2d.Point var t = p.x; diff --git a/tests/baselines/reference/varRequireFromJavascript.types b/tests/baselines/reference/varRequireFromJavascript.types index 7eee4ec188a45..813c38898c5d1 100644 --- a/tests/baselines/reference/varRequireFromJavascript.types +++ b/tests/baselines/reference/varRequireFromJavascript.types @@ -7,16 +7,16 @@ var ex = require('./ex') // values work var crunch = new ex.Crunch(1); ->crunch : Crunch ->new ex.Crunch(1) : Crunch ->ex.Crunch : typeof Crunch +>crunch : import("tests/cases/conformance/salsa/ex").Crunch +>new ex.Crunch(1) : import("tests/cases/conformance/salsa/ex").Crunch +>ex.Crunch : typeof import("tests/cases/conformance/salsa/ex").Crunch >ex : typeof import("tests/cases/conformance/salsa/ex") ->Crunch : typeof Crunch +>Crunch : typeof import("tests/cases/conformance/salsa/ex").Crunch >1 : 1 crunch.n >crunch.n : number ->crunch : Crunch +>crunch : import("tests/cases/conformance/salsa/ex").Crunch >n : number @@ -25,12 +25,12 @@ crunch.n * @param {ex.Crunch} wrap */ function f(wrap) { ->f : (wrap: Crunch) => void ->wrap : Crunch +>f : (wrap: import("tests/cases/conformance/salsa/ex").Crunch) => void +>wrap : import("tests/cases/conformance/salsa/ex").Crunch wrap.n >wrap.n : number ->wrap : Crunch +>wrap : import("tests/cases/conformance/salsa/ex").Crunch >n : number } diff --git a/tests/baselines/reference/varRequireFromTypescript.types b/tests/baselines/reference/varRequireFromTypescript.types index 496b691d0173f..7010bfaf1a800 100644 --- a/tests/baselines/reference/varRequireFromTypescript.types +++ b/tests/baselines/reference/varRequireFromTypescript.types @@ -7,16 +7,16 @@ var ex = require('./ex') // values work var crunch = new ex.Crunch(1); ->crunch : Crunch ->new ex.Crunch(1) : Crunch ->ex.Crunch : typeof Crunch +>crunch : import("tests/cases/conformance/salsa/ex").Crunch +>new ex.Crunch(1) : import("tests/cases/conformance/salsa/ex").Crunch +>ex.Crunch : typeof import("tests/cases/conformance/salsa/ex").Crunch >ex : typeof import("tests/cases/conformance/salsa/ex") ->Crunch : typeof Crunch +>Crunch : typeof import("tests/cases/conformance/salsa/ex").Crunch >1 : 1 crunch.n >crunch.n : number ->crunch : Crunch +>crunch : import("tests/cases/conformance/salsa/ex").Crunch >n : number @@ -26,18 +26,18 @@ crunch.n * @param {ex.Crunch} wrap */ function f(greatest, wrap) { ->f : (greatest: { day: 1; }, wrap: Crunch) => void ->greatest : { day: 1; } ->wrap : Crunch +>f : (greatest: import("tests/cases/conformance/salsa/ex").Greatest, wrap: import("tests/cases/conformance/salsa/ex").Crunch) => void +>greatest : import("tests/cases/conformance/salsa/ex").Greatest +>wrap : import("tests/cases/conformance/salsa/ex").Crunch greatest.day >greatest.day : 1 ->greatest : { day: 1; } +>greatest : import("tests/cases/conformance/salsa/ex").Greatest >day : 1 wrap.n >wrap.n : number ->wrap : Crunch +>wrap : import("tests/cases/conformance/salsa/ex").Crunch >n : number } diff --git a/tests/cases/compiler/declarationsForInferredTypeFromOtherFile.ts b/tests/cases/compiler/declarationsForInferredTypeFromOtherFile.ts new file mode 100644 index 0000000000000..4bfe03d5f5366 --- /dev/null +++ b/tests/cases/compiler/declarationsForInferredTypeFromOtherFile.ts @@ -0,0 +1,12 @@ +// @declaration: true +// @filename: file1.ts +export class Foo {} +// @filename: file2.ts +export function foo(): import("./file1").Foo { + return null as any; +} +// @filename: file3.ts +import {foo} from "./file2"; +export function bar() { + return foo(); +}