diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 34d731e880695..4026133359586 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -57,6 +57,9 @@ export * from "../transformers/module/system"; export * from "../transformers/module/esnextAnd2015"; export * from "../transformers/module/node"; export * from "../transformers/declarations/diagnostics"; +export * from "../transformers/declarations/emitResolver"; +export * from "../transformers/declarations/transpileDeclaration"; +export * from "../transformers/declarations/localInferenceResolver"; export * from "../transformers/declarations"; export * from "../transformer"; export * from "../emitter"; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 50a47ad892537..34feb987c932d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12,7 +12,6 @@ import { and, AnonymousType, AnyImportOrReExport, - AnyImportSyntax, append, appendIfUnique, ArrayBindingPattern, @@ -109,12 +108,15 @@ import { createDiagnosticForNodeFromMessageChain, createDiagnosticMessageChainFromDiagnostic, createEmptyExports, + createEntityVisibilityChecker, + createEvaluator, createFileDiagnostic, createGetCanonicalFileName, createGetSymbolWalker, createModeAwareCacheKey, createModuleNotFoundChain, createMultiMap, + createNameResolver, createPrinterWithDefaults, createPrinterWithRemoveComments, createPrinterWithRemoveCommentsNeverAsciiEscape, @@ -135,6 +137,7 @@ import { defaultMaximumTruncationLength, DeferredTypeReference, DeleteExpression, + determineIfDeclarationIsVisible, Diagnostic, DiagnosticAndArguments, DiagnosticArguments, @@ -187,6 +190,7 @@ import { find, findAncestor, findBestPatternMatch, + findConstructorDeclaration, findIndex, findLast, findLastIndex, @@ -254,6 +258,7 @@ import { getContainingClassStaticBlock, getContainingFunction, getContainingFunctionOrClassStaticBlock, + getDeclarationContainer, getDeclarationModifierFlagsFromSymbol, getDeclarationOfKind, getDeclarationsOfKind, @@ -320,11 +325,11 @@ import { getJSXTransformEnabled, getLeftmostAccessExpression, getLineAndCharacterOfPosition, - getLocalSymbolForExportDefault, getMembersOfDeclaration, getModeForUsageLocation, getModifiers, getModuleInstanceState, + getModuleSpecifierForImportOrExport, getNameFromImportAttribute, getNameFromIndexInfo, getNameOfDeclaration, @@ -482,7 +487,6 @@ import { isCatchClauseVariableDeclarationOrBindingElement, isCheckJsEnabledForFile, isClassDeclaration, - isClassElement, isClassExpression, isClassInstanceProperty, isClassLike, @@ -493,6 +497,7 @@ import { isCompoundAssignment, isComputedNonLiteralName, isComputedPropertyName, + isConstAssertion, isConstructorDeclaration, isConstructorTypeNode, isConstructSignatureDeclaration, @@ -549,6 +554,7 @@ import { isGetAccessorDeclaration, isGetOrSetAccessorDeclaration, isGlobalScopeAugmentation, + isGlobalSourceFile, isHeritageClause, isIdentifier, isIdentifierText, @@ -597,7 +603,6 @@ import { isJSDocParameterTag, isJSDocPropertyLikeTag, isJSDocPropertyTag, - isJSDocReturnTag, isJSDocSatisfiesExpression, isJSDocSatisfiesTag, isJSDocSignature, @@ -608,7 +613,6 @@ import { isJSDocTypedefTag, isJSDocTypeExpression, isJSDocTypeLiteral, - isJSDocTypeTag, isJSDocUnknownType, isJSDocVariadicType, isJsonSourceFile, @@ -624,7 +628,6 @@ import { isJsxSpreadAttribute, isJSXTagName, isKnownSymbol, - isLateVisibilityPaintedStatement, isLeftHandSideExpression, isLineBreak, isLiteralComputedPropertyDeclarationName, @@ -654,7 +657,6 @@ import { isNewExpression, isNodeDescendantOf, isNonNullAccess, - isNullishCoalesce, isNumericLiteral, isNumericLiteralName, isObjectBindingPattern, @@ -678,6 +680,7 @@ import { isPartOfTypeQuery, isPlainJsFile, isPrefixUnaryExpression, + isPrimitiveLiteralValue, isPrivateIdentifier, isPrivateIdentifierClassElementDeclaration, isPrivateIdentifierPropertyAccessExpression, @@ -752,6 +755,7 @@ import { isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration, + isVarConst, isVariableDeclaration, isVariableDeclarationInitializedToBareOrAccessedRequire, isVariableDeclarationInVariableStatement, @@ -820,7 +824,6 @@ import { LateBoundBinaryExpressionDeclaration, LateBoundDeclaration, LateBoundName, - LateVisibilityPaintedStatement, length, LiteralExpression, LiteralType, @@ -996,7 +999,6 @@ import { symbolName, SymbolTable, SymbolTracker, - SymbolVisibilityResult, SyntaxKind, SyntheticDefaultModuleType, SyntheticExpression, @@ -1473,9 +1475,24 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : ObjectFlags.FreshLiteral; var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes; + var { hasVisibleDeclarations, isEntityNameVisible, collectLinkedAliases } = createEntityVisibilityChecker({ + defaultSymbolAccessibility: SymbolAccessibility.NotAccessible, + isThisAccessible, + isDeclarationVisible, + markDeclarationAsVisible(declaration) { + getNodeLinks(declaration).isVisible = true; + }, + resolveName, + getTargetOfExportSpecifier, + }); var checkBinaryExpression = createCheckBinaryExpression(); var emitResolver = createResolver(); var nodeBuilder = createNodeBuilder(); + var evaluate = createEvaluator({ + evaluateElementAccessExpression, + evaluateEntityNameExpression, + onNumericLiteral: checkGrammarNumericLiteral, + }); var globals = createSymbolTable(); var undefinedSymbol = createSymbol(SymbolFlags.Property, "undefined" as __String); @@ -1851,6 +1868,31 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typeHasCallOrConstructSignatures, }; + var resolveNameHelper = createNameResolver( + compilerOptions, + getSymbolOfDeclaration, + error, + globals, + argumentsSymbol, + requireSymbol, + emptySymbols, + extendedResolveErrorReporting, + getSymbol, + getNodeLinks, + ); + var resolveNameHelperForSuggestions = createNameResolver( + compilerOptions, + getSymbolOfDeclaration, + error, + globals, + argumentsSymbol, + requireSymbol, + emptySymbols, + extendedResolveErrorReporting, + suggestionGetSymbol, + getNodeLinks, + ); + function getCandidateSignaturesForStringLiteralCompletions(call: CallLikeExpression, editingArgument: Node) { const candidatesSet = new Set(); const candidates: Signature[] = []; @@ -2759,10 +2801,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return nodeLinks[nodeId] || (nodeLinks[nodeId] = new (NodeLinks as any)()); } - function isGlobalSourceFile(node: Node) { - return node.kind === SyntaxKind.SourceFile && !isExternalOrCommonJsModule(node as SourceFile); - } - function getSymbol(symbols: SymbolTable, name: __String, meaning: SymbolFlags): Symbol | undefined { if (meaning) { const symbol = getMergedSymbol(symbols.get(name)); @@ -2996,74 +3034,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function useOuterVariableScopeInParameter(result: Symbol, location: Node, lastLocation: Node) { - const target = getEmitScriptTarget(compilerOptions); - const functionLocation = location as FunctionLikeDeclaration; - if ( - isParameter(lastLocation) - && functionLocation.body - && result.valueDeclaration - && result.valueDeclaration.pos >= functionLocation.body.pos - && result.valueDeclaration.end <= functionLocation.body.end - ) { - // check for several cases where we introduce temporaries that require moving the name/initializer of the parameter to the body - // - static field in a class expression - // - optional chaining pre-es2020 - // - nullish coalesce pre-es2020 - // - spread assignment in binding pattern pre-es2017 - if (target >= ScriptTarget.ES2015) { - const links = getNodeLinks(functionLocation); - if (links.declarationRequiresScopeChange === undefined) { - links.declarationRequiresScopeChange = forEach(functionLocation.parameters, requiresScopeChange) || false; - } - return !links.declarationRequiresScopeChange; - } - } - return false; - - function requiresScopeChange(node: ParameterDeclaration): boolean { - return requiresScopeChangeWorker(node.name) - || !!node.initializer && requiresScopeChangeWorker(node.initializer); - } - - function requiresScopeChangeWorker(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.ArrowFunction: - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Constructor: - // do not descend into these - return false; - case SyntaxKind.MethodDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.PropertyAssignment: - return requiresScopeChangeWorker((node as MethodDeclaration | AccessorDeclaration | PropertyAssignment).name); - case SyntaxKind.PropertyDeclaration: - // static properties in classes introduce temporary variables - if (hasStaticModifier(node)) { - return !emitStandardClassFields; - } - return requiresScopeChangeWorker((node as PropertyDeclaration).name); - default: - // null coalesce and optional chain pre-es2020 produce temporary variables - if (isNullishCoalesce(node) || isOptionalChain(node)) { - return target < ScriptTarget.ES2020; - } - if (isBindingElement(node) && node.dotDotDotToken && isObjectBindingPattern(node.parent)) { - return target < ScriptTarget.ES2017; - } - if (isTypeNode(node)) return false; - return forEachChild(node, requiresScopeChangeWorker) || false; - } - } - } - - function isConstAssertion(location: Node) { - return (isAssertionExpression(location) && isConstTypeReference(location.type)) - || (isJSDocTypeTag(location) && isConstTypeReference(location.typeExpression)); - } - /** * Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and * the nameNotFoundMessage argument is not undefined. Returns the resolved symbol, or undefined if no symbol with @@ -3082,413 +3052,46 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { excludeGlobals = false, getSpellingSuggestions = true, ): Symbol | undefined { - return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, getSymbol); + return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions); } - function resolveNameHelper( - location: Node | undefined, + // The invalid initializer error is needed in two situation: + // 1. When result of name lookup is undefined, after checking for a missing "this." + // 2. When result of name lookup is defined + function checkAndReportErrorForInvalidInitializer(errorLocation: Node | undefined, propertyWithInvalidInitializer: PropertyDeclaration | undefined, nameArg: __String | Identifier | undefined) { + if (propertyWithInvalidInitializer && !emitStandardClassFields) { + // We have a match, but the reference occurred within a property initializer and the identifier also binds + // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed + // with emitStandardClassFields because the scope semantics are different. + error( + errorLocation, + errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) + ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor + : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, + declarationNameToString(propertyWithInvalidInitializer.name), + diagnosticName(nameArg!), + ); + return true; + } + return false; + } + + function extendedResolveErrorReporting( + result: Symbol | undefined, + originalLocation: Node | undefined, name: __String, meaning: SymbolFlags, nameNotFoundMessage: DiagnosticMessage | undefined, nameArg: __String | Identifier | undefined, - isUse: boolean, - excludeGlobals: boolean, getSpellingSuggestions: boolean, - lookup: typeof getSymbol, - ): Symbol | undefined { - const originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location - let result: Symbol | undefined; - let lastLocation: Node | undefined; - let lastSelfReferenceLocation: Declaration | undefined; - let propertyWithInvalidInitializer: PropertyDeclaration | undefined; - let associatedDeclarationForContainingInitializerOrBindingName: ParameterDeclaration | BindingElement | undefined; - let withinDeferredContext = false; - const errorLocation = location; - let grandparent: Node; - let isInExternalModule = false; - - loop: - while (location) { - if (name === "const" && isConstAssertion(location)) { - // `const` in an `as const` has no symbol, but issues no error because there is no *actual* lookup of the type - // (it refers to the constant type of the expression instead) - return undefined; - } - if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) { - // If lastLocation is the name of a namespace or enum, skip the parent since it will have is own locals that could - // conflict. - lastLocation = location; - location = location.parent; - } - // Locals of a source file are not in scope (because they get merged into the global symbol table) - if (canHaveLocals(location) && location.locals && !isGlobalSourceFile(location)) { - if (result = lookup(location.locals, name, meaning)) { - let useResult = true; - if (isFunctionLike(location) && lastLocation && lastLocation !== (location as FunctionLikeDeclaration).body) { - // symbol lookup restrictions for function-like declarations - // - Type parameters of a function are in scope in the entire function declaration, including the parameter - // list and return type. However, local types are only in scope in the function body. - // - parameters are only in the scope of function body - // This restriction does not apply to JSDoc comment types because they are parented - // at a higher level than type parameters would normally be - if (meaning & result.flags & SymbolFlags.Type && lastLocation.kind !== SyntaxKind.JSDoc) { - useResult = result.flags & SymbolFlags.TypeParameter - // type parameters are visible in parameter list, return type and type parameter list - ? lastLocation === (location as FunctionLikeDeclaration).type || - lastLocation.kind === SyntaxKind.Parameter || - lastLocation.kind === SyntaxKind.JSDocParameterTag || - lastLocation.kind === SyntaxKind.JSDocReturnTag || - lastLocation.kind === SyntaxKind.TypeParameter - // local types not visible outside the function body - : false; - } - if (meaning & result.flags & SymbolFlags.Variable) { - // expression inside parameter will lookup as normal variable scope when targeting es2015+ - if (useOuterVariableScopeInParameter(result, location, lastLocation)) { - useResult = false; - } - else if (result.flags & SymbolFlags.FunctionScopedVariable) { - // parameters are visible only inside function body, parameter list and return type - // technically for parameter list case here we might mix parameters and variables declared in function, - // however it is detected separately when checking initializers of parameters - // to make sure that they reference no variables declared after them. - useResult = lastLocation.kind === SyntaxKind.Parameter || - ( - lastLocation === (location as FunctionLikeDeclaration).type && - !!findAncestor(result.valueDeclaration, isParameter) - ); - } - } - } - else if (location.kind === SyntaxKind.ConditionalType) { - // A type parameter declared using 'infer T' in a conditional type is visible only in - // the true branch of the conditional type. - useResult = lastLocation === location.trueType; - } - - if (useResult) { - break loop; - } - else { - result = undefined; - } - } - } - withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); - switch (location.kind) { - case SyntaxKind.SourceFile: - if (!isExternalOrCommonJsModule(location as SourceFile)) break; - isInExternalModule = true; - // falls through - case SyntaxKind.ModuleDeclaration: - const moduleExports = getSymbolOfDeclaration(location as SourceFile | ModuleDeclaration)?.exports || emptySymbols; - if (location.kind === SyntaxKind.SourceFile || (isModuleDeclaration(location) && location.flags & NodeFlags.Ambient && !isGlobalScopeAugmentation(location))) { - // It's an external module. First see if the module has an export default and if the local - // name of that export default matches. - if (result = moduleExports.get(InternalSymbolName.Default)) { - const localSymbol = getLocalSymbolForExportDefault(result); - if (localSymbol && (result.flags & meaning) && localSymbol.escapedName === name) { - break loop; - } - result = undefined; - } - - // Because of module/namespace merging, a module's exports are in scope, - // yet we never want to treat an export specifier as putting a member in scope. - // Therefore, if the name we find is purely an export specifier, it is not actually considered in scope. - // Two things to note about this: - // 1. We have to check this without calling getSymbol. The problem with calling getSymbol - // on an export specifier is that it might find the export specifier itself, and try to - // resolve it as an alias. This will cause the checker to consider the export specifier - // a circular alias reference when it might not be. - // 2. We check === SymbolFlags.Alias in order to check that the symbol is *purely* - // an alias. If we used &, we'd be throwing out symbols that have non alias aspects, - // which is not the desired behavior. - const moduleExport = moduleExports.get(name); - if ( - moduleExport && - moduleExport.flags === SymbolFlags.Alias && - (getDeclarationOfKind(moduleExport, SyntaxKind.ExportSpecifier) || getDeclarationOfKind(moduleExport, SyntaxKind.NamespaceExport)) - ) { - break; - } - } - - // ES6 exports are also visible locally (except for 'default'), but commonjs exports are not (except typedefs) - if (name !== InternalSymbolName.Default && (result = lookup(moduleExports, name, meaning & SymbolFlags.ModuleMember))) { - if (isSourceFile(location) && location.commonJsModuleIndicator && !result.declarations?.some(isJSDocTypeAlias)) { - result = undefined; - } - else { - break loop; - } - } - break; - case SyntaxKind.EnumDeclaration: - if (result = lookup(getSymbolOfDeclaration(location as EnumDeclaration)?.exports || emptySymbols, name, meaning & SymbolFlags.EnumMember)) { - if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & NodeFlags.Ambient) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { - error( - errorLocation, - Diagnostics.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, - unescapeLeadingUnderscores(name), - isolatedModulesLikeFlagName, - `${unescapeLeadingUnderscores(getSymbolOfNode(location)!.escapedName)}.${unescapeLeadingUnderscores(name)}`, - ); - } - break loop; - } - break; - case SyntaxKind.PropertyDeclaration: - // TypeScript 1.0 spec (April 2014): 8.4.1 - // Initializer expressions for instance member variables are evaluated in the scope - // of the class constructor body but are not permitted to reference parameters or - // local variables of the constructor. This effectively means that entities from outer scopes - // by the same name as a constructor parameter or local variable are inaccessible - // in initializer expressions for instance member variables. - if (!isStatic(location)) { - const ctor = findConstructorDeclaration(location.parent as ClassLikeDeclaration); - if (ctor && ctor.locals) { - if (lookup(ctor.locals, name, meaning & SymbolFlags.Value)) { - // Remember the property node, it will be used later to report appropriate error - Debug.assertNode(location, isPropertyDeclaration); - propertyWithInvalidInitializer = location; - } - } - } - break; - case SyntaxKind.ClassDeclaration: - case SyntaxKind.ClassExpression: - case SyntaxKind.InterfaceDeclaration: - // The below is used to lookup type parameters within a class or interface, as they are added to the class/interface locals - // These can never be latebound, so the symbol's raw members are sufficient. `getMembersOfNode` cannot be used, as it would - // trigger resolving late-bound names, which we may already be in the process of doing while we're here! - if (result = lookup(getSymbolOfDeclaration(location as ClassLikeDeclaration | InterfaceDeclaration).members || emptySymbols, name, meaning & SymbolFlags.Type)) { - if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { - // ignore type parameters not declared in this container - result = undefined; - break; - } - if (lastLocation && isStatic(lastLocation)) { - // TypeScript 1.0 spec (April 2014): 3.4.1 - // The scope of a type parameter extends over the entire declaration with which the type - // parameter list is associated, with the exception of static member declarations in classes. - if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); - } - return undefined; - } - break loop; - } - if (isClassExpression(location) && meaning & SymbolFlags.Class) { - const className = location.name; - if (className && name === className.escapedText) { - result = location.symbol; - break loop; - } - } - break; - case SyntaxKind.ExpressionWithTypeArguments: - // The type parameters of a class are not in scope in the base class expression. - if (lastLocation === (location as ExpressionWithTypeArguments).expression && (location.parent as HeritageClause).token === SyntaxKind.ExtendsKeyword) { - const container = location.parent.parent; - if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members!, name, meaning & SymbolFlags.Type))) { - if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); - } - return undefined; - } - } - break; - // It is not legal to reference a class's own type parameters from a computed property name that - // belongs to the class. For example: - // - // function foo() { return '' } - // class C { // <-- Class's own type parameter T - // [foo()]() { } // <-- Reference to T from class's own computed property - // } - // - case SyntaxKind.ComputedPropertyName: - grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === SyntaxKind.InterfaceDeclaration) { - // A reference to this grandparent's type parameters would be an error - if (result = lookup(getSymbolOfDeclaration(grandparent as ClassLikeDeclaration | InterfaceDeclaration).members!, name, meaning & SymbolFlags.Type)) { - if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); - } - return undefined; - } - } - break; - case SyntaxKind.ArrowFunction: - // when targeting ES6 or higher there is no 'arguments' in an arrow function - // for lower compile targets the resolved symbol is used to emit an error - if (getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015) { - break; - } - // falls through - case SyntaxKind.MethodDeclaration: - case SyntaxKind.Constructor: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.FunctionDeclaration: - if (meaning & SymbolFlags.Variable && name === "arguments") { - result = argumentsSymbol; - break loop; - } - break; - case SyntaxKind.FunctionExpression: - if (meaning & SymbolFlags.Variable && name === "arguments") { - result = argumentsSymbol; - break loop; - } - - if (meaning & SymbolFlags.Function) { - const functionName = (location as FunctionExpression).name; - if (functionName && name === functionName.escapedText) { - result = (location as FunctionExpression).symbol; - break loop; - } - } - break; - case SyntaxKind.Decorator: - // Decorators are resolved at the class declaration. Resolving at the parameter - // or member would result in looking up locals in the method. - // - // function y() {} - // class C { - // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. - // } - // - if (location.parent && location.parent.kind === SyntaxKind.Parameter) { - location = location.parent; - } - // - // function y() {} - // class C { - // @y method(x, y) {} // <-- decorator y should be resolved at the class declaration, not the method. - // } - // - - // class Decorators are resolved outside of the class to avoid referencing type parameters of that class. - // - // type T = number; - // declare function y(x: T): any; - // @param(1 as T) // <-- T should resolve to the type alias outside of class C - // class C {} - if (location.parent && (isClassElement(location.parent) || location.parent.kind === SyntaxKind.ClassDeclaration)) { - location = location.parent; - } - break; - case SyntaxKind.JSDocTypedefTag: - case SyntaxKind.JSDocCallbackTag: - case SyntaxKind.JSDocEnumTag: - // js type aliases do not resolve names from their host, so skip past it - const root = getJSDocRoot(location); - if (root) { - location = root.parent; - } - break; - case SyntaxKind.Parameter: - if ( - lastLocation && ( - lastLocation === (location as ParameterDeclaration).initializer || - lastLocation === (location as ParameterDeclaration).name && isBindingPattern(lastLocation) - ) - ) { - if (!associatedDeclarationForContainingInitializerOrBindingName) { - associatedDeclarationForContainingInitializerOrBindingName = location as ParameterDeclaration; - } - } - break; - case SyntaxKind.BindingElement: - if ( - lastLocation && ( - lastLocation === (location as BindingElement).initializer || - lastLocation === (location as BindingElement).name && isBindingPattern(lastLocation) - ) - ) { - if (isParameterDeclaration(location as BindingElement) && !associatedDeclarationForContainingInitializerOrBindingName) { - associatedDeclarationForContainingInitializerOrBindingName = location as BindingElement; - } - } - break; - case SyntaxKind.InferType: - if (meaning & SymbolFlags.TypeParameter) { - const parameterName = (location as InferTypeNode).typeParameter.name; - if (parameterName && name === parameterName.escapedText) { - result = (location as InferTypeNode).typeParameter.symbol; - break loop; - } - } - break; - case SyntaxKind.ExportSpecifier: - // External module export bindings shouldn't be resolved to local symbols. - if ( - lastLocation && - lastLocation === (location as ExportSpecifier).propertyName && - (location as ExportSpecifier).parent.parent.moduleSpecifier - ) { - location = location.parent.parent.parent; - } - break; - } - if (isSelfReferenceLocation(location)) { - lastSelfReferenceLocation = location; - } - lastLocation = location; - location = isJSDocTemplateTag(location) ? getEffectiveContainerForJSDocTemplateTag(location) || location.parent : - isJSDocParameterTag(location) || isJSDocReturnTag(location) ? getHostSignatureFromJSDoc(location) || location.parent : - location.parent; - } - - // We just climbed up parents looking for the name, meaning that we started in a descendant node of `lastLocation`. - // If `result === lastSelfReferenceLocation.symbol`, that means that we are somewhere inside `lastSelfReferenceLocation` looking up a name, and resolving to `lastLocation` itself. - // That means that this is a self-reference of `lastLocation`, and shouldn't count this when considering whether `lastLocation` is used. - if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) { - result.isReferenced! |= meaning; - } - - if (!result) { - if (lastLocation) { - Debug.assertNode(lastLocation, isSourceFile); - if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) { - return lastLocation.symbol; - } - } - - if (!excludeGlobals) { - result = lookup(globals, name, meaning); - } - } - if (!result) { - if (originalLocation && isInJSFile(originalLocation) && originalLocation.parent) { - if (isRequireCall(originalLocation.parent, /*requireStringLiteralLikeArgument*/ false)) { - return requireSymbol; - } - } - } - - // The invalid initializer error is needed in two situation: - // 1. When result is undefined, after checking for a missing "this." - // 2. When result is defined - function checkAndReportErrorForInvalidInitializer() { - if (propertyWithInvalidInitializer && !emitStandardClassFields) { - // We have a match, but the reference occurred within a property initializer and the identifier also binds - // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed - // with emitStandardClassFields because the scope semantics are different. - error( - errorLocation, - errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) - ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor - : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, - declarationNameToString(propertyWithInvalidInitializer.name), - diagnosticName(nameArg!), - ); - return true; - } - return false; - } - + lookup: (symbols: SymbolTable, name: __String, meaning: SymbolFlags) => Symbol | undefined, + lastLocation: Node | undefined, + errorLocation: Node | undefined, + propertyWithInvalidInitializer: PropertyDeclaration | undefined, + associatedDeclarationForContainingInitializerOrBindingName: ParameterDeclaration | BindingElement | undefined, + withinDeferredContext: boolean, + isInExternalModule: boolean, + ) { if (!result) { if (nameNotFoundMessage) { addLazyDiagnostic(() => { @@ -3496,7 +3099,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { !errorLocation || errorLocation.parent.kind !== SyntaxKind.JSDocLink && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg!) && // TODO: GH#18217 - !checkAndReportErrorForInvalidInitializer() && + !checkAndReportErrorForInvalidInitializer(errorLocation, propertyWithInvalidInitializer, nameArg) && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && @@ -3546,7 +3149,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } return undefined; } - else if (nameNotFoundMessage && checkAndReportErrorForInvalidInitializer()) { + else if (nameNotFoundMessage && checkAndReportErrorForInvalidInitializer(errorLocation, propertyWithInvalidInitializer, nameArg)) { return undefined; } @@ -3569,7 +3172,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { (meaning & SymbolFlags.BlockScopedVariable || ((meaning & SymbolFlags.Class || meaning & SymbolFlags.Enum) && (meaning & SymbolFlags.Value) === SymbolFlags.Value)) ) { - const exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result!); + const exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result); if (exportOrLocalSymbol.flags & SymbolFlags.BlockScopedVariable || exportOrLocalSymbol.flags & SymbolFlags.Class || exportOrLocalSymbol.flags & SymbolFlags.Enum) { checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } @@ -3642,65 +3245,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ); } - function getIsDeferredContext(location: Node, lastLocation: Node | undefined): boolean { - if (location.kind !== SyntaxKind.ArrowFunction && location.kind !== SyntaxKind.FunctionExpression) { - // initializers in instance property declaration of class like entities are executed in constructor and thus deferred - return isTypeQueryNode(location) || (( - isFunctionLikeDeclaration(location) || - (location.kind === SyntaxKind.PropertyDeclaration && !isStatic(location)) - ) && (!lastLocation || lastLocation !== (location as SignatureDeclaration | PropertyDeclaration).name)); // A name is evaluated within the enclosing scope - so it shouldn't count as deferred - } - if (lastLocation && lastLocation === (location as FunctionExpression | ArrowFunction).name) { - return false; - } - // generator functions and async functions are not inlined in control flow when immediately invoked - if ((location as FunctionExpression | ArrowFunction).asteriskToken || hasSyntacticModifier(location, ModifierFlags.Async)) { - return true; - } - return !getImmediatelyInvokedFunctionExpression(location); - } - - type SelfReferenceLocation = - | FunctionDeclaration - | ClassDeclaration - | InterfaceDeclaration - | EnumDeclaration - | TypeAliasDeclaration - | ModuleDeclaration; - - function isSelfReferenceLocation(node: Node): node is SelfReferenceLocation { - switch (node.kind) { - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.ModuleDeclaration: // For `namespace N { N; }` - return true; - default: - return false; - } - } - function diagnosticName(nameArg: __String | Identifier | PrivateIdentifier) { return isString(nameArg) ? unescapeLeadingUnderscores(nameArg as __String) : declarationNameToString(nameArg as Identifier); } - function isTypeParameterSymbolDeclaredInContainer(symbol: Symbol, container: Node) { - if (symbol.declarations) { - for (const decl of symbol.declarations) { - if (decl.kind === SyntaxKind.TypeParameter) { - const parent = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; - if (parent === container) { - return !(isJSDocTemplateTag(decl.parent) && find((decl.parent.parent as JSDoc).tags, isJSDocTypeAlias)); - } - } - } - } - - return false; - } - function checkAndReportErrorForMissingPrefix(errorLocation: Node, name: __String, nameArg: __String | Identifier): boolean { if (!isIdentifier(errorLocation) || errorLocation.escapedText !== name || isTypeReferenceIdentifier(errorLocation) || isInTypeQuery(errorLocation)) { return false; @@ -3944,21 +3492,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || (getFunctionFlags(n) & FunctionFlags.AsyncGenerator)) ? "quit" : false)); } - function getAnyImportSyntax(node: Node): AnyImportSyntax | undefined { - switch (node.kind) { - case SyntaxKind.ImportEqualsDeclaration: - return node as ImportEqualsDeclaration; - case SyntaxKind.ImportClause: - return (node as ImportClause).parent; - case SyntaxKind.NamespaceImport: - return (node as NamespaceImport).parent.parent; - case SyntaxKind.ImportSpecifier: - return (node as ImportSpecifier).parent.parent.parent; - default: - return undefined; - } - } - function getDeclarationOfAliasSymbol(symbol: Symbol): Declaration | undefined { return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration); } @@ -4169,23 +3702,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return exportDefaultSymbol; } - function getModuleSpecifierForImportOrExport(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportOrExportSpecifier): Expression | undefined { - switch (node.kind) { - case SyntaxKind.ImportClause: - return node.parent.moduleSpecifier; - case SyntaxKind.ImportEqualsDeclaration: - return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : undefined; - case SyntaxKind.NamespaceImport: - return node.parent.parent.moduleSpecifier; - case SyntaxKind.ImportSpecifier: - return node.parent.parent.parent.moduleSpecifier; - case SyntaxKind.ExportSpecifier: - return node.parent.parent.moduleSpecifier; - default: - return Debug.assertNever(node); - } - } - function reportNonDefaultExport(moduleSymbol: Symbol, node: ImportClause) { if (moduleSymbol.exports?.has(node.symbol.escapedName)) { error( @@ -5748,15 +5264,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ); } - function findConstructorDeclaration(node: ClassLikeDeclaration): ConstructorDeclaration | undefined { - const members = node.members; - for (const member of members) { - if (member.kind === SyntaxKind.Constructor && nodeIsPresent((member as ConstructorDeclaration).body)) { - return member as ConstructorDeclaration; - } - } - } - function createType(flags: TypeFlags): Type { const result = new Type(checker, flags); typeCount++; @@ -6225,121 +5732,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return isModuleWithStringLiteralName(declaration) || (declaration.kind === SyntaxKind.SourceFile && isExternalOrCommonJsModule(declaration as SourceFile)); } - function hasVisibleDeclarations(symbol: Symbol, shouldComputeAliasToMakeVisible: boolean): SymbolVisibilityResult | undefined { - let aliasesToMakeVisible: LateVisibilityPaintedStatement[] | undefined; - if (!every(filter(symbol.declarations, d => d.kind !== SyntaxKind.Identifier), getIsDeclarationVisible)) { - return undefined; - } - return { accessibility: SymbolAccessibility.Accessible, aliasesToMakeVisible }; - - function getIsDeclarationVisible(declaration: Declaration) { - if (!isDeclarationVisible(declaration)) { - // Mark the unexported alias as visible if its parent is visible - // because these kind of aliases can be used to name types in declaration file - - const anyImportSyntax = getAnyImportSyntax(declaration); - if ( - anyImportSyntax && - !hasSyntacticModifier(anyImportSyntax, ModifierFlags.Export) && // import clause without export - isDeclarationVisible(anyImportSyntax.parent) - ) { - return addVisibleAlias(declaration, anyImportSyntax); - } - else if ( - isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && - !hasSyntacticModifier(declaration.parent.parent, ModifierFlags.Export) && // unexported variable statement - isDeclarationVisible(declaration.parent.parent.parent) - ) { - return addVisibleAlias(declaration, declaration.parent.parent); - } - else if ( - isLateVisibilityPaintedStatement(declaration) // unexported top-level statement - && !hasSyntacticModifier(declaration, ModifierFlags.Export) - && isDeclarationVisible(declaration.parent) - ) { - return addVisibleAlias(declaration, declaration); - } - else if (isBindingElement(declaration)) { - if ( - symbol.flags & SymbolFlags.Alias && isInJSFile(declaration) && declaration.parent?.parent // exported import-like top-level JS require statement - && isVariableDeclaration(declaration.parent.parent) - && declaration.parent.parent.parent?.parent && isVariableStatement(declaration.parent.parent.parent.parent) - && !hasSyntacticModifier(declaration.parent.parent.parent.parent, ModifierFlags.Export) - && declaration.parent.parent.parent.parent.parent // check if the thing containing the variable statement is visible (ie, the file) - && isDeclarationVisible(declaration.parent.parent.parent.parent.parent) - ) { - return addVisibleAlias(declaration, declaration.parent.parent.parent.parent); - } - else if (symbol.flags & SymbolFlags.BlockScopedVariable) { - const variableStatement = findAncestor(declaration, isVariableStatement)!; - if (hasSyntacticModifier(variableStatement, ModifierFlags.Export)) { - return true; - } - if (!isDeclarationVisible(variableStatement.parent)) { - return false; - } - return addVisibleAlias(declaration, variableStatement); - } - } - - // Declaration is not visible - return false; - } - - return true; - } - - function addVisibleAlias(declaration: Declaration, aliasingStatement: LateVisibilityPaintedStatement) { - // In function "buildTypeDisplay" where we decide whether to write type-alias or serialize types, - // we want to just check if type- alias is accessible or not but we don't care about emitting those alias at that time - // since we will do the emitting later in trackSymbol. - if (shouldComputeAliasToMakeVisible) { - getNodeLinks(declaration).isVisible = true; - aliasesToMakeVisible = appendIfUnique(aliasesToMakeVisible, aliasingStatement); - } - return true; - } - } - - function isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult { - // get symbol of the first identifier of the entityName - let meaning: SymbolFlags; - if ( - entityName.parent.kind === SyntaxKind.TypeQuery || - entityName.parent.kind === SyntaxKind.ExpressionWithTypeArguments && !isPartOfTypeNode(entityName.parent) || - entityName.parent.kind === SyntaxKind.ComputedPropertyName - ) { - // Typeof value - meaning = SymbolFlags.Value | SymbolFlags.ExportValue; - } - else if ( - entityName.kind === SyntaxKind.QualifiedName || entityName.kind === SyntaxKind.PropertyAccessExpression || - entityName.parent.kind === SyntaxKind.ImportEqualsDeclaration - ) { - // Left identifier from type reference or TypeAlias - // Entity name of the import declaration - meaning = SymbolFlags.Namespace; - } - else { - // Type Reference or TypeAlias entity = Identifier - meaning = SymbolFlags.Type; - } - - const firstIdentifier = getFirstIdentifier(entityName); - const symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); - if (symbol && symbol.flags & SymbolFlags.TypeParameter && meaning & SymbolFlags.Type) { - return { accessibility: SymbolAccessibility.Accessible }; - } - if (!symbol && isThisIdentifier(firstIdentifier) && isSymbolAccessible(getSymbolOfDeclaration(getThisContainer(firstIdentifier, /*includeArrowFunctions*/ false, /*includeClassComputedPropertyName*/ false)), firstIdentifier, meaning, /*shouldComputeAliasesToMakeVisible*/ false).accessibility === SymbolAccessibility.Accessible) { - return { accessibility: SymbolAccessibility.Accessible }; - } - - // Verify if the symbol is accessible - return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { - accessibility: SymbolAccessibility.NotAccessible, - errorSymbolName: getTextOfNode(firstIdentifier), - errorNode: firstIdentifier, - }; + function isThisAccessible(thisIdentifier: Identifier, meaning: SymbolFlags) { + return isSymbolAccessible(getSymbolOfDeclaration(getThisContainer(thisIdentifier, /*includeArrowFunctions*/ false, /*includeClassComputedPropertyName*/ false)), thisIdentifier, meaning, /*shouldComputeAliasesToMakeVisible*/ false); } function symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags: SymbolFormatFlags = SymbolFormatFlags.AllowAnyNodeKind, writer?: EmitTextWriter): string { @@ -7347,12 +6741,31 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { anyType : getNonMissingTypeOfSymbol(propertySymbol); const saveEnclosingDeclaration = context.enclosingDeclaration; context.enclosingDeclaration = undefined; - if (context.tracker.canTrackSymbol && isLateBoundName(propertySymbol.escapedName)) { - if (propertySymbol.declarations) { - const decl = first(propertySymbol.declarations); + const decl = propertySymbol.declarations && firstOrUndefined(propertySymbol.declarations); + + function hasAccessibleLateBindableName(decl: Declaration, enclosingDeclaration: Node | undefined) { + const name = getNameOfDeclaration(decl); + if (!name || !isLateBindableName(name)) { + return false; + } + const firstIdentifier = getFirstIdentifier(name.expression); + const nameSymbol = resolveName(firstIdentifier, firstIdentifier.escapedText, SymbolFlags.Value | SymbolFlags.ExportValue, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); + if (!nameSymbol) { + return false; + } + const result = isSymbolAccessible(nameSymbol, enclosingDeclaration, SymbolFlags.Value, /*shouldComputeAliasesToMakeVisible*/ false); + return result.accessibility === SymbolAccessibility.Accessible; + } + + const isAccessibleLateBindableName = context.flags & NodeBuilderFlags.WriteComputedProps && decl && hasAccessibleLateBindableName(decl, saveEnclosingDeclaration); + if ( + context.tracker.canTrackSymbol && + (isAccessibleLateBindableName || isLateBoundName(propertySymbol.escapedName)) + ) { + if (decl) { if (hasLateBindableName(decl)) { + const name = getNameOfDeclaration(decl); if (isBinaryExpression(decl)) { - const name = getNameOfDeclaration(decl); if (name && isElementAccessExpression(name) && isPropertyAccessEntityNameExpression(name.argumentExpression)) { trackComputedName(name.argumentExpression, saveEnclosingDeclaration, context); } @@ -7367,8 +6780,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } context.enclosingDeclaration = propertySymbol.valueDeclaration || propertySymbol.declarations?.[0] || saveEnclosingDeclaration; + const savedFlags = context.flags; + context.flags &= !isAccessibleLateBindableName ? ~NodeBuilderFlags.WriteComputedProps : ~NodeBuilderFlags.None; const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); context.enclosingDeclaration = saveEnclosingDeclaration; + context.flags = savedFlags; context.approximateLength += symbolName(propertySymbol).length + 1; if (propertySymbol.flags & SymbolFlags.Accessor) { @@ -8384,6 +7800,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & TypeFlags.StringOrNumberLiteral) { + if (context.flags & NodeBuilderFlags.WriteComputedProps) { + const nameExpression = symbol.valueDeclaration && getNameOfDeclaration(symbol.valueDeclaration); + if (nameExpression && isLateBindableName(nameExpression) && isComputedPropertyName(nameExpression)) { + return nameExpression; + } + } const name = "" + (nameType as StringLiteralType | NumberLiteralType).value; if (!isIdentifierText(name, getEmitScriptTarget(compilerOptions)) && (stringNamed || !isNumericLiteralName(name))) { return factory.createStringLiteral(name, !!singleQuote); @@ -10445,152 +9867,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (node) { const links = getNodeLinks(node); if (links.isVisible === undefined) { - links.isVisible = !!determineIfDeclarationIsVisible(); + links.isVisible = !!determineIfDeclarationIsVisible(node, isDeclarationVisible); } return links.isVisible; } return false; - - function determineIfDeclarationIsVisible() { - switch (node.kind) { - case SyntaxKind.JSDocCallbackTag: - case SyntaxKind.JSDocTypedefTag: - case SyntaxKind.JSDocEnumTag: - // Top-level jsdoc type aliases are considered exported - // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file - return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case SyntaxKind.BindingElement: - return isDeclarationVisible(node.parent.parent); - case SyntaxKind.VariableDeclaration: - if ( - isBindingPattern((node as VariableDeclaration).name) && - !((node as VariableDeclaration).name as BindingPattern).elements.length - ) { - // If the binding pattern is empty, this variable declaration is not visible - return false; - } - // falls through - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.ImportEqualsDeclaration: - // external module augmentation is always visible - if (isExternalModuleAugmentation(node)) { - return true; - } - const parent = getDeclarationContainer(node); - // If the node is not exported or it is not ambient module element (except import declaration) - if ( - !(getCombinedModifierFlagsCached(node as Declaration) & ModifierFlags.Export) && - !(node.kind !== SyntaxKind.ImportEqualsDeclaration && parent.kind !== SyntaxKind.SourceFile && parent.flags & NodeFlags.Ambient) - ) { - return isGlobalSourceFile(parent); - } - // Exported members/ambient module elements (exception import declaration) are visible if parent is visible - return isDeclarationVisible(parent); - - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - if (hasEffectiveModifier(node, ModifierFlags.Private | ModifierFlags.Protected)) { - // Private/protected properties/methods are not visible - return false; - } - // Public properties/methods are visible if its parents are visible, so: - // falls through - - case SyntaxKind.Constructor: - case SyntaxKind.ConstructSignature: - case SyntaxKind.CallSignature: - case SyntaxKind.IndexSignature: - case SyntaxKind.Parameter: - case SyntaxKind.ModuleBlock: - case SyntaxKind.FunctionType: - case SyntaxKind.ConstructorType: - case SyntaxKind.TypeLiteral: - case SyntaxKind.TypeReference: - case SyntaxKind.ArrayType: - case SyntaxKind.TupleType: - case SyntaxKind.UnionType: - case SyntaxKind.IntersectionType: - case SyntaxKind.ParenthesizedType: - case SyntaxKind.NamedTupleMember: - return isDeclarationVisible(node.parent); - - // Default binding, import specifier and namespace import is visible - // only on demand so by default it is not visible - case SyntaxKind.ImportClause: - case SyntaxKind.NamespaceImport: - case SyntaxKind.ImportSpecifier: - return false; - - // Type parameters are always visible - case SyntaxKind.TypeParameter: - - // Source file and namespace export are always visible - // falls through - case SyntaxKind.SourceFile: - case SyntaxKind.NamespaceExportDeclaration: - return true; - - // Export assignments do not create name bindings outside the module - case SyntaxKind.ExportAssignment: - return false; - - default: - return false; - } - } - } - - function collectLinkedAliases(node: Identifier, setVisibility?: boolean): Node[] | undefined { - let exportSymbol: Symbol | undefined; - if (node.parent && node.parent.kind === SyntaxKind.ExportAssignment) { - exportSymbol = resolveName(node, node.escapedText, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias, /*nameNotFoundMessage*/ undefined, node, /*isUse*/ false); - } - else if (node.parent.kind === SyntaxKind.ExportSpecifier) { - exportSymbol = getTargetOfExportSpecifier(node.parent as ExportSpecifier, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); - } - let result: Node[] | undefined; - let visited: Set | undefined; - if (exportSymbol) { - visited = new Set(); - visited.add(getSymbolId(exportSymbol)); - buildVisibleNodeList(exportSymbol.declarations); - } - return result; - - function buildVisibleNodeList(declarations: Declaration[] | undefined) { - forEach(declarations, declaration => { - const resultNode = getAnyImportSyntax(declaration) || declaration; - if (setVisibility) { - getNodeLinks(declaration).isVisible = true; - } - else { - result = result || []; - pushIfUnique(result, resultNode); - } - - if (isInternalModuleImportEqualsDeclaration(declaration)) { - // Add the referenced top container visible - const internalModuleReference = declaration.moduleReference as Identifier | QualifiedName; - const firstIdentifier = getFirstIdentifier(internalModuleReference); - const importSymbol = resolveName(declaration, firstIdentifier.escapedText, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); - if (importSymbol && visited) { - if (tryAddToSet(visited, getSymbolId(importSymbol))) { - buildVisibleNodeList(importSymbol.declarations); - } - } - } - }); - } } /** @@ -10668,22 +9950,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return resolutionResults.pop()!; } - function getDeclarationContainer(node: Node): Node { - return findAncestor(getRootDeclaration(node), node => { - switch (node.kind) { - case SyntaxKind.VariableDeclaration: - case SyntaxKind.VariableDeclarationList: - case SyntaxKind.ImportSpecifier: - case SyntaxKind.NamedImports: - case SyntaxKind.NamespaceImport: - case SyntaxKind.ImportClause: - return false; - default: - return true; - } - })!.parent; - } - function getTypeOfPrototypeProperty(prototype: Symbol): Type { // TypeScript 1.0 spec (April 2014): 8.4 // Every class automatically contains a static property member named 'prototype', @@ -11009,7 +10275,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if ( (noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && - !(getCombinedModifierFlagsCached(declaration) & ModifierFlags.Export) && !(declaration.flags & NodeFlags.Ambient) + !(getCombinedModifierFlags(declaration) & ModifierFlags.Export) && !(declaration.flags & NodeFlags.Ambient) ) { // If --noImplicitAny is on or the declaration is in a Javascript file, // use control flow tracked 'any' type for non-ambient, non-exported var or let variables with no @@ -33343,30 +32609,31 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return suggestion && symbolName(suggestion); } + function suggestionGetSymbol(symbols: SymbolTable, name: __String, meaning: SymbolFlags) { + // Debug.assertEqual(outerName, name, "name should equal outerName"); + const symbol = getSymbol(symbols, name, meaning); + // Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function + // So the table *contains* `x` but `x` isn't actually in scope. + // However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion. + if (symbol) return symbol; + let candidates: Symbol[]; + if (symbols === globals) { + const primitives = mapDefined( + ["string", "number", "boolean", "object", "bigint", "symbol"], + s => symbols.has((s.charAt(0).toUpperCase() + s.slice(1)) as __String) + ? createSymbol(SymbolFlags.TypeAlias, s as __String) as Symbol + : undefined, + ); + candidates = primitives.concat(arrayFrom(symbols.values())); + } + else { + candidates = arrayFrom(symbols.values()); + } + return getSpellingSuggestionForName(unescapeLeadingUnderscores(name), candidates, meaning); + } function getSuggestedSymbolForNonexistentSymbol(location: Node | undefined, outerName: __String, meaning: SymbolFlags): Symbol | undefined { Debug.assert(outerName !== undefined, "outername should always be defined"); - const result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, (symbols, name, meaning) => { - Debug.assertEqual(outerName, name, "name should equal outerName"); - const symbol = getSymbol(symbols, name, meaning); - // Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function - // So the table *contains* `x` but `x` isn't actually in scope. - // However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion. - if (symbol) return symbol; - let candidates: Symbol[]; - if (symbols === globals) { - const primitives = mapDefined( - ["string", "number", "boolean", "object", "bigint", "symbol"], - s => symbols.has((s.charAt(0).toUpperCase() + s.slice(1)) as __String) - ? createSymbol(SymbolFlags.TypeAlias, s as __String) as Symbol - : undefined, - ); - candidates = primitives.concat(arrayFrom(symbols.values())); - } - else { - candidates = arrayFrom(symbols.values()); - } - return getSpellingSuggestionForName(unescapeLeadingUnderscores(name), candidates, meaning); - }); + const result = resolveNameHelperForSuggestions(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true); return result; } @@ -39031,7 +38298,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType(node, /*contextFlags*/ undefined) || unknownType, isTemplateLiteralContextualType)) { return getTemplateLiteralType(texts, types); } - const evaluated = node.parent.kind !== SyntaxKind.TaggedTemplateExpression && evaluateTemplateExpression(node); + const evaluated = node.parent.kind !== SyntaxKind.TaggedTemplateExpression && evaluate(node); return evaluated ? getFreshTypeOfLiteralType(getStringLiteralType(evaluated)) : stringType; } @@ -45417,108 +44684,56 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return value; } - function evaluate(expr: Expression, location?: Declaration): string | number | undefined { - switch (expr.kind) { - case SyntaxKind.PrefixUnaryExpression: - const value = evaluate((expr as PrefixUnaryExpression).operand, location); - if (typeof value === "number") { - switch ((expr as PrefixUnaryExpression).operator) { - case SyntaxKind.PlusToken: - return value; - case SyntaxKind.MinusToken: - return -value; - case SyntaxKind.TildeToken: - return ~value; - } - } - break; - case SyntaxKind.BinaryExpression: - const left = evaluate((expr as BinaryExpression).left, location); - const right = evaluate((expr as BinaryExpression).right, location); - if (typeof left === "number" && typeof right === "number") { - switch ((expr as BinaryExpression).operatorToken.kind) { - case SyntaxKind.BarToken: - return left | right; - case SyntaxKind.AmpersandToken: - return left & right; - case SyntaxKind.GreaterThanGreaterThanToken: - return left >> right; - case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: - return left >>> right; - case SyntaxKind.LessThanLessThanToken: - return left << right; - case SyntaxKind.CaretToken: - return left ^ right; - case SyntaxKind.AsteriskToken: - return left * right; - case SyntaxKind.SlashToken: - return left / right; - case SyntaxKind.PlusToken: - return left + right; - case SyntaxKind.MinusToken: - return left - right; - case SyntaxKind.PercentToken: - return left % right; - case SyntaxKind.AsteriskAsteriskToken: - return left ** right; + function evaluateEntityNameExpression(expr: EntityNameExpression, location?: Declaration) { + if ( + isIdentifier(expr) && isInfinityOrNaNString(expr.escapedText) && + (resolveEntityName(expr, SymbolFlags.Value, /*ignoreErrors*/ true) === getGlobalSymbol(expr.escapedText, SymbolFlags.Value, /*diagnostic*/ undefined)) + ) { + return +(expr.escapedText); + } + if (isEntityNameExpression(expr)) { + const symbol = resolveEntityName(expr, SymbolFlags.Value, /*ignoreErrors*/ true); + if (!symbol) return undefined; + if (symbol.flags & SymbolFlags.EnumMember) { + if (!symbol.valueDeclaration) return undefined; + const enumMember = symbol.valueDeclaration as EnumMember; + if (location) { + if (compilerOptions.isolatedDeclarations && location.parent !== enumMember.parent) { + return undefined; } + return evaluateEnumMember(expr, symbol, location); } - else if ( - (typeof left === "string" || typeof left === "number") && - (typeof right === "string" || typeof right === "number") && - (expr as BinaryExpression).operatorToken.kind === SyntaxKind.PlusToken - ) { - return "" + left + right; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - return (expr as StringLiteralLike).text; - case SyntaxKind.TemplateExpression: - return evaluateTemplateExpression(expr as TemplateExpression, location); - case SyntaxKind.NumericLiteral: - checkGrammarNumericLiteral(expr as NumericLiteral); - return +(expr as NumericLiteral).text; - case SyntaxKind.ParenthesizedExpression: - return evaluate((expr as ParenthesizedExpression).expression, location); - case SyntaxKind.Identifier: { - const identifier = expr as Identifier; - if (isInfinityOrNaNString(identifier.escapedText) && (resolveEntityName(identifier, SymbolFlags.Value, /*ignoreErrors*/ true) === getGlobalSymbol(identifier.escapedText, SymbolFlags.Value, /*diagnostic*/ undefined))) { - return +(identifier.escapedText); - } - // falls through + return getEnumMemberValue(enumMember); } - case SyntaxKind.PropertyAccessExpression: - if (isEntityNameExpression(expr)) { - const symbol = resolveEntityName(expr, SymbolFlags.Value, /*ignoreErrors*/ true); - if (symbol) { - if (symbol.flags & SymbolFlags.EnumMember) { - return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration as EnumMember); - } - if (isConstantVariable(symbol)) { - const declaration = symbol.valueDeclaration; - if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { - return evaluate(declaration.initializer, declaration); - } - } - } + if (!compilerOptions.isolatedDeclarations && isConstantVariable(symbol)) { + const declaration = symbol.valueDeclaration; + if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { + return evaluate(declaration.initializer, declaration); } - break; - case SyntaxKind.ElementAccessExpression: - const root = (expr as ElementAccessExpression).expression; - if (isEntityNameExpression(root) && isStringLiteralLike((expr as ElementAccessExpression).argumentExpression)) { - const rootSymbol = resolveEntityName(root, SymbolFlags.Value, /*ignoreErrors*/ true); - if (rootSymbol && rootSymbol.flags & SymbolFlags.Enum) { - const name = escapeLeadingUnderscores(((expr as ElementAccessExpression).argumentExpression as StringLiteralLike).text); - const member = rootSymbol.exports!.get(name); - if (member) { - return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration as EnumMember); + } + } + return undefined; + } + + function evaluateElementAccessExpression(expr: ElementAccessExpression, location?: Declaration) { + const root = expr.expression; + if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { + const rootSymbol = resolveEntityName(root, SymbolFlags.Value, /*ignoreErrors*/ true); + if (rootSymbol && rootSymbol.flags & SymbolFlags.Enum) { + const name = escapeLeadingUnderscores(expr.argumentExpression.text); + const member = rootSymbol.exports!.get(name); + if (member) { + const enumMember = member.valueDeclaration as EnumMember; + if (location) { + if (compilerOptions.isolatedDeclarations && location.parent !== enumMember.parent) { + return undefined; } + return evaluateEnumMember(expr, member, location); } + return getEnumMemberValue(enumMember); } - break; + } } - return undefined; } function evaluateEnumMember(expr: Expression, symbol: Symbol, location: Declaration) { @@ -45534,19 +44749,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return getEnumMemberValue(declaration as EnumMember); } - function evaluateTemplateExpression(expr: TemplateExpression, location?: Declaration) { - let result = expr.head.text; - for (const span of expr.templateSpans) { - const value = evaluate(span.expression, location); - if (value === undefined) { - return undefined; - } - result += value; - result += span.literal.text; - } - return result; - } - function checkEnumDeclaration(node: EnumDeclaration) { addLazyDiagnostic(() => checkEnumDeclarationWorker(node)); } @@ -48221,13 +47423,25 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { hasSyntacticModifier(parameter, ModifierFlags.ParameterPropertyModifier); } - function isExpandoFunctionDeclaration(node: Declaration): boolean { - const declaration = getParseTreeNode(node, isFunctionDeclaration); + function isExpandoFunction(node: Declaration): boolean { + const declaration = getParseTreeNode(node, (n): n is FunctionDeclaration | VariableDeclaration => isFunctionDeclaration(n) || isVariableDeclaration(n)); if (!declaration) { return false; } - const symbol = getSymbolOfDeclaration(declaration); - if (!symbol || !(symbol.flags & SymbolFlags.Function)) { + let symbol: Symbol; + if (isVariableDeclaration(declaration)) { + if (declaration.type || !isVarConst(declaration)) { + return false; + } + if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { + return false; + } + symbol = getSymbolOfDeclaration(declaration.initializer); + } + else { + symbol = getSymbolOfDeclaration(declaration); + } + if (!symbol || !(symbol.flags & SymbolFlags.Function | SymbolFlags.Variable)) { return false; } return !!forEachEntry(getExportsOfSymbol(symbol), p => p.flags & SymbolFlags.Value && isExpandoPropertyDeclaration(p.valueDeclaration)); @@ -48501,11 +47715,36 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node)) { + if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConstLike(node)) || isEnumMember(node)) { + if (compilerOptions.isolatedDeclarations) { + return !!node.initializer && !node.type && isPrimitiveLiteralValue(node.initializer); + } return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; } + function isLiteralComputedName(node: ComputedPropertyName) { + const expression = node.expression; + if (isPrimitiveLiteralValue(expression, /*includeBigInt*/ false)) { + return true; + } + const type = getTypeOfExpression(expression); + if (!isTypeUsableAsPropertyName(type)) { + return false; + } + + // Only identifiers of the for A.B.C can be used + if (!isEntityNameExpression(expression)) { + return false; + } + const symbol = getSymbolAtLocation(expression); + if (!symbol) { + return false; + } + // Ensure not type narrowing + const declaredType = getTypeOfSymbol(symbol); + return declaredType === type; + } function literalTypeToNode(type: FreshableType, enclosing: Node, tracker: SymbolTracker): Expression { const enumResult = type.flags & TypeFlags.EnumLike ? nodeBuilder.symbolToExpression(type.symbol, SymbolFlags.Value, enclosing, /*flags*/ undefined, tracker) @@ -48594,7 +47833,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { isImplementationOfOverload, isRequiredInitializedParameter, isOptionalUninitializedParameterProperty, - isExpandoFunctionDeclaration, + isExpandoFunction, getPropertiesOfContainerFunction, createTypeOfDeclaration, createReturnTypeOfSignatureDeclaration, @@ -48620,6 +47859,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { getTypeReferenceDirectivesForEntityName, getTypeReferenceDirectivesForSymbol, isLiteralConstDeclaration, + isLiteralComputedName, isLateBound: (nodeIn: Declaration): nodeIn is LateBoundDeclaration => { const node = getParseTreeNode(nodeIn, isDeclaration); const symbol = node && getSymbolOfDeclaration(node); @@ -51056,7 +50296,7 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host: TypeCheckerHo isSourceOfProjectReferenceRedirect: fileName => host.isSourceOfProjectReferenceRedirect(fileName), fileExists: fileName => host.fileExists(fileName), getFileIncludeReasons: () => host.getFileIncludeReasons(), - readFile: host.readFile ? (fileName => host.readFile!(fileName)) : undefined, + readFile: fileName => host.readFile(fileName), }; } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 58c43f7411985..77cfc5dc6caa8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -816,6 +816,15 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ description: Diagnostics.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting, defaultValueDescription: false, }, + { + name: "isolatedDeclarations", + type: "boolean", + category: Diagnostics.Interop_Constraints, + description: Diagnostics.Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information, + defaultValueDescription: false, + affectsBuildInfo: true, + affectsEmit: true, + }, // Strict Type Checks { diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index 8912ffee391f1..a07e302de0d0c 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -4,6 +4,7 @@ import { AssertionLevel, BigIntLiteralType, CheckMode, + Comparer, compareValues, EmitFlags, every, @@ -386,7 +387,7 @@ export namespace Debug { * Formats an enum value as a string for debugging and debug assertions. */ export function formatEnum(value = 0, enumObject: any, isFlags?: boolean) { - const members = getEnumMembers(enumObject); + const members = getEnumMembers(enumObject, isFlags); if (value === 0) { return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0"; } @@ -394,10 +395,10 @@ export namespace Debug { const result: string[] = []; let remainingFlags = value; for (const [enumValue, enumName] of members) { - if (enumValue > value) { + if (enumValue > remainingFlags) { break; } - if (enumValue !== 0 && enumValue & value) { + if (enumValue !== 0 && enumValue & remainingFlags) { result.push(enumName); remainingFlags &= ~enumValue; } @@ -418,7 +419,7 @@ export namespace Debug { const enumMemberCache = new Map>(); - function getEnumMembers(enumObject: any) { + function getEnumMembers(enumObject: any, isFlags?: boolean) { // Assuming enum objects do not change at runtime, we can cache the enum members list // to reuse later. This saves us from reconstructing this each and every time we call // a formatting function (which can be expensive for large enums like SyntaxKind). @@ -435,7 +436,10 @@ export namespace Debug { } } - const sorted = stableSort<[number, string]>(result, (x, y) => compareValues(x[0], y[0])); + const comparer: Comparer<[number, string]> = isFlags ? + (x, y) => compareValues(x[0] >>> 0, y[0] >>> 0) : + (x, y) => compareValues(x[0], y[0]); + const sorted = stableSort(result, comparer); enumMemberCache.set(enumObject, sorted); return sorted; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 1979557243abb..f01ef09380996 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6227,6 +6227,11 @@ "category": "Message", "code": 6718 }, + "Ensure that each file can have declaration emit generated without type information": { + "category": "Message", + "code": 6719 + }, + "Default catch clause variables as 'unknown' instead of 'any'.": { "category": "Message", "code": 6803 @@ -6741,6 +6746,130 @@ "category": "Error", "code": 9006 }, + "Function must have an explicit return type annotation with --isolatedDeclarations.": { + "category": "Error", + "code": 9007 + }, + "Method must have an explicit return type annotation with --isolatedDeclarations.": { + "category": "Error", + "code": 9008 + }, + "At least one accessor must have an explicit return type annotation with --isolatedDeclarations.": { + "category": "Error", + "code": 9009 + }, + "Variable must have an explicit type annotation with --isolatedDeclarations.": { + "category": "Error", + "code": 9010 + }, + "Parameter must have an explicit type annotation with --isolatedDeclarations.": { + "category": "Error", + "code": 9011 + }, + "Property must have an explicit type annotation with --isolatedDeclarations.": { + "category": "Error", + "code": 9012 + }, + "Expression type can't be inferred with --isolatedDeclarations.": { + "category": "Error", + "code": 9013 + }, + "Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations.": { + "category": "Error", + "code": 9014 + }, + "Objects that contain spread assignments can't be inferred with --isolatedDeclarations.": { + "category": "Error", + "code": 9015 + }, + "Objects that contain shorthand properties can't be inferred with --isolatedDeclarations.": { + "category": "Error", + "code": 9016 + }, + "Only const arrays can be inferred with --isolatedDeclarations.": { + "category": "Error", + "code": 9017 + }, + "Arrays with spread elements can't inferred with --isolatedDeclarations.": { + "category": "Error", + "code": 9018 + }, + "Binding elements can't be exported directly with --isolatedDeclarations.": { + "category": "Error", + "code": 9019 + }, + "Enum member initializers must be computable without references to external symbols with --isolatedDeclarations.": { + "category": "Error", + "code": 9020 + }, + "Extends clause can't contain an expression with --isolatedDeclarations.": { + "category": "Error", + "code": 9021 + }, + "Inference from class expressions is not supported with --isolatedDeclarations.": { + "category": "Error", + "code": 9022 + }, + "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function.": { + "category": "Error", + "code": 9023 + }, + "Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations": { + "category": "Error", + "code": 9024 + }, + "Reference directives are not supported with --isolatedDeclarations.": { + "category": "Error", + "code": 9025 + }, + "Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations.": { + "category": "Error", + "code": 9026 + }, + "Add a type annotation to the variable {0}.": { + "category": "Error", + "code": 9027 + }, + "Add a type annotation to the parameter {0}.": { + "category": "Error", + "code": 9028 + }, + "Add a type annotation to the property {0}.": { + "category": "Error", + "code": 9029 + }, + "Add a return type to the function expression.": { + "category": "Error", + "code": 9030 + }, + "Add a return type to the function declaration.": { + "category": "Error", + "code": 9031 + }, + "Add a return type to the get accessor declaration.": { + "category": "Error", + "code": 9032 + }, + "Add a type to parameter of the set accessor declaration.": { + "category": "Error", + "code": 9033 + }, + "Add a return type to the method": { + "category": "Error", + "code": 9034 + }, + "Add a type assertion to this expression to make type type explicit.": { + "category": "Error", + "code": 9035 + }, + "Move the expression in default export to a variable and add a type annotation to it.": { + "category": "Error", + "code": 9036 + }, + "Default exports can't be inferred with --isolatedDeclarations.": { + "category": "Error", + "code": 9037 + }, "JSX attributes must only be assigned a non-empty 'expression'.": { "category": "Error", "code": 17000 @@ -7055,6 +7184,42 @@ "category": "Message", "code": 90060 }, + "Add annotation of type '{0}'": { + "category": "Message", + "code": 90061 + }, + "Add return type '{0}'": { + "category": "Message", + "code": 90062 + }, + "Extract base class to variable": { + "category": "Message", + "code": 90064 + }, + "Extract default export to variable": { + "category": "Message", + "code": 90065 + }, + "Extract binding expressions to variable": { + "category": "Message", + "code": 90066 + }, + "Add all missing type annotations": { + "category": "Message", + "code": 90067 + }, + "Add inline type assertion to '{0}'": { + "category": "Message", + "code": 90068 + }, + "Extract to variable and replace with '{0} typeof {0}'": { + "category": "Message", + "code": 90069 + }, + "Mark array literal as const": { + "category": "Message", + "code": 90070 + }, "Convert function to an ES2015 class": { "category": "Message", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 3afb23c6df378..c0b638b2ba8bf 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -57,6 +57,7 @@ import { ConstructSignatureDeclaration, contains, ContinueStatement, + CoreEmitHost, createBinaryExpressionTrampoline, createDiagnosticCollection, createGetCanonicalFileName, @@ -403,6 +404,7 @@ import { SourceFilePrologueInfo, SourceMapEmitResult, SourceMapGenerator, + SourceMapOptions, SourceMapSource, SpreadAssignment, SpreadElement, @@ -737,6 +739,62 @@ export function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName return getOutputs(); } +/** @internal */ +export function getSourceMapDirectory(host: CoreEmitHost, mapOptions: SourceMapOptions, filePath: string, sourceFile: SourceFile | undefined) { + if (mapOptions.sourceRoot) return host.getCommonSourceDirectory(); + if (mapOptions.mapRoot) { + let sourceMapDir = normalizeSlashes(mapOptions.mapRoot); + if (sourceFile) { + // For modules or multiple emit files the mapRoot will have directory structure like the sources + // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map + sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFile.fileName, host, sourceMapDir)); + } + if (getRootLength(sourceMapDir) === 0) { + // The relative paths are relative to the common directory + sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir); + } + return sourceMapDir; + } + return getDirectoryPath(normalizePath(filePath)); +} + +/** @internal */ +export function getSourceMappingURL(host: CoreEmitHost, mapOptions: SourceMapOptions, sourceMapGenerator: SourceMapGenerator, filePath: string, sourceMapFilePath: string | undefined, sourceFile: SourceFile | undefined) { + if (mapOptions.inlineSourceMap) { + // Encode the sourceMap into the sourceMap url + const sourceMapText = sourceMapGenerator.toString(); + const base64SourceMapText = base64encode(sys, sourceMapText); + return `data:application/json;base64,${base64SourceMapText}`; + } + + const sourceMapFile = getBaseFileName(normalizeSlashes(Debug.checkDefined(sourceMapFilePath))); + if (mapOptions.mapRoot) { + let sourceMapDir = normalizeSlashes(mapOptions.mapRoot); + if (sourceFile) { + // For modules or multiple emit files the mapRoot will have directory structure like the sources + // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map + sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFile.fileName, host, sourceMapDir)); + } + if (getRootLength(sourceMapDir) === 0) { + // The relative paths are relative to the common directory + sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir); + return encodeURI( + getRelativePathToDirectoryOrUrl( + getDirectoryPath(normalizePath(filePath)), // get the relative sourceMapDir path based on jsFilePath + combinePaths(sourceMapDir, sourceMapFile), // this is where user expects to see sourceMap + host.getCurrentDirectory(), + host.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ true, + ), + ); + } + else { + return encodeURI(combinePaths(sourceMapDir, sourceMapFile)); + } + } + return encodeURI(sourceMapFile); +} + /** @internal */ export function getFirstProjectOutput(configFile: ParsedCommandLine, ignoreCase: boolean): string { if (outFile(configFile.options)) { @@ -998,7 +1056,7 @@ export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFi host, getBaseFileName(normalizeSlashes(jsFilePath)), getSourceRoot(mapOptions), - getSourceMapDirectory(mapOptions, jsFilePath, sourceFile), + getSourceMapDirectory(host, mapOptions, jsFilePath, sourceFile), mapOptions, ); } @@ -1020,6 +1078,7 @@ export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFi } const sourceMappingURL = getSourceMappingURL( + host, mapOptions, sourceMapGenerator, jsFilePath, @@ -1055,15 +1114,6 @@ export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFi writer.clear(); } - interface SourceMapOptions { - sourceMap?: boolean; - inlineSourceMap?: boolean; - inlineSources?: boolean; - sourceRoot?: string; - mapRoot?: string; - extendedDiagnostics?: boolean; - } - function shouldEmitSourceMaps(mapOptions: SourceMapOptions, sourceFileOrBundle: SourceFile | Bundle) { return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== SyntaxKind.SourceFile || !fileExtensionIs(sourceFileOrBundle.fileName, Extension.Json)); @@ -1075,60 +1125,6 @@ export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFi const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); return sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot; } - - function getSourceMapDirectory(mapOptions: SourceMapOptions, filePath: string, sourceFile: SourceFile | undefined) { - if (mapOptions.sourceRoot) return host.getCommonSourceDirectory(); - if (mapOptions.mapRoot) { - let sourceMapDir = normalizeSlashes(mapOptions.mapRoot); - if (sourceFile) { - // For modules or multiple emit files the mapRoot will have directory structure like the sources - // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map - sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFile.fileName, host, sourceMapDir)); - } - if (getRootLength(sourceMapDir) === 0) { - // The relative paths are relative to the common directory - sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - } - return sourceMapDir; - } - return getDirectoryPath(normalizePath(filePath)); - } - - function getSourceMappingURL(mapOptions: SourceMapOptions, sourceMapGenerator: SourceMapGenerator, filePath: string, sourceMapFilePath: string | undefined, sourceFile: SourceFile | undefined) { - if (mapOptions.inlineSourceMap) { - // Encode the sourceMap into the sourceMap url - const sourceMapText = sourceMapGenerator.toString(); - const base64SourceMapText = base64encode(sys, sourceMapText); - return `data:application/json;base64,${base64SourceMapText}`; - } - - const sourceMapFile = getBaseFileName(normalizeSlashes(Debug.checkDefined(sourceMapFilePath))); - if (mapOptions.mapRoot) { - let sourceMapDir = normalizeSlashes(mapOptions.mapRoot); - if (sourceFile) { - // For modules or multiple emit files the mapRoot will have directory structure like the sources - // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map - sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFile.fileName, host, sourceMapDir)); - } - if (getRootLength(sourceMapDir) === 0) { - // The relative paths are relative to the common directory - sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - return encodeURI( - getRelativePathToDirectoryOrUrl( - getDirectoryPath(normalizePath(filePath)), // get the relative sourceMapDir path based on jsFilePath - combinePaths(sourceMapDir, sourceMapFile), // this is where user expects to see sourceMap - host.getCurrentDirectory(), - host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ true, - ), - ); - } - else { - return encodeURI(combinePaths(sourceMapDir, sourceMapFile)); - } - } - return encodeURI(sourceMapFile); - } } /** @internal */ @@ -1163,7 +1159,8 @@ export const notImplementedResolver: EmitResolver = { isImplementationOfOverload: notImplemented, isRequiredInitializedParameter: notImplemented, isOptionalUninitializedParameterProperty: notImplemented, - isExpandoFunctionDeclaration: notImplemented, + isExpandoFunction: notImplemented, + isLiteralComputedName: notImplemented, getPropertiesOfContainerFunction: notImplemented, createTypeOfDeclaration: notImplemented, createReturnTypeOfSignatureDeclaration: notImplemented, diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 1da0c9e834be3..d80f0ff5ea1c9 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -1065,7 +1065,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCan let maybeBlockedByTypesVersions = false; const cachedPackageJson = host.getPackageJsonInfoCache?.()?.getPackageJsonInfo(packageJsonPath); if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) { - const packageJsonContent: Record | undefined = cachedPackageJson?.contents.packageJsonContent || tryParseJson(host.readFile!(packageJsonPath)!); + const packageJsonContent: Record | undefined = cachedPackageJson?.contents.packageJsonContent || tryParseJson(host.readFile(packageJsonPath)!); const importMode = overrideMode || importingSourceFile.impliedNodeFormat; if (getResolvePackageJsonExports(options)) { // The package name that we found in node_modules could be different from the package diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6dd6cb6de43fe..b68f3641c122c 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -4171,6 +4171,16 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } } + if (options.isolatedDeclarations) { + if (options.out) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "out", "isolatedDeclarations"); + } + + if (options.outFile) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "outFile", "isolatedDeclarations"); + } + } + if (options.inlineSourceMap) { if (options.sourceMap) { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceMap", "inlineSourceMap"); diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index 6a5af5699b3f4..e9cb2409588e3 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -33,7 +33,7 @@ export interface SourceMapGeneratorOptions { } /** @internal */ -export function createSourceMapGenerator(host: EmitHost, file: string, sourceRoot: string, sourcesDirectoryPath: string, generatorOptions: SourceMapGeneratorOptions): SourceMapGenerator { +export function createSourceMapGenerator(host: Pick, file: string, sourceRoot: string, sourcesDirectoryPath: string, generatorOptions: SourceMapGeneratorOptions): SourceMapGenerator { // Why var? It avoids TDZ checks in the runtime which can be costly. // See: https://github.com/microsoft/TypeScript/issues/52924 /* eslint-disable no-var */ diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 3a37fe0f2d3f4..28e17448e2cff 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -40,6 +40,7 @@ import { NodeFlags, noop, notImplemented, + NullTransformationContext, returnUndefined, ScriptTarget, setEmitFlags, @@ -49,6 +50,7 @@ import { SyntaxKind, tracing, TransformationContext, + TransformationContextKind, TransformationResult, transformClassFields, transformDeclarations, @@ -267,6 +269,7 @@ export function transformNodes(resolver: EmitResolver | undefine // The transformation context is provided to each transformer as part of transformer // initialization. const context: TransformationContext = { + kind: TransformationContextKind.FullContext, factory, getCompilerOptions: () => options, getEmitResolver: () => resolver!, // TODO: GH#18217 @@ -664,7 +667,8 @@ export function transformNodes(resolver: EmitResolver | undefine } /** @internal */ -export const nullTransformationContext: TransformationContext = { +export const nullTransformationContext: NullTransformationContext = { + kind: TransformationContextKind.NullContext, factory: factory, // eslint-disable-line object-shorthand getCompilerOptions: () => ({}), getEmitResolver: notImplemented, diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 0a9e58c6de3b8..df09f52e25c7f 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1,4 +1,5 @@ import { + __String, AccessorDeclaration, addRelatedInfo, AllAccessorDeclarations, @@ -21,10 +22,13 @@ import { ConstructorTypeNode, ConstructSignatureDeclaration, contains, + CoreEmitResolver, createDiagnosticForNode, + createDiagnosticForRange, createEmptyExports, createGetSymbolAccessibilityDiagnosticForNode, createGetSymbolAccessibilityDiagnosticForNodeName, + createLocalInferenceResolver, createSymbolTable, createUnparsedSourceFile, Debug, @@ -77,6 +81,8 @@ import { hasDynamicName, hasEffectiveModifier, hasExtension, + hasIdentifierComputedName, + HasInferredType, hasJSDocNodes, HasModifiers, hasSyntacticModifier, @@ -92,6 +98,7 @@ import { isAnyImportSyntax, isArray, isArrayBindingElement, + isBinaryExpression, isBindingElement, isBindingPattern, isClassDeclaration, @@ -120,12 +127,14 @@ import { isInternalDeclaration, isJsonSourceFile, isLateVisibilityPaintedStatement, + isLiteralExpression, isLiteralImportTypeNode, isMappedTypeNode, isMethodDeclaration, isMethodSignature, isModifier, isModuleDeclaration, + IsolatedTransformationContext, isOmittedExpression, isPrivateIdentifier, isPropertySignature, @@ -202,6 +211,7 @@ import { SyntaxKind, toFileNameLowerCase, TransformationContext, + TransformationContextKind, transformNodes, tryCast, tryGetModuleSpecifierFromDeclaration, @@ -245,7 +255,7 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals * * @internal */ -export function transformDeclarations(context: TransformationContext) { +export function transformDeclarations(context: TransformationContext | IsolatedTransformationContext) { const throwDiagnostic = () => Debug.fail("Diagnostic emitted without context"); let getSymbolAccessibilityDiagnostic: GetSymbolAccessibilityDiagnostic = throwDiagnostic; let needsDeclare = true; @@ -254,28 +264,15 @@ export function transformDeclarations(context: TransformationContext) { let needsScopeFixMarker = false; let resultHasScopeMarker = false; let enclosingDeclaration: Node; - let necessaryTypeReferences: Set<[specifier: string, mode: ResolutionMode]> | undefined; + let necessaryTypeReferences: Map<[specifier: string, mode: ResolutionMode], Node | undefined> | undefined; + let existingTypeReferencesSources: readonly SourceFile[] | undefined; let lateMarkedStatements: LateVisibilityPaintedStatement[] | undefined; let lateStatementReplacementMap: Map>; let suppressNewDiagnosticContexts: boolean; let exportedModulesFromDeclarationEmit: Symbol[] | undefined; const { factory } = context; - const host = context.getEmitHost(); - const symbolTracker: SymbolTracker = { - trackSymbol, - reportInaccessibleThisError, - reportInaccessibleUniqueSymbolError, - reportCyclicStructureError, - reportPrivateInBaseOfClassExpression, - reportLikelyUnsafeImportRequiredError, - reportTruncationError, - moduleResolverHost: host, - trackReferencedAmbientModule, - trackExternalModuleSymbolOfImportTypeNode, - reportNonlocalAugmentation, - reportNonSerializableProperty, - }; + let errorNameNode: DeclarationName | undefined; let errorFallbackNode: Declaration | undefined; @@ -283,26 +280,101 @@ export function transformDeclarations(context: TransformationContext) { let refs: Map; let libs: Map; let emittedImports: readonly AnyImportSyntax[] | undefined; // must be declared in container so it can be `undefined` while transformer's first pass - const resolver = context.getEmitResolver(); + const { localInferenceResolver, isolatedDeclarations, host, resolver, symbolTracker, ensureNoInitializer, useLocalInferenceTypePrint } = createTransformerServices(); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; return transformRoot; - function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined): void { + function createTransformerServices() { + const isolatedDeclarations = context.getCompilerOptions().isolatedDeclarations; + + if (isolatedDeclarations) { + const localInferenceResolver = createLocalInferenceResolver({ + ensureParameter, + context, + visitDeclarationSubtree, + setEnclosingDeclarations(node) { + const oldNode = enclosingDeclaration; + enclosingDeclaration = node; + return oldNode; + }, + checkEntityNameVisibility(name, container) { + return checkEntityNameVisibility(name, container ?? enclosingDeclaration); + }, + }); + if (context.kind === TransformationContextKind.IsolatedContext) { + const resolver: CoreEmitResolver = context.getEmitResolver(); + // Ideally nothing should require the symbol tracker in isolated declarations mode. + // createLiteralConstValue is the one exception + const emptySymbolTracker = {}; + return { + isolatedDeclarations, + useLocalInferenceTypePrint: true, + resolver, + localInferenceResolver, + symbolTracker: undefined, + host: undefined, + ensureNoInitializer: createEnsureNoInitializer(emptySymbolTracker), + } as const; + } + else { + const host = context.getEmitHost(); + const resolver: EmitResolver = context.getEmitResolver(); + const symbolTracker = createSymbolTracker(resolver, host); + return { + isolatedDeclarations, + useLocalInferenceTypePrint: false, + resolver, + localInferenceResolver, + symbolTracker, + host, + ensureNoInitializer: createEnsureNoInitializer(symbolTracker), + } as const; + } + } + else { + Debug.assert(context.kind === TransformationContextKind.FullContext); + const host = context.getEmitHost(); + const resolver = context.getEmitResolver(); + const symbolTracker: SymbolTracker = createSymbolTracker(resolver, host); + return { + isolatedDeclarations: false, + useLocalInferenceTypePrint: false, + localInferenceResolver: undefined, + resolver, + symbolTracker, + host, + ensureNoInitializer: createEnsureNoInitializer(symbolTracker), + } as const; + } + + function createEnsureNoInitializer(symbolTracker: SymbolTracker) { + return function ensureNoInitializer(node: CanHaveLiteralInitializer) { + if (shouldPrintWithInitializer(node)) { + return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe + } + return undefined; + }; + } + } + function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined, requestingNode: Node | undefined): void { if (!typeReferenceDirectives) { return; } - necessaryTypeReferences = necessaryTypeReferences || new Set(); + necessaryTypeReferences = necessaryTypeReferences || new Map(); for (const ref of typeReferenceDirectives) { - necessaryTypeReferences.add(ref); + necessaryTypeReferences.set(ref, requestingNode); } } function trackReferencedAmbientModule(node: ModuleDeclaration, symbol: Symbol) { + // We forbid references in isolated declarations no need to report any errors on them + if (isolatedDeclarations) return; + // If it is visible via `// `, then we should just use that const directives = resolver.getTypeReferenceDirectivesForSymbol(symbol, SymbolFlags.All); if (length(directives)) { - return recordTypeReferenceDirectivesIfNecessary(directives); + return recordTypeReferenceDirectivesIfNecessary(directives, /*requestingNode*/ undefined); } // Otherwise we should emit a path-based reference const container = getSourceFileOfNode(node); @@ -321,6 +393,47 @@ export function transformDeclarations(context: TransformationContext) { } } + function forbidReferenceDirectives(file: SourceFile) { + if (!isolatedDeclarations) { + return; + } + file.libReferenceDirectives.forEach(ref => { + context.addDiagnostic(createDiagnosticForRange( + file, + ref, + Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations, + )); + }); + file.typeReferenceDirectives.forEach(ref => { + context.addDiagnostic(createDiagnosticForRange( + file, + ref, + Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations, + )); + }); + file.referencedFiles.forEach(ref => { + context.addDiagnostic(createDiagnosticForRange( + file, + ref, + Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations, + )); + }); + } + + function handleTypeReferenceError(typeReferenceDirective: [specifier: string, mode: ResolutionMode], requestingNode: Node) { + if (!isolatedDeclarations) { + return; + } + const existingDirective = existingTypeReferencesSources?.some(s => s.typeReferenceDirectives.some(d => d.fileName === typeReferenceDirective[0])); + if (!existingDirective) { + context.addDiagnostic(createDiagnosticForNode( + requestingNode, + Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_which_are_not_supported_with_isolatedDeclarations, + typeReferenceDirective[0], + )); + } + } + 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 @@ -351,85 +464,101 @@ export function transformDeclarations(context: TransformationContext) { } return false; } - - function trackExternalModuleSymbolOfImportTypeNode(symbol: Symbol) { - if (!isBundledEmit) { - (exportedModulesFromDeclarationEmit || (exportedModulesFromDeclarationEmit = [])).push(symbol); + function createSymbolTracker(resolver: EmitResolver, host: EmitHost): SymbolTracker { + function trackExternalModuleSymbolOfImportTypeNode(symbol: Symbol) { + if (!isBundledEmit) { + (exportedModulesFromDeclarationEmit || (exportedModulesFromDeclarationEmit = [])).push(symbol); + } } - } - function trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) { - if (symbol.flags & SymbolFlags.TypeParameter) return false; - const issuedDiagnostic = handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasToMarkVisible*/ true)); - recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning)); - return issuedDiagnostic; - } - - function reportPrivateInBaseOfClassExpression(propertyName: string) { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic( - createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName), - ); + function trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) { + if (symbol.flags & SymbolFlags.TypeParameter) return false; + const issuedDiagnostic = handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasToMarkVisible*/ true)); + recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning), enclosingDeclaration ?? currentSourceFile); + return issuedDiagnostic; + } + function reportPrivateInBaseOfClassExpression(propertyName: string) { + if (errorNameNode || errorFallbackNode) { + context.addDiagnostic( + createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName), + ); + } } - } - function errorDeclarationNameWithFallback() { - return errorNameNode ? declarationNameToString(errorNameNode) : - errorFallbackNode && getNameOfDeclaration(errorFallbackNode) ? declarationNameToString(getNameOfDeclaration(errorFallbackNode)) : - errorFallbackNode && isExportAssignment(errorFallbackNode) ? errorFallbackNode.isExportEquals ? "export=" : "default" : - "(Missing)"; // same fallback declarationNameToString uses when node is zero-width (ie, nameless) - } + function errorDeclarationNameWithFallback() { + return errorNameNode ? declarationNameToString(errorNameNode) : + errorFallbackNode && getNameOfDeclaration(errorFallbackNode) ? declarationNameToString(getNameOfDeclaration(errorFallbackNode)) : + errorFallbackNode && isExportAssignment(errorFallbackNode) ? errorFallbackNode.isExportEquals ? "export=" : "default" : + "(Missing)"; // same fallback declarationNameToString uses when node is zero-width (ie, nameless) + } - function reportInaccessibleUniqueSymbolError() { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "unique symbol")); + function reportInaccessibleUniqueSymbolError() { + if (errorNameNode || errorFallbackNode) { + context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "unique symbol")); + } } - } - function reportCyclicStructureError() { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, errorDeclarationNameWithFallback())); + function reportCyclicStructureError() { + if (errorNameNode || errorFallbackNode) { + context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, errorDeclarationNameWithFallback())); + } } - } - function reportInaccessibleThisError() { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "this")); + function reportInaccessibleThisError() { + if (errorNameNode || errorFallbackNode) { + context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "this")); + } } - } - function reportLikelyUnsafeImportRequiredError(specifier: string) { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier)); + function reportLikelyUnsafeImportRequiredError(specifier: string) { + if (errorNameNode || errorFallbackNode) { + context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier)); + } } - } - function reportTruncationError() { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed)); + function reportTruncationError() { + if (errorNameNode || errorFallbackNode) { + context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed)); + } } - } - function reportNonlocalAugmentation(containingFile: SourceFile, parentSymbol: Symbol, symbol: Symbol) { - const primaryDeclaration = parentSymbol.declarations?.find(d => getSourceFileOfNode(d) === containingFile); - const augmentingDeclarations = filter(symbol.declarations, d => getSourceFileOfNode(d) !== containingFile); - if (primaryDeclaration && augmentingDeclarations) { - for (const augmentations of augmentingDeclarations) { - context.addDiagnostic(addRelatedInfo( - createDiagnosticForNode(augmentations, Diagnostics.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized), - createDiagnosticForNode(primaryDeclaration, Diagnostics.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file), - )); + function reportNonlocalAugmentation(containingFile: SourceFile, parentSymbol: Symbol, symbol: Symbol) { + const primaryDeclaration = parentSymbol.declarations?.find(d => getSourceFileOfNode(d) === containingFile); + const augmentingDeclarations = filter(symbol.declarations, d => getSourceFileOfNode(d) !== containingFile); + if (primaryDeclaration && augmentingDeclarations) { + for (const augmentations of augmentingDeclarations) { + context.addDiagnostic(addRelatedInfo( + createDiagnosticForNode(augmentations, Diagnostics.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized), + createDiagnosticForNode(primaryDeclaration, Diagnostics.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file), + )); + } } } - } - function reportNonSerializableProperty(propertyName: string) { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName)); + function reportNonSerializableProperty(propertyName: string) { + if (errorNameNode || errorFallbackNode) { + context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName)); + } } + return { + moduleResolverHost: host, + reportCyclicStructureError, + reportInaccessibleThisError, + reportInaccessibleUniqueSymbolError, + reportLikelyUnsafeImportRequiredError, + reportNonlocalAugmentation, + reportNonSerializableProperty, + reportPrivateInBaseOfClassExpression, + reportTruncationError, + trackExternalModuleSymbolOfImportTypeNode, + trackReferencedAmbientModule, + trackSymbol, + }; } function transformDeclarationsForJS(sourceFile: SourceFile, bundled?: boolean) { + // Not currently supporting JS files + if (isolatedDeclarations) return undefined; const oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = s => (s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : ({ diagnosticMessage: s.errorModuleName @@ -454,7 +583,9 @@ export function transformDeclarations(context: TransformationContext) { isBundledEmit = true; refs = new Map(); libs = new Map(); + existingTypeReferencesSources = node.sourceFiles; let hasNoDefaultLib = false; + Debug.assert(!isolatedDeclarations, "Bundles are not supported in isolated declarations"); const bundle = factory.createBundle( map(node.sourceFiles, sourceFile => { if (sourceFile.isDeclarationFile) return undefined!; // Omit declaration files from bundle results, too // TODO: GH#18217 @@ -477,7 +608,7 @@ export function transformDeclarations(context: TransformationContext) { sourceFile, [factory.createModuleDeclaration( [factory.createModifier(SyntaxKind.DeclareKeyword)], - factory.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), + factory.createStringLiteral(getResolvedExternalModuleName(host, sourceFile)), factory.createModuleBlock(setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)), )], /*isDeclarationFile*/ true, @@ -489,6 +620,7 @@ export function transformDeclarations(context: TransformationContext) { return newFile; } needsDeclare = true; + forbidReferenceDirectives(sourceFile); const updated = isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes(sourceFile.statements, visitDeclarationStatements, isStatement); return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), /*isDeclarationFile*/ true, /*referencedFiles*/ [], /*typeReferences*/ [], /*hasNoDefaultLib*/ false, /*libReferences*/ []); }), @@ -497,7 +629,7 @@ export function transformDeclarations(context: TransformationContext) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); - recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, ref => [ref.fileName, ref.resolutionMode])); + recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, ref => [ref.fileName, ref.resolutionMode]), /*requestingNode*/ undefined); collectLibs(sourceFile, libs); return sourceFile; } @@ -508,9 +640,11 @@ export function transformDeclarations(context: TransformationContext) { bundle.syntheticTypeReferences = getFileReferencesForUsedTypeReferences(); bundle.syntheticLibReferences = getLibReferences(); bundle.hasNoDefaultLib = hasNoDefaultLib; - const outputFilePath = getDirectoryPath(normalizeSlashes(getOutputPathsFor(node, host, /*forceDtsPaths*/ true).declarationFilePath!)); - const referenceVisitor = mapReferencesIntoArray(bundle.syntheticFileReferences as FileReference[], outputFilePath); - refs.forEach(referenceVisitor); + if (!isolatedDeclarations) { + const outputFilePath = getDirectoryPath(normalizeSlashes(getOutputPathsFor(node, host, /*forceDtsPaths*/ true).declarationFilePath!)); + const referenceVisitor = mapReferencesIntoArray(bundle.syntheticFileReferences as FileReference[], outputFilePath); + refs.forEach(referenceVisitor); + } return bundle; } @@ -520,6 +654,7 @@ export function transformDeclarations(context: TransformationContext) { resultHasScopeMarker = false; enclosingDeclaration = node; currentSourceFile = node; + existingTypeReferencesSources = [node]; getSymbolAccessibilityDiagnostic = throwDiagnostic; isBundledEmit = false; resultHasExternalModuleIndicator = false; @@ -530,24 +665,37 @@ export function transformDeclarations(context: TransformationContext) { refs = collectReferences(currentSourceFile, new Map()); libs = collectLibs(currentSourceFile, new Map()); const references: FileReference[] = []; - const outputFilePath = getDirectoryPath(normalizeSlashes(getOutputPathsFor(node, host, /*forceDtsPaths*/ true).declarationFilePath!)); - const referenceVisitor = mapReferencesIntoArray(references, outputFilePath); + + const outputFilePath = isolatedDeclarations ? undefined : getDirectoryPath(normalizeSlashes(getOutputPathsFor(node, host, /*forceDtsPaths*/ true).declarationFilePath!)); + const referenceVisitor = outputFilePath === undefined ? undefined : mapReferencesIntoArray(references, outputFilePath); let combinedStatements: NodeArray; if (isSourceFileJS(currentSourceFile)) { combinedStatements = factory.createNodeArray(transformDeclarationsForJS(node)); - refs.forEach(referenceVisitor); + if (referenceVisitor) refs.forEach(referenceVisitor); emittedImports = filter(combinedStatements, isAnyImportSyntax); } else { const statements = visitNodes(node.statements, visitDeclarationStatements, isStatement); combinedStatements = setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements); - refs.forEach(referenceVisitor); + if (referenceVisitor) refs.forEach(referenceVisitor); emittedImports = filter(combinedStatements, isAnyImportSyntax); if (isExternalModule(node) && (!resultHasExternalModuleIndicator || (needsScopeFixMarker && !resultHasScopeMarker))) { combinedStatements = setTextRange(factory.createNodeArray([...combinedStatements, createEmptyExports(factory)]), combinedStatements); } } - const updated = factory.updateSourceFile(node, combinedStatements, /*isDeclarationFile*/ true, references, getFileReferencesForUsedTypeReferences(), node.hasNoDefaultLib, getLibReferences()); + const typeReferences = getFileReferencesForUsedTypeReferences(); + const libReferences = getLibReferences(); + forbidReferenceDirectives(node); + + const updated = factory.updateSourceFile( + node, + combinedStatements, + /*isDeclarationFile*/ true, + isolatedDeclarations ? [] : references, + isolatedDeclarations ? [] : typeReferences, + node.hasNoDefaultLib, + isolatedDeclarations ? [] : libReferences, + ); updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit; return updated; @@ -556,10 +704,10 @@ export function transformDeclarations(context: TransformationContext) { } function getFileReferencesForUsedTypeReferences() { - return necessaryTypeReferences ? mapDefined(arrayFrom(necessaryTypeReferences.keys()), getFileReferenceForSpecifierModeTuple) : []; + return necessaryTypeReferences ? mapDefined(arrayFrom(necessaryTypeReferences.entries()), getFileReferenceForSpecifierModeTuple) : []; } - function getFileReferenceForSpecifierModeTuple([typeName, mode]: [specifier: string, mode: ResolutionMode]): FileReference | undefined { + function getFileReferenceForSpecifierModeTuple([[typeName, mode], requestingNode]: [[specifier: string, mode: ResolutionMode], Node | undefined]): FileReference | undefined { // Elide type references for which we have imports if (emittedImports) { for (const importStatement of emittedImports) { @@ -574,11 +722,15 @@ export function transformDeclarations(context: TransformationContext) { } } } + if (requestingNode) { + handleTypeReferenceError([typeName, mode], requestingNode); + } return { fileName: typeName, pos: -1, end: -1, ...(mode ? { resolutionMode: mode } : undefined) }; } function mapReferencesIntoArray(references: FileReference[], outputFilePath: string): (file: SourceFile) => void { return file => { + if (isolatedDeclarations) return; if (exportedModulesFromDeclarationEmit?.includes(file.symbol)) { // Already have an import declaration resolving to this file return; @@ -606,7 +758,7 @@ export function transformDeclarations(context: TransformationContext) { // If some compiler option/symlink/whatever allows access to the file containing the ambient module declaration // via a non-relative name, emit a type reference directive to that non-relative name, rather than // a relative path to the declaration file - recordTypeReferenceDirectivesIfNecessary([[specifier, /*mode*/ undefined]]); + recordTypeReferenceDirectivesIfNecessary([[specifier, /*mode*/ undefined]], /*requestingNode*/ undefined); return; } @@ -634,7 +786,7 @@ export function transformDeclarations(context: TransformationContext) { } function collectReferences(sourceFile: SourceFile | UnparsedSource, ret: Map) { - if (noResolve || (!isUnparsedSource(sourceFile) && isSourceFileJS(sourceFile))) return ret; + if (isolatedDeclarations || noResolve || (!isUnparsedSource(sourceFile) && isSourceFileJS(sourceFile))) return ret; forEach(sourceFile.referencedFiles, f => { const elem = host.getSourceFileFromReference(sourceFile, f); if (elem) { @@ -645,6 +797,7 @@ export function transformDeclarations(context: TransformationContext) { } function collectLibs(sourceFile: SourceFile | UnparsedSource, ret: Map) { + if (isolatedDeclarations) return ret; forEach(sourceFile.libReferenceDirectives, ref => { const lib = host.getLibFileFromReference(ref); if (lib) { @@ -711,27 +864,6 @@ export function transformDeclarations(context: TransformationContext) { return canHaveLiteralInitializer(node) && resolver.isLiteralConstDeclaration(getParseTreeNode(node) as CanHaveLiteralInitializer); // TODO: Make safe } - function ensureNoInitializer(node: CanHaveLiteralInitializer) { - if (shouldPrintWithInitializer(node)) { - return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe - } - return undefined; - } - - type HasInferredType = - | FunctionDeclaration - | MethodDeclaration - | GetAccessorDeclaration - | SetAccessorDeclaration - | BindingElement - | ConstructSignatureDeclaration - | VariableDeclaration - | MethodSignature - | CallSignatureDeclaration - | ParameterDeclaration - | PropertyDeclaration - | PropertySignature; - function ensureType(node: HasInferredType, type: TypeNode | undefined, ignorePrivate?: boolean): TypeNode | undefined { if (!ignorePrivate && hasEffectiveModifier(node, ModifierFlags.Private)) { // Private nodes emit no types (except private parameter properties, whose parameter types are actually visible) @@ -741,6 +873,12 @@ export function transformDeclarations(context: TransformationContext) { // Literal const declarations will have an initializer ensured rather than a type return; } + if (isolatedDeclarations) { + const { typeNode, isInvalid } = localInferenceResolver.fromInitializer(node, type, currentSourceFile); + if (useLocalInferenceTypePrint || isInvalid) { + return typeNode; + } + } const shouldUseResolverType = node.kind === SyntaxKind.Parameter && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); @@ -888,7 +1026,7 @@ export function transformDeclarations(context: TransformationContext) { function checkEntityNameVisibility(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node) { const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); - recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); + recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName), entityName); } function preserveJsDoc(updated: T, original: Node): T { @@ -900,12 +1038,16 @@ export function transformDeclarations(context: TransformationContext) { function rewriteModuleSpecifier(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode, input: T | undefined): T | StringLiteral { if (!input) return undefined!; // TODO: GH#18217 + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || (parent.kind !== SyntaxKind.ModuleDeclaration && parent.kind !== SyntaxKind.ImportType); if (isStringLiteralLike(input)) { if (isBundledEmit) { - const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent); - if (newName) { - return factory.createStringLiteral(newName); + // Bundle emit not supported for isolatedDeclarations + if (!isolatedDeclarations) { + const newName = getExternalModuleNameFromDeclaration(host, resolver, parent); + if (newName) { + return factory.createStringLiteral(newName); + } } } else { @@ -1002,6 +1144,10 @@ export function transformDeclarations(context: TransformationContext) { } // Augmentation of export depends on import if (resolver.isImportRequiredByAugmentation(decl)) { + if (isolatedDeclarations) { + context.addDiagnostic(createDiagnosticForNode(decl, Diagnostics.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)); + return undefined; + } return factory.updateImportDeclaration( decl, decl.modifiers, @@ -1076,6 +1222,19 @@ export function transformDeclarations(context: TransformationContext) { if (isDeclaration(input)) { if (isDeclarationAndNotVisible(input)) return; if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { + if ( + isolatedDeclarations + // Classes usually elide properties with computed names that are not of a literal type + // In isolated declarations TSC needs to error on these as we don't know the type in a DTE. + // The + && isClassDeclaration(input.parent) + && isEntityNameExpression(input.name.expression) + // If the symbol is not accessible we get another TS error no need to add to that + && resolver.isEntityNameVisible(input.name.expression, input.parent).accessibility === SymbolAccessibility.Accessible + && !resolver.isLiteralComputedName(input.name) + ) { + context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations)); + } return; } } @@ -1170,7 +1329,9 @@ export function transformDeclarations(context: TransformationContext) { if (isPrivateIdentifier(input.name)) { return cleanup(/*returnValue*/ undefined); } - const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); + const accessorType = isolatedDeclarations ? + input.type : + getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); return cleanup(factory.updateGetAccessorDeclaration( input, ensureModifiers(input), @@ -1382,7 +1543,10 @@ export function transformDeclarations(context: TransformationContext) { errorNode: input, }); errorFallbackNode = input; - const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), /*initializer*/ undefined); + const type = isolatedDeclarations ? + localInferenceResolver.fromInitializer(input, /*type*/ undefined, currentSourceFile).typeNode : + resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); + const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; const statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(SyntaxKind.DeclareKeyword)] : [], factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); @@ -1509,8 +1673,24 @@ export function transformDeclarations(context: TransformationContext) { ensureType(input, input.type), /*body*/ undefined, )); - if (clean && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) { + if (clean && resolver.isExpandoFunction(input) && shouldEmitFunctionProperties(input)) { const props = resolver.getPropertiesOfContainerFunction(input); + + if (isolatedDeclarations) { + props.forEach(p => { + if (isExpandoPropertyDeclaration(p.valueDeclaration)) { + const errorTarget = isBinaryExpression(p.valueDeclaration) ? + p.valueDeclaration.left : + p.valueDeclaration; + + context.addDiagnostic(createDiagnosticForNode( + errorTarget, + Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, + )); + } + }); + return clean; + } // Use parseNodeFactory so it is usable as an enclosing declaration const fakespace = parseNodeFactory.createModuleDeclaration(/*modifiers*/ undefined, clean.name || factory.createIdentifier("_default"), factory.createModuleBlock([]), NodeFlags.Namespace); setParent(fakespace, enclosingDeclaration as SourceFile | NamespaceDeclaration); @@ -1714,6 +1894,32 @@ export function transformDeclarations(context: TransformationContext) { if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== SyntaxKind.NullKeyword) { // We must add a temporary declaration for the extends clause expression + // Isolated declarations does not allow inferred type in the extends clause + if (isolatedDeclarations) { + if ( + // Checking if it's a separate compiler error so we don't make it an isolatedDeclarations error. + // This is only an approximation as we need type information to figure out if something + // is a constructor type or not. + !isLiteralExpression(extendsClause.expression) && + extendsClause.expression.kind !== SyntaxKind.FalseKeyword && + extendsClause.expression.kind !== SyntaxKind.TrueKeyword + ) { + context.addDiagnostic(createDiagnosticForNode(extendsClause, Diagnostics.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations)); + } + return cleanup(factory.updateClassDeclaration( + input, + modifiers, + input.name, + typeParameters, + factory.createNodeArray([factory.createHeritageClause(SyntaxKind.ExtendsKeyword, [ + factory.createExpressionWithTypeArguments( + factory.createIdentifier("invalid"), + /*typeArguments*/ undefined, + ), + ])]), + members, + )); + } const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : "default"; const newId = factory.createUniqueName(`${oldId}_base`, GeneratedIdentifierFlags.Optimistic); getSymbolAccessibilityDiagnostic = () => ({ @@ -1769,6 +1975,13 @@ export function transformDeclarations(context: TransformationContext) { if (shouldStripInternal(m)) return; // Rewrite enum values to their constants, if available const constValue = resolver.getConstantValue(m); + if ( + isolatedDeclarations && m.initializer && constValue === undefined && + // This will be its own compiler error instead, so don't report. + !isComputedPropertyName(m.name) + ) { + context.addDiagnostic(createDiagnosticForNode(m, Diagnostics.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations)); + } const newInitializer = constValue === undefined ? undefined : typeof constValue === "string" ? factory.createStringLiteral(constValue) : constValue < 0 ? factory.createPrefixUnaryExpression(SyntaxKind.MinusToken, factory.createNumericLiteral(-constValue)) @@ -1845,8 +2058,9 @@ export function transformDeclarations(context: TransformationContext) { getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNodeName(node); } errorNameNode = (node as NamedDeclaration).name; - Debug.assert(resolver.isLateBound(getParseTreeNode(node) as Declaration)); // Should only be called with dynamic names const decl = node as NamedDeclaration as LateBoundDeclaration; + + Debug.assert((hasIdentifierComputedName(decl) && options.isolatedDeclarations) || resolver.isLateBound(getParseTreeNode(node) as Declaration)); // Should only be called with dynamic names const entityName = decl.name.expression; checkEntityNameVisibility(entityName, enclosingDeclaration); if (!suppressNewDiagnosticContexts) { diff --git a/src/compiler/transformers/declarations/diagnostics.ts b/src/compiler/transformers/declarations/diagnostics.ts index 09c388378bd5c..1dcc1358b7ef6 100644 --- a/src/compiler/transformers/declarations/diagnostics.ts +++ b/src/compiler/transformers/declarations/diagnostics.ts @@ -447,6 +447,8 @@ export function createGetSymbolAccessibilityDiagnosticForNode(node: DeclarationD Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionExpression: case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionType: return symbolAccessibilityResult.errorModuleName ? diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts new file mode 100644 index 0000000000000..ccef24871a1f3 --- /dev/null +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -0,0 +1,635 @@ +import { + __String, + BigIntLiteral, + bindSourceFile, + CompilerOptions, + ComputedPropertyName, + CoreEmitResolver, + createEntityVisibilityChecker, + createEvaluator, + createNameResolver, + createSymbolTable, + Debug, + Declaration, + DeclarationName, + determineIfDeclarationIsVisible, + ElementAccessExpression, + emptyArray, + entityNameToString, + EnumDeclaration, + EnumMember, + ExportSpecifier, + Expression, + factory, + forEachChild, + forEachEntry, + FunctionDeclaration, + FunctionLikeDeclaration, + getMembersOfDeclaration, + getNameOfDeclaration, + getNodeId, + getParseTreeNode, + getPropertyNameForPropertyNameNode, + hasDynamicName, + hasProperty, + hasStaticModifier, + hasSyntacticModifier, + Identifier, + InternalSymbolName, + isAccessor, + isBinaryExpression, + isComputedPropertyName, + isDeclarationReadonly, + isElementAccessExpression, + isEntityNameExpression, + isEnumDeclaration, + isEnumMember, + isExpandoPropertyDeclaration, + isExportAssignment, + isExportSpecifier, + isFunctionDeclaration, + isFunctionExpressionOrArrowFunction, + isFunctionLike, + isGetAccessor, + isGetAccessorDeclaration, + isIdentifier, + isInfinityOrNaNString, + isModuleDeclaration, + isPrimitiveLiteralValue, + isPropertyAccessExpression, + isPropertyName, + isSetAccessor, + isSetAccessorDeclaration, + isStringLiteralLike, + isVarConst, + isVariableDeclaration, + LateBoundDeclaration, + ModifierFlags, + Node, + NodeFlags, + nodeIsPresent, + NoSubstitutionTemplateLiteral, + NumericLiteral, + objectAllocator, + ParameterDeclaration, + parsePseudoBigInt, + PrefixUnaryExpression, + PropertyAccessExpression, + PropertyDeclaration, + PropertyName, + PropertySignature, + skipParentheses, + some, + SourceFile, + StringLiteralLike, + Symbol, + SymbolAccessibility, + SymbolFlags, + SymbolTable, + SyntaxKind, + TemplateExpression, + VariableDeclaration, +} from "../../_namespaces/ts"; + +interface EmitSymbolLinks { + lateBoundSymbol?: Symbol; + signatureDeclarations?: Node[]; + lateBoundMembers?: SymbolTable; + lateBoundExports?: SymbolTable; +} +interface EmitDeclarationNodeLinks { + signatureDeclarations?: Node[]; + isVisible?: boolean; + enumValue?: string | number | undefined; + isVisibilityComputed?: boolean; + declarationRequiresScopeChange?: boolean; + resolvedSymbol?: Symbol; +} + +/** @internal */ +export function createEmitDeclarationResolver(file: SourceFile, options: CompilerOptions): CoreEmitResolver { + const nodeLinks: EmitDeclarationNodeLinks[] = []; + + const { isEntityNameVisible, collectLinkedAliases } = createEntityVisibilityChecker({ + defaultSymbolAccessibility: SymbolAccessibility.Accessible, + isDeclarationVisible, + markDeclarationAsVisible(declaration) { + getNodeLinks(declaration).isVisible = true; + }, + isThisAccessible() { + return { accessibility: SymbolAccessibility.Accessible }; + }, + resolveName, + getTargetOfExportSpecifier, + }); + /* eslint-disable-next-line no-var */ + var Symbol = objectAllocator.getSymbolConstructor(); + const resolverWorker = createNameResolver( + options, + getSymbolOfDeclaration, + () => {}, + createSymbolTable(), + new Symbol(SymbolFlags.Property, "arguments" as __String), + new Symbol(SymbolFlags.Property, "require" as __String), + createSymbolTable(), + r => r, + lookupSymbolName, + getNodeLinks, + ); + + bindSourceFile(file, options); + collectAllLinkedAliases(file); + + function getTargetOfExportSpecifier(node: ExportSpecifier, meaning: SymbolFlags): Symbol | undefined { + const resolved = resolveEntityName(node, node.propertyName || node.name, meaning); + return resolved; + } + + function collectAllLinkedAliases(node: Node) { + if (isExportAssignment(node)) { + if (node.expression.kind === SyntaxKind.Identifier) { + collectLinkedAliases(node.expression as Identifier, /*setVisibility*/ true); + } + return; + } + else if (isExportSpecifier(node)) { + collectLinkedAliases(node.propertyName || node.name, /*setVisibility*/ true); + return; + } + forEachChild(node, collectAllLinkedAliases); + } + + function getNodeLinks(node: Node): EmitDeclarationNodeLinks { + const nodeId = getNodeId(node); + return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); + } + + function resolveEntityName(location: Node, node: Expression, meaning: SymbolFlags): Symbol | undefined { + if (isIdentifier(node)) { + return resolveName(location, node.escapedText, meaning); + } + else if (isPropertyAccessExpression(node) || isElementAccessExpression(node)) { + const symbol = resolveEntityName(location, node.expression, meaning); + if (symbol === undefined) return undefined; + + const name = isElementAccessExpression(node) ? node.argumentExpression : node.name; + if (!isPropertyName(name)) return; + + const memberSymbol = symbol.exports?.get(getSymbolName(name)); + if (!memberSymbol || !(memberSymbol.flags & meaning)) { + if (symbol.valueDeclaration && isModuleDeclaration(symbol.valueDeclaration)) { + return symbol.valueDeclaration.locals?.get(getSymbolName(name)); + } + return undefined; + } + return memberSymbol; + } + else { + return undefined; + } + } + + function resolveName(enclosingDeclaration: Node, name: __String, meaning: SymbolFlags) { + return resolverWorker(enclosingDeclaration, name, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false, /*excludeGlobals*/ true, /*getSpellingSuggestions*/ false); + } + + const symbolLinks = new Map(); + function getSymbolLinks(symbol: Symbol) { + let links = symbolLinks.get(symbol); + if (!links) symbolLinks.set(symbol, links = {}); + return links; + } + function getSymbolOfDeclaration(node: Declaration): Symbol { + const symbol = node.symbol; + if (symbol.escapedName !== InternalSymbolName.Computed) { + return symbol; + } + + const links = getSymbolLinks(symbol); + if (!links.lateBoundSymbol) { + const parentSymbol = symbol.parent; + if (parentSymbol) { + const isStatic = some(symbol.declarations, hasStaticModifier); + resolveAllLateBoundSymbols(parentSymbol, isStatic); + } + } + return links.lateBoundSymbol ?? symbol; + } + + function resolveAllLateBoundSymbols(symbol: Symbol, isStatic: boolean) { + const links = getSymbolLinks(symbol); + let lateSymbols: SymbolTable; + if (isStatic) { + if (links.lateBoundExports) { + return links.lateBoundExports; + } + lateSymbols = links.lateBoundExports = createSymbolTable(); + } + else { + if (links.lateBoundMembers) { + return links.lateBoundMembers; + } + lateSymbols = links.lateBoundMembers = createSymbolTable(); + } + if (symbol.declarations) { + for (const decl of symbol.declarations) { + const members = getMembersOfDeclaration(decl); + if (members) { + for (const member of members) { + if (isStatic === hasStaticModifier(member)) { + const memberName = member.name && getDynamicSymbolName(member.name); + if (memberName) { + lateBindMember(symbol, lateSymbols, memberName, member); + } + } + } + } + } + const expandoFunction = symbol.valueDeclaration?.kind === SyntaxKind.ArrowFunction || symbol.valueDeclaration?.kind === SyntaxKind.FunctionExpression + ? getSymbolOfDeclaration(symbol.valueDeclaration.parent as VariableDeclaration) || symbol + : symbol; + const assignments = expandoFunction.assignmentDeclarationMembers; + if (assignments) { + for (const member of assignments.values()) { + if (!isBinaryExpression(member)) continue; + const memberNameNode = isPropertyAccessExpression(member.left) ? member.left.name : + isElementAccessExpression(member.left) ? member.left : + undefined; + + const memberName = memberNameNode && getDynamicSymbolName(memberNameNode); + if (memberName) { + lateBindMember(symbol, lateSymbols, memberName, member); + } + } + } + } + return lateSymbols; + } + + function lateBindMember(parent: Symbol, lateSymbols: SymbolTable, memberName: __String, member: Declaration) { + const links = getNodeLinks(member); + if (links.resolvedSymbol) return links.resolvedSymbol; + let lateSymbol = lateSymbols.get(memberName); + if (!lateSymbol) { + lateSymbols.set(memberName, lateSymbol = new Symbol(SymbolFlags.None, memberName)); + lateSymbol.parent = parent; + } + Debug.assert(lateSymbol.parent === parent, "Existing symbol parent should match new one"); + const symbolFlags = member.symbol.flags; + + lateSymbol.flags |= symbolFlags; + if (!lateSymbol.declarations) { + lateSymbol.declarations = [member]; + } + else if (!member.symbol.isReplaceableByMethod) { + lateSymbol.declarations.push(member); + } + if (symbolFlags & SymbolFlags.Value) { + if (!lateSymbol.valueDeclaration || lateSymbol.valueDeclaration.kind !== member.kind) { + lateSymbol.valueDeclaration = member; + } + } + getSymbolLinks(member.symbol).lateBoundSymbol = links.resolvedSymbol = lateSymbol; + } + + function lookupSymbolName(symbols: SymbolTable, name: __String, meaning: SymbolFlags): Symbol | undefined { + if (meaning) { + const symbol = symbols.get(name); + if (symbol) { + if (symbol.flags & meaning) { + return symbol; + } + if (symbol.flags & SymbolFlags.Alias) { + return symbol; + } + } + } + // return undefined if we can't find a symbol. + } + + function getEnumValueFromName(name: PropertyName | NoSubstitutionTemplateLiteral, location: EnumDeclaration) { + const enumKey = getSymbolName(name); + if (!enumKey) return undefined; + const enumMemberSymbol = resolveName(location, enumKey, SymbolFlags.Value); + const enumMemberDeclaration = enumMemberSymbol?.declarations?.[0]; + if (enumMemberDeclaration && isEnumMember(enumMemberDeclaration)) { + return getNodeLinks(enumMemberDeclaration).enumValue; + } + return undefined; + } + + function isExpressionMemberOfEnum(target: Expression, location: EnumDeclaration) { + const symbol = resolveEntityName(location, target, SymbolFlags.Namespace); + + return !!symbol?.declarations?.some(d => d === location); + } + const evaluate = createEvaluator({ + evaluateElementAccessExpression(expr, location) { + // We only resolve names in the current enum declaration + if (!location || !isEnumDeclaration(location)) return undefined; + if ( + isExpressionMemberOfEnum(expr.expression, location) + && isStringLiteralLike(expr.argumentExpression) + ) { + return getEnumValueFromName(expr.argumentExpression, location); + } + return undefined; + }, + evaluateEntityNameExpression(expr, location) { + if ( + isIdentifier(expr) && isInfinityOrNaNString(expr.escapedText) && + (resolveName(location ?? expr.parent, expr.escapedText, SymbolFlags.Value) === undefined) + ) { + return +(expr.escapedText); + } + // We only resolve names in the current enum declaration + if (!location || !isEnumDeclaration(location)) return undefined; + if (isIdentifier(expr)) { + return getEnumValueFromName(expr, location); + } + if ( + isEntityNameExpression(expr.expression) + && isExpressionMemberOfEnum(expr.expression, location) + ) { + return getEnumValueFromName(expr.name, location); + } + return undefined; + }, + onNumericLiteral() {}, + }); + function clonePrimitiveLiteralValue(node: Expression): Expression { + switch(node.kind) { + case SyntaxKind.NumericLiteral: + return factory.createNumericLiteral((node as NumericLiteral).text); + case SyntaxKind.BigIntLiteral: + return factory.createBigIntLiteral({ negative: false, base10Value: parsePseudoBigInt((node as BigIntLiteral).text) }); + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + return factory.createStringLiteral((node as StringLiteralLike).text); + case SyntaxKind.FalseKeyword: + return factory.createFalse(); + case SyntaxKind.TrueKeyword: + return factory.createTrue(); + case SyntaxKind.PrefixUnaryExpression: + return factory.createPrefixUnaryExpression( + (node as PrefixUnaryExpression).operator, + clonePrimitiveLiteralValue((node as PrefixUnaryExpression).operand), + ); + case SyntaxKind.TemplateExpression: + const templateExpression = node as TemplateExpression + const evaluatedValue = evaluate(templateExpression); + if (evaluatedValue !== undefined) { + return factory.createStringLiteral(evaluatedValue); + } + const templateHead = templateExpression.head + return factory.createTemplateExpression( + factory.createTemplateHead(templateHead.text, templateHead.rawText, templateHead.templateFlags), + templateExpression.templateSpans.map(t => + factory.createTemplateSpan( + clonePrimitiveLiteralValue(t.expression), + t.literal.kind === SyntaxKind.TemplateMiddle ? + factory.createTemplateMiddle(t.literal.text, t.literal.rawText, t.literal.templateFlags) : + factory.createTemplateTail(t.literal.text, t.literal.rawText, t.literal.templateFlags), + ) + ), + ); + default: + Debug.assert(false, `Unable to clone unknown literal type. Kind: ${node.kind}`); + } + } + + function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { + if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConst(node)) || isEnumMember(node)) { + if (!(isEnumMember(node) || !node.type)) return false; + if (!(hasProperty(node, "initializer") && !!node.initializer)) return false; + + const initializer = node.initializer; + return isPrimitiveLiteralValue(initializer); + } + return false; + } + + function isLiteralComputedName(node: ComputedPropertyName) { + // Best effort implementation. We can't know for sure if node is valid as a computed name + // - it might be a narrowed symbol + // - the type might not be appropriate as a computed property name. + const expression = node.expression; + if (isPrimitiveLiteralValue(expression, /*includeBigInt*/ false)) { + return true; + } + if (!isEntityNameExpression(expression)) { + return false; + } + return true; + } + + function isIdentifierComputedName(name: DeclarationName | undefined): boolean { + if (!name) return false; + if (!(name.kind === SyntaxKind.ComputedPropertyName || name.kind === SyntaxKind.ElementAccessExpression)) { + return false; + } + let expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; + while (isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + return isIdentifier(expr); + } + + // Do a best effort to find expando functions + function isExpandoFunction(node: FunctionDeclaration | VariableDeclaration) { + const declaration = getParseTreeNode(node, (n): n is FunctionDeclaration | VariableDeclaration => isFunctionDeclaration(n) || isVariableDeclaration(n)); + if (!declaration) { + return false; + } + if (isVariableDeclaration(declaration)) { + if (declaration.type || !isVarConst(declaration)) { + return false; + } + if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { + return false; + } + } + + const symbol = getSymbolOfDeclaration(declaration); + if (!!symbol.exports && !!forEachEntry(symbol.exports, p => p.flags & SymbolFlags.Value && isExpandoPropertyDeclaration(p.valueDeclaration))) { + return true; + } + const lateBoundSymbols = resolveAllLateBoundSymbols(symbol, /*isStatic*/ true); + return !!forEachEntry(lateBoundSymbols, p => p.flags & SymbolFlags.Value && isExpandoPropertyDeclaration(p.valueDeclaration)); + } + + return { + isDeclarationVisible, + isLiteralConstDeclaration, + isLiteralComputedName, + tryFindAmbientModule() { + return undefined; + }, + getPropertiesOfContainerFunction(node: FunctionDeclaration | VariableDeclaration) { + const symbol = getSymbolOfDeclaration(node); + return [...symbol.exports?.values() ?? [], ...resolveAllLateBoundSymbols(symbol, /*isStatic*/ true).values()]; + }, + getAllAccessorDeclarations(declaration) { + const symbol = getSymbolOfDeclaration(declaration); + const declaredAccessors = symbol?.declarations?.filter(isAccessor); + const declarations = declaredAccessors?.length ? declaredAccessors : [declaration]; + return { + firstAccessor: declarations[0], + secondAccessor: declarations[1], + getAccessor: declarations.find(isGetAccessorDeclaration), + setAccessor: declarations.find(isSetAccessorDeclaration), + }; + }, + getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined { + function updateEnumValues(node: EnumDeclaration) { + let prevEnumValueLinks: EmitDeclarationNodeLinks | undefined; + const isDeclaration = node.flags & NodeFlags.Ambient && !hasSyntacticModifier(node, ModifierFlags.Const); + for (const enumValue of node.members) { + const links = getNodeLinks(enumValue); + if (enumValue.initializer) { + const value = enumValue.initializer && evaluate(enumValue.initializer, node); + if (value !== undefined) { + links.enumValue = value; + } + else { + links.enumValue = undefined; + } + } + else if (isDeclaration) { + links.enumValue = undefined; + } + else if (prevEnumValueLinks === undefined) { + links.enumValue = 0; + } + else if (typeof prevEnumValueLinks.enumValue === "number") { + links.enumValue = prevEnumValueLinks.enumValue + 1; + } + prevEnumValueLinks = links; + } + } + + if (isEnumMember(node)) { + const links = getNodeLinks(node); + if (!hasProperty(links, "enumValue")) { + updateEnumValues(node.parent); + } + return links.enumValue; + } + }, + createLiteralConstValue(node) { + if (hasProperty(node, "initializer") && node.initializer) { + return clonePrimitiveLiteralValue(node.initializer); + } + Debug.fail(); + }, + isLateBound(node): node is LateBoundDeclaration { + const name = getNameOfDeclaration(node); + return !hasDynamicName(node) || isIdentifierComputedName(name); + }, + isImplementationOfOverload(node) { + function getSignaturesOfSymbol(symbol: Symbol): Node[] { + const links = getSymbolLinks(symbol); + if (links.signatureDeclarations) return links.signatureDeclarations; + + if (!symbol || !symbol.declarations) return (links.signatureDeclarations = emptyArray); + + const result: Node[] = links.signatureDeclarations = []; + for (let i = 0; i < symbol.declarations.length; i++) { + const decl = symbol.declarations[i]; + if (!isFunctionLike(decl)) continue; + // Don't include signature if node is the implementation of an overloaded function. A node is considered + // an implementation node if it has a body and the previous node is of the same kind and immediately + // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). + if (i > 0 && (decl as FunctionLikeDeclaration).body) { + const previous = symbol.declarations[i - 1]; + if (decl.parent === previous.parent && decl.kind === previous.kind && decl.pos === previous.end) { + continue; + } + } + // If this is a function or method declaration, get the signature from the @type tag for the sake of optional parameters. + // Exclude contextually-typed kinds because we already apply the @type tag to the context, plus applying it here to the initializer would supress checks that the two are compatible. + result.push(decl); + } + return result; + } + + if (nodeIsPresent((node as FunctionLikeDeclaration).body)) { + if (isGetAccessor(node) || isSetAccessor(node)) return false; // Get or set accessors can never be overload implementations, but can have up to 2 signatures + const symbol = getSymbolOfDeclaration(node); + const signaturesOfSymbol = getSignaturesOfSymbol(symbol); + // If this function body corresponds to function with multiple signature, it is implementation of overload + // e.g.: function foo(a: string): string; + // function foo(a: number): number; + // function foo(a: any) { // This is implementation of the overloads + // return a; + // } + return signaturesOfSymbol.length > 1 || + // If there is single signature for the symbol, it is overload if that signature isn't coming from the node + // e.g.: function foo(a: string): string; + // function foo(a: any) { // This is implementation of the overloads + // return a; + // } + (signaturesOfSymbol.length === 1 && signaturesOfSymbol[0] !== node); + } + return false; + }, + isOptionalParameter(parameter) { + const signature = parameter.parent; + const paramIndex = signature.parameters.indexOf(parameter); + Debug.assert(paramIndex !== -1); + if (parameter.questionToken) return true; + if (parameter.dotDotDotToken) return !!parameter.initializer; + + for (let i = paramIndex; i < signature.parameters.length; i++) { + const p = signature.parameters[i]; + if (!p.questionToken && !p.initializer && !p.dotDotDotToken) { + return false; + } + } + return true; + }, + isEntityNameVisible, + getTypeReferenceDirectivesForEntityName() { + return undefined; + }, + isExpandoFunction, + getSymbolOfExternalModuleSpecifier() { + return undefined; + }, + isImportRequiredByAugmentation() { + return false; + }, + }; + + function isDeclarationVisible(node: Node): boolean { + if (node) { + const links = getNodeLinks(node); + links.isVisible ??= !!determineIfDeclarationIsVisible(node, isDeclarationVisible); + return links.isVisible; + } + + return false; + } +} + +function getSymbolName(name: Exclude): __String; +function getSymbolName(name: ElementAccessExpression | PropertyName): __String | undefined; +function getSymbolName(name: ElementAccessExpression | PropertyName): __String | undefined { + const staticName = isPropertyName(name) ? getPropertyNameForPropertyNameNode(name) : + isElementAccessExpression(name) && isPropertyName(name.argumentExpression) ? getPropertyNameForPropertyNameNode(name.argumentExpression) : + undefined; + + if (staticName) return staticName; + + return getDynamicSymbolName(name); +} + +function getDynamicSymbolName(name: ElementAccessExpression | PropertyName) { + const computedName = isComputedPropertyName(name) ? name.expression : + isElementAccessExpression(name) ? name.argumentExpression : + undefined; + if (computedName && isEntityNameExpression(computedName)) { + return ("__!" + entityNameToString(computedName)) as __String; + } + return undefined; +} diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts new file mode 100644 index 0000000000000..ec3851a3c7c0e --- /dev/null +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -0,0 +1,877 @@ +import { + addRelatedInfo, + ArrayLiteralExpression, + ArrowFunction, + AsExpression, + BindingElement, + ComputedPropertyName, + createDiagnosticForNode, + createPropertyNameNodeForIdentifierOrLiteral, + Debug, + DiagnosticMessage, + Diagnostics, + DiagnosticWithLocation, + EntityNameOrEntityNameExpression, + ExportAssignment, + findAncestor, + FunctionDeclaration, + FunctionExpression, + GetAccessorDeclaration, + getCommentRange, + getEmitScriptTarget, + getNameOfDeclaration, + getTextOfNode, + HasInferredType, + hasSyntacticModifier, + Identifier, + isAccessor, + isAsExpression, + isBinaryExpression, + isClassExpression, + isComputedPropertyName, + isConstTypeReference, + isEntityNameExpression, + isExpandoPropertyDeclaration, + isExportAssignment, + isGetAccessor, + isIdentifier, + isInterfaceDeclaration, + isLiteralTypeNode, + isMethodDeclaration, + isMethodOrAccessor, + isNoSubstitutionTemplateLiteral, + isNumericLiteral, + IsolatedTransformationContext, + isOmittedExpression, + isOptionalDeclaration, + isParameter, + isParenthesizedExpression, + isPrefixUnaryExpression, + isPrivateIdentifier, + isPropertyAssignment, + isPropertyDeclaration, + isPropertyName, + isPropertySignature, + isSetAccessor, + isShorthandPropertyAssignment, + isSpreadAssignment, + isSpreadElement, + isStatement, + isStringDoubleQuoted, + isStringLiteral, + isStringLiteralLike, + isThisIdentifier, + isTypeAssertionExpression, + isTypeLiteralNode, + isTypeNode, + isTypeParameterDeclaration, + isTypeReferenceNode, + isUnionTypeNode, + isVariableDeclaration, + KeywordTypeSyntaxKind, + length, + LiteralExpression, + MethodDeclaration, + ModifierFlags, + Node, + NodeArray, + NodeFlags, + nullTransformationContext, + ObjectLiteralExpression, + ParameterDeclaration, + ParenthesizedExpression, + PrefixUnaryExpression, + PropertyDeclaration, + PropertyName, + PropertySignature, + SetAccessorDeclaration, + setCommentRange, + setTextRange, + ShorthandPropertyAssignment, + SourceFile, + SpreadAssignment, + SpreadElement, + Symbol, + SyntaxKind, + TransformationContext, + TypeAssertion, + TypeElement, + TypeNode, + unescapeLeadingUnderscores, + VariableDeclaration, + visitEachChild, + visitNode, + visitNodes, + Visitor, + VisitResult, +} from "../../_namespaces/ts"; + +const enum NarrowBehavior { + None = 0, + AsConst = 1, + KeepLiterals = 2, + AsConstOrKeepLiterals = AsConst | KeepLiterals, + NotKeepLiterals = ~KeepLiterals, +} + +const relatedSuggestionByDeclarationKind = { + [SyntaxKind.ArrowFunction]: Diagnostics.Add_a_return_type_to_the_function_expression, + [SyntaxKind.FunctionExpression]: Diagnostics.Add_a_return_type_to_the_function_expression, + [SyntaxKind.MethodDeclaration]: Diagnostics.Add_a_return_type_to_the_method, + [SyntaxKind.GetAccessor]: Diagnostics.Add_a_return_type_to_the_get_accessor_declaration, + [SyntaxKind.SetAccessor]: Diagnostics.Add_a_type_to_parameter_of_the_set_accessor_declaration, + [SyntaxKind.FunctionDeclaration]: Diagnostics.Add_a_return_type_to_the_function_declaration, + [SyntaxKind.Parameter]: Diagnostics.Add_a_type_annotation_to_the_parameter_0, + [SyntaxKind.VariableDeclaration]: Diagnostics.Add_a_type_annotation_to_the_variable_0, + [SyntaxKind.PropertyDeclaration]: Diagnostics.Add_a_type_annotation_to_the_property_0, + [SyntaxKind.PropertySignature]: Diagnostics.Add_a_type_annotation_to_the_property_0, + [SyntaxKind.ExportAssignment]: Diagnostics.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it, +} satisfies Partial>; + +const errorByDeclarationKind = { + [SyntaxKind.FunctionExpression]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [SyntaxKind.FunctionDeclaration]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [SyntaxKind.ArrowFunction]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [SyntaxKind.MethodDeclaration]: Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [SyntaxKind.GetAccessor]: Diagnostics.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [SyntaxKind.SetAccessor]: Diagnostics.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [SyntaxKind.Parameter]: Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [SyntaxKind.VariableDeclaration]: Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [SyntaxKind.PropertyDeclaration]: Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [SyntaxKind.PropertySignature]: Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [SyntaxKind.ComputedPropertyName]: Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations, + [SyntaxKind.SpreadAssignment]: Diagnostics.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations, + [SyntaxKind.ShorthandPropertyAssignment]: Diagnostics.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations, + [SyntaxKind.ArrayLiteralExpression]: Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations, + [SyntaxKind.ExportAssignment]: Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations, + [SyntaxKind.SpreadElement]: Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations, +} satisfies Partial>; + +/** + * @internal + */ +export interface LocalType { + typeNode: TypeNode; + isInvalid: boolean; +} +/** + * @internal + */ +export interface LocalInferenceResolver { + makeInvalidType(): Node; + fromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined, sourceFile: SourceFile): LocalType; +} +/** + * @internal + */ +export function createLocalInferenceResolver({ + setEnclosingDeclarations, + visitDeclarationSubtree, + checkEntityNameVisibility, + ensureParameter, + context, +}: { + setEnclosingDeclarations(node: Node): Node; + visitDeclarationSubtree(input: Node): VisitResult; + checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; + ensureParameter(p: ParameterDeclaration): ParameterDeclaration; + context: IsolatedTransformationContext | TransformationContext; +}): LocalInferenceResolver { + let currentSourceFile: SourceFile; + const options = context.getCompilerOptions(); + const resolver = context.getEmitResolver(); + Debug.assert(options.isolatedDeclarations, "createLocalInferenceResolver can only be called when isolatedDeclarations is true"); + const { factory } = context; + let inferenceContext: { isInvalid: boolean; disableErrors: boolean; } = undefined!; + const strictNullChecks = !!options.strict || !!options.strictNullChecks; + + return { + fromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined, sourceFile: SourceFile) { + const oldSourceFile = currentSourceFile; + const hasExistingContext = inferenceContext !== undefined; + if (!hasExistingContext) { + inferenceContext = { isInvalid: false, disableErrors: false }; + } + currentSourceFile = sourceFile; + try { + const typeNode = localInferenceFromInitializer(node, type); + return { isInvalid: inferenceContext.isInvalid, typeNode }; + } + finally { + currentSourceFile = oldSourceFile; + if (!hasExistingContext) { + inferenceContext = undefined!; + } + } + }, + makeInvalidType, + }; + function hasParseError(node: Node) { + return !!(node.flags & NodeFlags.ThisNodeHasError); + } + function reportError(node: Node, message: DiagnosticWithLocation) { + if (inferenceContext) { + inferenceContext.isInvalid = true; + } + // Do not report errors on nodes with other errors. + if (hasParseError(node) || inferenceContext.disableErrors) return; + + context.addDiagnostic(message); + } + + function makeInvalidType() { + return factory.createTypeReferenceNode("invalid"); + } + + function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { + let getAccessorType; + if (getAccessor?.type) { + getAccessorType = getAccessor.type; + } + + let setAccessorType; + if (setAccessor) { + const param = setAccessor.parameters.find(p => !isThisIdentifier(p.name)); + if (param?.type) { + const parameterType = param.type; + setAccessorType = parameterType; + } + } + + return { getAccessorType, setAccessorType }; + } + + function findNearestDeclaration(node: Node) { + const result = findAncestor(node, n => isExportAssignment(n) || (isStatement(n) ? "quit" : isVariableDeclaration(n) || isPropertyDeclaration(n) || isParameter(n))); + return result as VariableDeclaration | PropertyDeclaration | ParameterDeclaration | ExportAssignment | undefined; + } + + function createAccessorTypeError(getAccessor: GetAccessorDeclaration | undefined, setAccessor: SetAccessorDeclaration | undefined) { + const node = (getAccessor ?? setAccessor)!; + + const targetNode = (isSetAccessor(node) ? node.parameters[0] : node) ?? node; + const diag = createDiagnosticForNode(targetNode, errorByDeclarationKind[node.kind]); + + if (setAccessor) { + addRelatedInfo(diag, createDiagnosticForNode(setAccessor, relatedSuggestionByDeclarationKind[setAccessor.kind])); + } + if (getAccessor) { + addRelatedInfo(diag, createDiagnosticForNode(getAccessor, relatedSuggestionByDeclarationKind[getAccessor.kind])); + } + return diag; + } + function createObjectLiteralError(node: ShorthandPropertyAssignment | SpreadAssignment | ComputedPropertyName) { + const diag = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]); + const parentDeclaration = findNearestDeclaration(node); + if (parentDeclaration) { + const targetStr = isExportAssignment(parentDeclaration) ? "" : getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); + addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); + } + return diag; + } + function createArrayLiteralError(node: ArrayLiteralExpression | SpreadElement) { + const diag = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]); + const parentDeclaration = findNearestDeclaration(node); + if (parentDeclaration) { + const targetStr = isExportAssignment(parentDeclaration) ? "" : getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); + addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); + } + return diag; + } + function createReturnTypeError(node: FunctionDeclaration | FunctionExpression | ArrowFunction | MethodDeclaration) { + const diag = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]); + const parentDeclaration = findNearestDeclaration(node); + if (parentDeclaration) { + const targetStr = isExportAssignment(parentDeclaration) ? "" : getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); + addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); + } + addRelatedInfo(diag, createDiagnosticForNode(node, relatedSuggestionByDeclarationKind[node.kind])); + return diag; + } + function createBindingElementError(node: BindingElement) { + return createDiagnosticForNode(node, Diagnostics.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations); + } + function createVariableOrPropertyError(node: VariableDeclaration | PropertyDeclaration | PropertySignature) { + const diag = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]); + const targetStr = getTextOfNode(node.name, /*includeTrivia*/ false); + addRelatedInfo(diag, createDiagnosticForNode(node, relatedSuggestionByDeclarationKind[node.kind], targetStr)); + return diag; + } + function createParameterError(node: ParameterDeclaration) { + if (isSetAccessor(node.parent)) { + const { getAccessor, setAccessor } = resolver.getAllAccessorDeclarations(node.parent); + return createAccessorTypeError(getAccessor, setAccessor); + } + const diag = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]); + const targetStr = getTextOfNode(node.name, /*includeTrivia*/ false); + addRelatedInfo(diag, createDiagnosticForNode(node, relatedSuggestionByDeclarationKind[node.kind], targetStr)); + return diag; + } + function createExpressionError(node: Node) { + const parentDeclaration = findNearestDeclaration(node); + let diag: DiagnosticWithLocation; + if (parentDeclaration) { + const targetStr = isExportAssignment(parentDeclaration) ? "" : getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); + const parent = findAncestor(node.parent, n => isExportAssignment(n) || (isStatement(n) ? "quit" : !isParenthesizedExpression(n) && !isTypeAssertionExpression(n) && !isAsExpression(n))); + if (parentDeclaration === parent) { + diag = createDiagnosticForNode(node, errorByDeclarationKind[parentDeclaration.kind]); + addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); + } + else { + diag = createDiagnosticForNode(node, Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations); + addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); + addRelatedInfo(diag, createDiagnosticForNode(node, Diagnostics.Add_a_type_assertion_to_this_expression_to_make_type_type_explicit)); + } + } + else { + diag = createDiagnosticForNode(node, Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations); + } + return diag; + } + function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): TypeNode { + switch (node.kind) { + case SyntaxKind.ParenthesizedExpression: + return localInference((node as ParenthesizedExpression).expression, inferenceFlags & NarrowBehavior.NotKeepLiterals); + case SyntaxKind.Identifier: { + if ((node as Identifier).escapedText === "undefined") { + return createUndefinedTypeNode(); + } + break; + } + case SyntaxKind.NullKeyword: + if (strictNullChecks) { + return factory.createLiteralTypeNode(factory.createNull()); + } + else { + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionExpression: + const fnNode = node as FunctionExpression | ArrowFunction; + const oldEnclosingDeclaration = setEnclosingDeclarations(node); + try { + const returnType = !fnNode.type ? invalid(fnNode, createReturnTypeError(fnNode)) : + visitTypeAndClone(fnNode.type); + const fnTypeNode = factory.createFunctionTypeNode( + visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), + fnNode.parameters.map(p => deepClone(ensureParameter(p))), + returnType, + ); + return fnTypeNode; + } + finally { + setEnclosingDeclarations(oldEnclosingDeclaration); + } + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + const asExpression = node as AsExpression | TypeAssertion; + if (isTypeReferenceNode(asExpression.type) && isConstTypeReference(asExpression.type)) { + return localInference(asExpression.expression, NarrowBehavior.AsConst); + } + else { + const type = asExpression.type; + if ( + isLiteralTypeNode(type) && + (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal)) + ) { + return factory.createLiteralTypeNode( + normalizeLiteralValue(type.literal), + ); + } + + return visitTypeAndClone(type); + } + case SyntaxKind.PrefixUnaryExpression: + const prefixOp = node as PrefixUnaryExpression; + if (prefixOp.operator === SyntaxKind.MinusToken || prefixOp.operator === SyntaxKind.PlusToken) { + if (NarrowBehavior.AsConstOrKeepLiterals & inferenceFlags) { + switch (prefixOp.operand.kind) { + case SyntaxKind.NumericLiteral: + switch (prefixOp.operator) { + case SyntaxKind.MinusToken: + return factory.createLiteralTypeNode(deepClone(prefixOp)); + case SyntaxKind.PlusToken: + return factory.createLiteralTypeNode(deepClone(prefixOp.operand as LiteralExpression)); + } + break; + case SyntaxKind.BigIntLiteral: + if (prefixOp.operator === SyntaxKind.MinusToken) { + return factory.createLiteralTypeNode(deepClone(prefixOp)); + } + } + } + + if (prefixOp.operator === SyntaxKind.PlusToken) { + return factory.createKeywordTypeNode(SyntaxKind.NumberKeyword); + } + else if (prefixOp.operator === SyntaxKind.MinusToken) { + return prefixOp.operand.kind === SyntaxKind.BigIntLiteral ? + factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : + factory.createKeywordTypeNode(SyntaxKind.NumberKeyword); + } + } + break; + case SyntaxKind.NumericLiteral: + return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); + case SyntaxKind.TemplateExpression: + if (!(inferenceFlags & NarrowBehavior.AsConst)) { + return factory.createKeywordTypeNode(SyntaxKind.StringKeyword); + } + break; + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.StringLiteral: + return literal(node, SyntaxKind.StringKeyword, inferenceFlags); + case SyntaxKind.BigIntLiteral: + return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return literal(node, SyntaxKind.BooleanKeyword, inferenceFlags); + case SyntaxKind.ArrayLiteralExpression: + const arrayLiteral = node as ArrayLiteralExpression; + + if (!(inferenceFlags & NarrowBehavior.AsConst)) { + return invalid(node, createArrayLiteralError(arrayLiteral)); + } + const elementTypesInfo: TypeNode[] = []; + for (const element of arrayLiteral.elements) { + if (isSpreadElement(element)) { + return invalid(element, createArrayLiteralError(element)); + } + else if (isOmittedExpression(element)) { + elementTypesInfo.push( + createUndefinedTypeNode(), + ); + } + else { + const elementType = localInference(element, inferenceFlags & NarrowBehavior.NotKeepLiterals); + elementTypesInfo.push(elementType); + } + } + const tupleType = factory.createTupleTypeNode(elementTypesInfo); + tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; + return factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType); + case SyntaxKind.ObjectLiteralExpression: + try { + return getTypeForObjectLiteralExpression(node as ObjectLiteralExpression, inferenceFlags); + } + finally { + inferenceContext.disableErrors = false; + } + } + + return invalid(node, createExpressionError(node)); + } + function invalid(sourceNode: Node, diagMessage: DiagnosticWithLocation): TypeNode { + reportError(sourceNode, diagMessage); + return makeInvalidType(); + } + function getTypeForObjectLiteralExpression(objectLiteral: ObjectLiteralExpression, inferenceFlags: NarrowBehavior) { + const properties: TypeElement[] = []; + const members = new Map(); + for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { + const prop = objectLiteral.properties[propIndex]; + if (isShorthandPropertyAssignment(prop)) { + reportError(prop, createObjectLiteralError(prop)); + continue; + } + else if (isSpreadAssignment(prop)) { + reportError(prop, createObjectLiteralError(prop)); + continue; + } + inferenceContext.disableErrors = hasParseError(prop.name) || hasParseError(prop); + if (inferenceContext.disableErrors) { + inferenceContext.isInvalid = true; + } + + if (isPrivateIdentifier(prop.name)) { + inferenceContext.isInvalid = true; + // Not valid in object literals but the compiler will complain about this, we just ignore it here. + continue; + } + if (isComputedPropertyName(prop.name)) { + if (!resolver.isLiteralComputedName(prop.name)) { + reportError(prop.name, createObjectLiteralError(prop.name)); + } + else if (isEntityNameExpression(prop.name.expression)) { + checkEntityNameVisibility(prop.name.expression, prop); + } + } + + const nameKey = prop.symbol.escapedName; + const name = normalizePropertyName(prop.symbol, isMethodDeclaration(prop)) ?? + deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + + let newProp; + if (isMethodDeclaration(prop)) { + newProp = handleMethodDeclaration(prop, name, inferenceFlags); + } + else if (isPropertyAssignment(prop)) { + const modifiers = inferenceFlags & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : + []; + const typeNode = localInference(prop.initializer, inferenceFlags & NarrowBehavior.NotKeepLiterals); + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + typeNode, + ); + } + else { + newProp = handleAccessors(prop); + } + + if (newProp) { + const commentRange = getCommentRange(prop); + setCommentRange(newProp, { + pos: commentRange.pos, + end: newProp.name.end, + }); + + if (nameKey) { + const exitingIndex = members.get(prop.symbol); + if (exitingIndex !== undefined && !isMethodOrAccessor(prop)) { + properties[exitingIndex] = newProp; + } + else { + members.set(prop.symbol, properties.length); + properties.push(newProp); + } + } + else { + properties.push(newProp); + } + } + } + + return inferenceContext.isInvalid ? makeInvalidType() : factory.createTypeLiteralNode(properties); + } + + function handleMethodDeclaration(method: MethodDeclaration, name: PropertyName, inferenceFlags: NarrowBehavior) { + const oldEnclosingDeclaration = setEnclosingDeclarations(method); + try { + const returnType = method.type === undefined ? + invalid(method, createReturnTypeError(method)) : + visitTypeAndClone(method.type); + const typeParameters = visitNodes(method.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); + const parameters = method.parameters.map(p => deepClone(ensureParameter(p))); + if (inferenceFlags & NarrowBehavior.AsConst) { + return factory.createPropertySignature( + [factory.createModifier(SyntaxKind.ReadonlyKeyword)], + name, + /*questionToken*/ undefined, + factory.createFunctionTypeNode( + typeParameters, + parameters, + returnType, + ), + ); + } + else { + return factory.createMethodSignature( + [], + name, + /*questionToken*/ undefined, + typeParameters, + parameters, + returnType, + ); + } + } + finally { + setEnclosingDeclarations(oldEnclosingDeclaration); + } + } + + function handleAccessors(accessor: GetAccessorDeclaration | SetAccessorDeclaration) { + const { getAccessor, setAccessor, firstAccessor } = resolver.getAllAccessorDeclarations(accessor); + const accessorType = inferAccessorType(getAccessor, setAccessor); + // We have types for both accessors, we can't know if they are the same type so we keep both accessors + if (accessorType.getAccessorType !== undefined && accessorType.setAccessorType !== undefined) { + const parameters = accessor.parameters.map(p => deepClone(ensureParameter(p))); + + if (isGetAccessor(accessor)) { + return factory.createGetAccessorDeclaration( + [], + accessor.name, + parameters, + visitTypeAndClone(accessorType.getAccessorType), + /*body*/ undefined, + ); + } + else { + return factory.createSetAccessorDeclaration( + [], + accessor.name, + parameters, + /*body*/ undefined, + ); + } + } + else if (firstAccessor === accessor) { + const foundType = accessorType.getAccessorType ?? accessorType.setAccessorType; + const propertyType = foundType === undefined ? + invalid(accessor, createAccessorTypeError(getAccessor, setAccessor)) : + visitTypeAndClone(foundType); + return factory.createPropertySignature( + setAccessor === undefined ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : [], + accessor.name, + /*questionToken*/ undefined, + propertyType, + ); + } + } + + function normalizeLiteralValue(literal: LiteralExpression) { + switch (literal.kind) { + case SyntaxKind.BigIntLiteral: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return deepClone(literal); + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.StringLiteral: + return factory.createStringLiteral(literal.text); + case SyntaxKind.NumericLiteral: + return factory.createNumericLiteral(+literal.text); + } + throw new Error("Not supported"); + } + function createUndefinedTypeNode() { + if (strictNullChecks) { + return factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword); + } + else { + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + } + function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { + if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { + return factory.createLiteralTypeNode( + normalizeLiteralValue(node as LiteralExpression), + ); + } + else { + return typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType); + } + } + + function visitTypeAndClone(type: TypeNode) { + const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode)!; + return deepClone(visitedType); + } + + function normalizePropertyName(symbol: Symbol, isMethod: boolean) { + let nameText; + Debug.assert(symbol.declarations !== undefined, "Symbol has no declarations"); + let stringNamed = !!length(symbol.declarations); + let singleQuote = stringNamed; + for (const declaration of symbol.declarations) { + const name = getNameOfDeclaration(declaration); + if (!name) { + stringNamed = false; + continue; + } + const actualName = isComputedPropertyName(name) ? name.expression : name; + if (isStringLiteralLike(actualName)) { + nameText = actualName.text; + singleQuote &&= !isStringDoubleQuoted(actualName, currentSourceFile); + continue; + } + stringNamed = false; + singleQuote = false; + if (isIdentifier(actualName)) { + if (actualName !== name) return undefined; + nameText = unescapeLeadingUnderscores(actualName.escapedText); + } + else if (isNumericLiteral(actualName)) { + nameText = actualName.text; + } + else if ( + isPrefixUnaryExpression(actualName) + && isNumericLiteral(actualName.operand) + ) { + if (actualName.operator === SyntaxKind.PlusToken) { + nameText = actualName.operand.text; + } + } + } + + if (nameText === undefined) { + return undefined; + } + + return createPropertyNameNodeForIdentifierOrLiteral( + nameText, + getEmitScriptTarget(options), + singleQuote, + stringNamed, + isMethod, + ); + } + + function deepClone(node: T): T { + const clonedNode = visitEachChild(node, deepClone, nullTransformationContext, deepCloneNodes); + // If node has children visitEachChild will already return a new node + if (clonedNode !== node) { + return clonedNode; + } + return setTextRange(factory.cloneNode(node), node); + + function deepCloneNodes( + nodes: NodeArray | undefined, + visitor: Visitor, + test?: (node: Node) => boolean, + start?: number, + count?: number, + ): NodeArray | undefined { + if (nodes && nodes.length === 0) { + // Ensure we explicitly make a copy of an empty array; visitNodes will not do this unless the array has elements, + // which can lead to us reusing the same empty NodeArray more than once within the same AST during type noding. + return setTextRange(factory.createNodeArray(/*elements*/ undefined, nodes.hasTrailingComma), nodes); + } + return visitNodes(nodes, visitor, test, start, count); + } + } + + function addUndefinedInUnion(type: TypeNode) { + if (isUnionTypeNode(type)) { + const hasUndefined = type.types.some(p => p.kind === SyntaxKind.UndefinedKeyword); + if (hasUndefined) return type; + + return factory.createUnionTypeNode([ + ...type.types, + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + ]); + } + return factory.createUnionTypeNode([ + type, + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + ]); + } + function localInferenceFromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined): TypeNode { + if (isParameter(node)) { + let localType: TypeNode; + + if (type) { + localType = visitNode(type, visitDeclarationSubtree, isTypeNode)!; + } + // We do not support inferring to binding patterns + // Binding patterns can add properties and default values in the pattern also complicate inference as we have two sources for the property type. + else if (node.initializer && isIdentifier(node.name)) { + localType = localInference(node.initializer); + } + else { + localType = invalid(node, createParameterError(node)); + } + + if (strictNullChecks && !inferenceContext.isInvalid) { + const isOptional = resolver.isOptionalParameter(node); + /** + * If a parameter with a default value is not optional we need to add undefined + * function x(o = "", v: string) + */ + if (node.initializer && !isOptional) { + localType = addUndefinedInUnion(localType); + } + /** + * Constructor properties that are optional must have | undefined included to work well with exactOptionalPropertyTypes + * constructor(public x?: number) -> x?: number | undefined + */ + if (isOptional && !node.initializer && hasSyntacticModifier(node, ModifierFlags.ParameterPropertyModifier)) { + localType = addUndefinedInUnion(localType); + } + } + return localType; + } + else if (isExportAssignment(node)) { + return localInference(node.expression, NarrowBehavior.KeepLiterals); + } + else if (isVariableDeclaration(node)) { + const firstDeclaration = node.symbol.valueDeclaration; + // Use first declaration of variable for the type + if (node !== firstDeclaration && firstDeclaration && isVariableDeclaration(firstDeclaration)) { + node = firstDeclaration; + type = type ?? firstDeclaration.type; + } + if (type) { + return visitNode(type, visitDeclarationSubtree, isTypeNode)!; + } + else if (node.initializer) { + if (isClassExpression(node.initializer)) { + return invalid(node.initializer, createDiagnosticForNode(node.initializer, Diagnostics.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations)); + } + else { + if (resolver.isExpandoFunction(node)) { + resolver.getPropertiesOfContainerFunction(node) + .forEach(p => { + if (isExpandoPropertyDeclaration(p.valueDeclaration)) { + const errorTarget = isBinaryExpression(p.valueDeclaration) ? + p.valueDeclaration.left : + p.valueDeclaration; + + reportError( + errorTarget, + createDiagnosticForNode( + errorTarget, + Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, + ), + ); + } + }); + } + return localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); + } + } + else { + return invalid(node, createVariableOrPropertyError(node)); + } + } + else if (type) { + return visitNode(type, visitDeclarationSubtree, isTypeNode)!; + } + else if (isPropertyDeclaration(node) || isPropertySignature(node)) { + if (node.initializer) { + let localType = localInference(node.initializer); + if (isOptionalDeclaration(node)) { + localType = addUndefinedInUnion(localType); + } + return localType; + } + else if (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + else { + return invalid(node, createVariableOrPropertyError(node)); + } + } + else if (isAccessor(node)) { + const { getAccessor, setAccessor } = resolver.getAllAccessorDeclarations(node); + const accessorType = inferAccessorType(getAccessor, setAccessor); + const type = accessorType.getAccessorType ?? accessorType.setAccessorType; + return type ?? invalid(node, createAccessorTypeError(getAccessor, setAccessor)); + } + else { + if (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + switch (node.kind) { + case SyntaxKind.MethodDeclaration: + case SyntaxKind.FunctionDeclaration: + return invalid(node, createReturnTypeError(node)); + + case SyntaxKind.BindingElement: + const parentDeclaration = findNearestDeclaration(node); + if (parentDeclaration && isVariableDeclaration(parentDeclaration)) { + return invalid(node, createBindingElementError(node)); + } + else { + // Syntactically invalid. We don't report errors, just mark it as invalid. + inferenceContext.isInvalid = true; + return makeInvalidType(); + } + default: + return invalid(node, createDiagnosticForNode(node, Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations)); + } + } + } +} diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts new file mode 100644 index 0000000000000..ff457c261ccab --- /dev/null +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -0,0 +1,119 @@ +import { + CompilerOptions, + createEmitDeclarationResolver, + createGetCanonicalFileName, + createPrinter, + createSourceMapGenerator, + createTextWriter, + Diagnostic, + ensureTrailingDirectorySeparator, + getAreDeclarationMapsEnabled, + getBaseFileName, + getDeclarationEmitOutputFilePathWorker, + getNewLineCharacter, + getSourceMapDirectory, + getSourceMappingURL, + IsolatedTransformationContext, + normalizeSlashes, + nullTransformationContext, + SourceFile, + TransformationContextKind, + transformDeclarations, + TranspileDeclarationsOptions, + TranspileDeclarationsOutput, +} from "../../_namespaces/ts"; + +export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: TranspileDeclarationsOptions): TranspileDeclarationsOutput { + const compilerOptions: CompilerOptions = { + ...transpileOptions.compilerOptions, + isolatedDeclarations: true, + }; + const getCanonicalFileName = createGetCanonicalFileName(!!compilerOptions.useCaseSensitiveFileNames); + const currentDirectory = normalizeSlashes(transpileOptions.currentDirectory ?? "."); + const commonSourceDirectory = normalizeSlashes(ensureTrailingDirectorySeparator(transpileOptions.commonSourceDirectory ?? ".")); + const emitHost = { + getCurrentDirectory: () => currentDirectory, + getCanonicalFileName, + useCaseSensitiveFileNames: () => !!compilerOptions.useCaseSensitiveFileNames, + getCompilerOptions: () => compilerOptions.compilerOptions, + getCommonSourceDirectory: () => commonSourceDirectory, + }; + const emitResolver = createEmitDeclarationResolver(sourceFile, compilerOptions); + const diagnostics: Diagnostic[] = []; + const transformationContext: IsolatedTransformationContext = { + ...nullTransformationContext, + kind: TransformationContextKind.IsolatedContext, + getCompilerOptions: () => compilerOptions, + addDiagnostic: diag => diagnostics.push(diag), + getEmitResolver: () => emitResolver, + }; + const transformer = transformDeclarations(transformationContext); + const result = transformer(sourceFile); + + const printer = createPrinter({ + removeComments: compilerOptions.removeComments, + newLine: compilerOptions.newLine, + noEmitHelpers: true, + module: compilerOptions.module, + target: compilerOptions.target, + sourceMap: compilerOptions.declarationMap, + inlineSourceMap: compilerOptions.inlineSourceMap, + extendedDiagnostics: compilerOptions.extendedDiagnostics, + onlyPrintJsDocStyle: true, + omitBraceSourceMapPositions: true, + }); + + const writer = createTextWriter(getNewLineCharacter(compilerOptions)); + const declarationPath = getDeclarationEmitOutputFilePathWorker( + sourceFile.fileName, + compilerOptions, + emitHost.getCurrentDirectory(), + emitHost.getCommonSourceDirectory(), + emitHost.getCanonicalFileName, + ); + const declarationMapPath = declarationPath + ".map"; + const sourceMap = getSourceMapGenerator(declarationPath, declarationMapPath); + printer.writeFile(result, writer, sourceMap?.sourceMapGenerator); + if (sourceMap) { + if (!writer.isAtStartOfLine()) writer.writeLine(); + writer.writeComment(sourceMap.sourceMappingURL); + } + + return { + declaration: writer.getText(), + declarationPath, + declarationMap: sourceMap?.sourceMapGenerator.toString(), + declarationMapPath: sourceMap && declarationMapPath, + diagnostics, + }; + + function getSourceMapGenerator(declarationFilePath: string, declarationMapPath: string) { + if (!getAreDeclarationMapsEnabled(compilerOptions)) return; + + const mapOptions = { + sourceRoot: compilerOptions.sourceRoot, + mapRoot: compilerOptions.mapRoot, + extendedDiagnostics: compilerOptions.extendedDiagnostics, + // Explicitly do not passthru either `inline` option + }; + + const sourceRoot = normalizeSlashes(compilerOptions.sourceRoot || ""); + const sourceMapGenerator = createSourceMapGenerator( + emitHost, + getBaseFileName(normalizeSlashes(declarationFilePath)), + sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot, + getSourceMapDirectory(emitHost, compilerOptions, declarationFilePath, sourceFile), + mapOptions, + ); + + const sourceMappingURL = getSourceMappingURL( + emitHost, + mapOptions, + sourceMapGenerator, + declarationFilePath, + declarationMapPath, + sourceFile, + ); + return { sourceMapGenerator, sourceMappingURL: `//# ${"sourceMappingURL"}=${sourceMappingURL}` }; + } +} diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ad795c9ba7965..d8991f8ac4888 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1384,6 +1384,20 @@ export type HasIllegalModifiers = | MissingDeclaration | NamespaceExportDeclaration; +/** @internal */ +export type HasInferredType = + | FunctionDeclaration + | MethodDeclaration + | GetAccessorDeclaration + | SetAccessorDeclaration + | BindingElement + | ConstructSignatureDeclaration + | VariableDeclaration + | MethodSignature + | CallSignatureDeclaration + | ParameterDeclaration + | PropertyDeclaration + | PropertySignature; /** * Declarations that can contain other declarations. Corresponds with `ContainerFlags.IsContainer` in binder.ts. * @@ -5666,7 +5680,26 @@ export enum TypeReferenceSerializationKind { } /** @internal */ -export interface EmitResolver { +export interface CoreEmitResolver { + isLiteralComputedName(node: ComputedPropertyName): boolean; + isDeclarationVisible(node: Declaration | AnyImportSyntax): boolean; + isLateBound(node: Declaration): node is LateBoundDeclaration; + isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; + isExpandoFunction(node: VariableDeclaration | FunctionDeclaration): boolean; + createLiteralConstValue(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration, tracker: SymbolTracker): Expression; + isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult; + isOptionalParameter(node: ParameterDeclaration): boolean; + getTypeReferenceDirectivesForEntityName(name: EntityNameOrEntityNameExpression): [specifier: string, mode: ResolutionMode | undefined][] | undefined; + isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean; + getSymbolOfExternalModuleSpecifier(node: StringLiteralLike): Symbol | undefined; + isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; + getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; + getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; + tryFindAmbientModule(moduleReferenceExpression: Expression): Symbol | undefined; + getPropertiesOfContainerFunction(node: FunctionDeclaration | VariableDeclaration): Symbol[]; +} +/** @internal */ +export interface EmitResolver extends CoreEmitResolver { hasGlobalName(name: string): boolean; getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | ModuleDeclaration | EnumDeclaration | undefined; getReferencedImportDeclaration(node: Identifier): Declaration | undefined; @@ -5676,40 +5709,26 @@ export interface EmitResolver { isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; - isDeclarationVisible(node: Declaration | AnyImportSyntax): boolean; - isLateBound(node: Declaration): node is LateBoundDeclaration; collectLinkedAliases(node: Identifier, setVisibility?: boolean): Node[] | undefined; - isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; isRequiredInitializedParameter(node: ParameterDeclaration): boolean; isOptionalUninitializedParameterProperty(node: ParameterDeclaration): boolean; - isExpandoFunctionDeclaration(node: FunctionDeclaration): boolean; - getPropertiesOfContainerFunction(node: Declaration): Symbol[]; createTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker, addUndefined?: boolean): TypeNode | undefined; createReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; createTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; - createLiteralConstValue(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration, tracker: SymbolTracker): Expression; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags | undefined, shouldComputeAliasToMarkVisible: boolean): SymbolAccessibilityResult; - isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult; // Returns the constant value this property access resolves to, or 'undefined' for a non-constant - getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; getReferencedValueDeclaration(reference: Identifier): Declaration | undefined; getReferencedValueDeclarations(reference: Identifier): Declaration[] | undefined; getTypeReferenceSerializationKind(typeName: EntityName, location?: Node): TypeReferenceSerializationKind; - isOptionalParameter(node: ParameterDeclaration): boolean; moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean; isArgumentsLocalBinding(node: Identifier): boolean; getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode | ImportCall): SourceFile | undefined; - getTypeReferenceDirectivesForEntityName(name: EntityNameOrEntityNameExpression): [specifier: string, mode: ResolutionMode][] | undefined; getTypeReferenceDirectivesForSymbol(symbol: Symbol, meaning?: SymbolFlags): [specifier: string, mode: ResolutionMode][] | undefined; - isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean; getJsxFactoryEntity(location?: Node): EntityName | undefined; getJsxFragmentFactoryEntity(location?: Node): EntityName | undefined; - getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; - getSymbolOfExternalModuleSpecifier(node: StringLiteralLike): Symbol | undefined; isBindingCapturedByNode(node: Node, decl: VariableDeclaration | BindingElement): boolean; getDeclarationStatementsForSourceFile(node: SourceFile, flags: NodeBuilderFlags, tracker: SymbolTracker, bundled?: boolean): Statement[] | undefined; isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; - tryFindAmbientModule(moduleReferenceExpression: Expression): Symbol | undefined; } // dprint-ignore @@ -7164,6 +7183,7 @@ export interface CompilerOptions { inlineSourceMap?: boolean; inlineSources?: boolean; isolatedModules?: boolean; + isolatedDeclarations?: boolean; jsx?: JsxEmit; keyofStringsOnly?: boolean; lib?: string[]; @@ -8179,18 +8199,20 @@ export interface SourceFileMayBeEmittedHost { getCanonicalFileName: GetCanonicalFileName; useCaseSensitiveFileNames(): boolean; } +/** @internal */ +export interface CoreEmitHost { + getCurrentDirectory(): string; + getCommonSourceDirectory(): string; + getCanonicalFileName(fileName: string): string; +} /** @internal */ -export interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolutionHost, SourceFileMayBeEmittedHost { +export interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolutionHost, SourceFileMayBeEmittedHost, CoreEmitHost { getSourceFiles(): readonly SourceFile[]; useCaseSensitiveFileNames(): boolean; - getCurrentDirectory(): string; getLibFileFromReference(ref: FileReference): SourceFile | undefined; - getCommonSourceDirectory(): string; - getCanonicalFileName(fileName: string): string; - isEmitBlocked(emitFileName: string): boolean; /** @deprecated */ getPrependNodes(): readonly (InputFiles | UnparsedSource)[]; @@ -8295,6 +8317,19 @@ export interface NodeConverters { convertToAssignmentElementTarget(node: BindingOrAssignmentElementTarget): Expression; } +export interface TranspileDeclarationsOutput { + declaration: string; + declarationPath: string; + declarationMap: string | undefined; + declarationMapPath: string | undefined; + diagnostics: Diagnostic[]; +} +export interface TranspileDeclarationsOptions { + compilerOptions: CompilerOptions; + commonSourceDirectory?: string; + currentDirectory?: string; + useCaseSensitiveFileNames?: boolean; +} /** @internal */ export interface GeneratedNamePart { /** an additional prefix to insert before the text sourced from `node` */ @@ -9136,7 +9171,15 @@ export const enum LexicalEnvironmentFlags { VariablesHoistedInParameters = 1 << 1, // a temp variable was hoisted while visiting a parameter list } +/** @internal */ +export const enum TransformationContextKind { + FullContext = 0, + IsolatedContext = 1, + NullContext = 2, +} + export interface CoreTransformationContext { + /** @internal */ kind: TransformationContextKind; readonly factory: NodeFactory; /** Gets the compiler options supplied to the transformer. */ @@ -9178,6 +9221,7 @@ export interface CoreTransformationContext { } export interface TransformationContext extends CoreTransformationContext { + /** @internal */ kind: TransformationContextKind.FullContext; /** @internal */ getEmitResolver(): EmitResolver; /** @internal */ getEmitHost(): EmitHost; /** @internal */ getEmitHelperFactory(): EmitHelperFactory; @@ -9227,6 +9271,25 @@ export interface TransformationContext extends CoreTransformationContext { /** @internal */ addDiagnostic(diag: DiagnosticWithLocation): void; } +/** @internal */ +export interface IsolatedTransformationContext extends CoreTransformationContext { + kind: TransformationContextKind.IsolatedContext; + getEmitResolver(): CoreEmitResolver; + getCompilerOptions(): CompilerOptions; + factory: NodeFactory; + addDiagnostic(diag: Diagnostic): void; +} +/** @internal */ +export interface NullTransformationContext extends Omit { + kind: TransformationContextKind.NullContext; + getEmitResolver(): never; + getEmitHost(): never; + getEmitHelperFactory(): never; + readEmitHelpers(): never; + isSubstitutionEnabled(): never; + isEmitNotificationEnabled(): never; +} + export interface TransformationResult { /** Gets the transformed source files. */ transformed: T[]; @@ -9622,6 +9685,16 @@ export interface SourceMapGenerator { toString(): string; } +/** @internal */ +export interface SourceMapOptions { + sourceMap?: boolean; + inlineSourceMap?: boolean; + inlineSources?: boolean; + sourceRoot?: string; + mapRoot?: string; + extendedDiagnostics?: boolean; +} + /** @internal */ export interface DocumentPositionMapperHost { getSourceFileLike(fileName: string): SourceFileLike | undefined; @@ -9679,7 +9752,7 @@ export interface ModuleSpecifierResolutionHost { fileExists(path: string): boolean; getCurrentDirectory(): string; directoryExists?(path: string): boolean; - readFile?(path: string): string | undefined; + readFile(path: string): string | undefined; realpath?(path: string): string; getSymlinkCache?(): SymlinkCache; getModuleSpecifierCache?(): ModuleSpecifierCache; @@ -10077,6 +10150,10 @@ export interface UserPreferences { readonly organizeImportsCaseFirst?: "upper" | "lower" | false; readonly organizeImportsTypeOrder?: "first" | "last" | "inline"; readonly excludeLibrarySymbolsInNavTo?: boolean; + /** @internal */ + readonly includeInlineTypeFixes?: boolean; + /** @internal */ + readonly includeRelativeTypeFixes?: boolean; } /** Represents a bigint literal value without requiring bigint support */ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index e3ef9f744ea11..289977b77acce 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -14,6 +14,7 @@ import { AnyImportSyntax, AnyValidImportOrReExport, append, + appendIfUnique, arrayFrom, ArrayLiteralExpression, ArrayTypeNode, @@ -33,6 +34,7 @@ import { BindableStaticNameExpression, BindingElement, BindingElementOfBareOrAccessedRequire, + BindingPattern, Block, BundleFileSection, BundleFileSectionKind, @@ -41,6 +43,7 @@ import { CallLikeExpression, CallSignatureDeclaration, canHaveDecorators, + canHaveLocals, canHaveModifiers, CaseBlock, CaseClause, @@ -78,6 +81,7 @@ import { ContainerFlags, contains, containsPath, + CoreEmitHost, createGetCanonicalFileName, createMultiMap, createScanner, @@ -226,21 +230,25 @@ import { ImportDeclaration, ImportEqualsDeclaration, ImportMetaProperty, + ImportOrExportSpecifier, ImportSpecifier, ImportTypeNode, IndexInfo, indexOfAnyCharCode, IndexSignatureDeclaration, + InferTypeNode, InitializedVariableDeclaration, insertSorted, InstanceofExpression, InterfaceDeclaration, InternalEmitFlags, + InternalSymbolName, isAccessor, isAnyDirectorySeparator, isArray, isArrayLiteralExpression, isArrowFunction, + isAssertionExpression, isAutoAccessorPropertyDeclaration, isBigIntLiteral, isBinaryExpression, @@ -255,6 +263,7 @@ import { isCommaListExpression, isComputedPropertyName, isConstructorDeclaration, + isConstTypeReference, isDeclaration, isDecorator, isElementAccessExpression, @@ -291,6 +300,7 @@ import { isJSDocOverloadTag, isJSDocParameterTag, isJSDocPropertyLikeTag, + isJSDocReturnTag, isJSDocSatisfiesTag, isJSDocSignature, isJSDocTag, @@ -312,15 +322,19 @@ import { isMethodOrAccessor, isModifierLike, isModuleDeclaration, + isModuleOrEnumDeclaration, isNamedDeclaration, isNamespaceExport, isNamespaceExportDeclaration, isNamespaceImport, isNonNullExpression, isNoSubstitutionTemplateLiteral, + isNullishCoalesce, isNumericLiteral, + isObjectBindingPattern, isObjectLiteralExpression, isOmittedExpression, + isOptionalChain, isParameter, isParameterPropertyDeclaration, isParenthesizedExpression, @@ -341,11 +355,13 @@ import { isString, isStringLiteral, isStringLiteralLike, + isTemplateExpression, isTypeAliasDeclaration, isTypeElement, isTypeLiteralNode, isTypeNode, isTypeParameterDeclaration, + isTypeQueryNode, isTypeReferenceNode, isVariableDeclaration, isVariableStatement, @@ -461,6 +477,7 @@ import { PseudoBigInt, PunctuationOrKeywordSyntaxKind, PunctuationSyntaxKind, + pushIfUnique, QualifiedName, QuestionQuestionEqualsToken, ReadonlyCollection, @@ -509,11 +526,14 @@ import { SuperProperty, SwitchStatement, Symbol, + SymbolAccessibility, SymbolFlags, SymbolTable, + SymbolVisibilityResult, SyntaxKind, SyntaxList, TaggedTemplateExpression, + TemplateExpression, TemplateLiteral, TemplateLiteralLikeNode, TemplateLiteralToken, @@ -530,6 +550,7 @@ import { TransformFlags, TransientSymbol, TriviaSyntaxKind, + tryAddToSet, tryCast, tryRemovePrefix, TryStatement, @@ -5077,7 +5098,29 @@ export function isDynamicName(name: DeclarationName): boolean { !isSignedNumericLiteral(expr); } +/** + * @internal + */ +export function hasIdentifierComputedName(declaration: Declaration): declaration is DynamicNamedDeclaration | DynamicNamedBinaryExpression { + const name = getNameOfDeclaration(declaration); + return !!name && isIdentifierComputedName(name); +} +/** @internal */ +export function isIdentifierComputedName(name: DeclarationName): boolean { + if (!(name.kind === SyntaxKind.ComputedPropertyName || name.kind === SyntaxKind.ElementAccessExpression)) { + return false; + } + let expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; + while (isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + return isIdentifier(expr); +} + +/** @internal */ +export function getPropertyNameForPropertyNameNode(name: Exclude | JsxAttributeName): __String; /** @internal */ +export function getPropertyNameForPropertyNameNode(name: PropertyName | JsxAttributeName): __String | undefined; export function getPropertyNameForPropertyNameNode(name: PropertyName | JsxAttributeName): __String | undefined { switch (name.kind) { case SyntaxKind.Identifier: @@ -6391,7 +6434,7 @@ export function sourceFileMayBeEmitted(sourceFile: SourceFile, host: SourceFileM } /** @internal */ -export function getSourceFilePathInNewDir(fileName: string, host: EmitHost, newDirPath: string): string { +export function getSourceFilePathInNewDir(fileName: string, host: CoreEmitHost, newDirPath: string): string { return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), f => host.getCanonicalFileName(f)); } @@ -10661,3 +10704,1033 @@ export function replaceFirstStar(s: string, replacement: string): string { export function getNameFromImportAttribute(node: ImportAttribute) { return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text); } + +/** @internal */ +export function getDeclarationContainer(node: Node): Node { + return findAncestor(getRootDeclaration(node), node => { + switch (node.kind) { + case SyntaxKind.VariableDeclaration: + case SyntaxKind.VariableDeclarationList: + case SyntaxKind.ImportSpecifier: + case SyntaxKind.NamedImports: + case SyntaxKind.NamespaceImport: + case SyntaxKind.ImportClause: + return false; + default: + return true; + } + })!.parent; +} + +/** @internal */ +export function getAnyImportSyntax(node: Node): AnyImportSyntax | undefined { + switch (node.kind) { + case SyntaxKind.ImportEqualsDeclaration: + return node as ImportEqualsDeclaration; + case SyntaxKind.ImportClause: + return (node as ImportClause).parent; + case SyntaxKind.NamespaceImport: + return (node as NamespaceImport).parent.parent; + case SyntaxKind.ImportSpecifier: + return (node as ImportSpecifier).parent.parent.parent; + default: + return undefined; + } +} + +/** @internal */ +export function isGlobalSourceFile(node: Node) { + return node.kind === SyntaxKind.SourceFile && !isExternalOrCommonJsModule(node as SourceFile); +} + +/** @internal */ +export function determineIfDeclarationIsVisible(node: Node, isDeclarationVisible: (node: Node) => boolean) { + switch (node.kind) { + case SyntaxKind.JSDocCallbackTag: + case SyntaxKind.JSDocTypedefTag: + case SyntaxKind.JSDocEnumTag: + // Top-level jsdoc type aliases are considered exported + // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file + return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); + case SyntaxKind.BindingElement: + return isDeclarationVisible(node.parent.parent); + case SyntaxKind.VariableDeclaration: + if ( + isBindingPattern((node as VariableDeclaration).name) && + !((node as VariableDeclaration).name as BindingPattern).elements.length + ) { + // If the binding pattern is empty, this variable declaration is not visible + return false; + } + // falls through + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.ImportEqualsDeclaration: + // external module augmentation is always visible + if (isExternalModuleAugmentation(node)) { + return true; + } + const parent = getDeclarationContainer(node); + // If the node is not exported or it is not ambient module element (except import declaration) + if ( + !(getCombinedModifierFlags(node as Declaration) & ModifierFlags.Export) && + !(node.kind !== SyntaxKind.ImportEqualsDeclaration && parent.kind !== SyntaxKind.SourceFile && parent.flags & NodeFlags.Ambient) + ) { + return isGlobalSourceFile(parent); + } + // Exported members/ambient module elements (exception import declaration) are visible if parent is visible + return isDeclarationVisible(parent); + + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + if (hasEffectiveModifier(node, ModifierFlags.Private | ModifierFlags.Protected)) { + // Private/protected properties/methods are not visible + return false; + } + // Public properties/methods are visible if its parents are visible, so: + // falls through + + case SyntaxKind.Constructor: + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallSignature: + case SyntaxKind.IndexSignature: + case SyntaxKind.Parameter: + case SyntaxKind.ModuleBlock: + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: + case SyntaxKind.TypeLiteral: + case SyntaxKind.TypeReference: + case SyntaxKind.ArrayType: + case SyntaxKind.TupleType: + case SyntaxKind.UnionType: + case SyntaxKind.IntersectionType: + case SyntaxKind.ParenthesizedType: + case SyntaxKind.NamedTupleMember: + return isDeclarationVisible(node.parent); + + // Default binding, import specifier and namespace import is visible + // only on demand so by default it is not visible + case SyntaxKind.ImportClause: + case SyntaxKind.NamespaceImport: + case SyntaxKind.ImportSpecifier: + return false; + + // Type parameters are always visible + case SyntaxKind.TypeParameter: + + // Source file and namespace export are always visible + // falls through + case SyntaxKind.SourceFile: + case SyntaxKind.NamespaceExportDeclaration: + return true; + + // Export assignments do not create name bindings outside the module + case SyntaxKind.ExportAssignment: + return false; + + default: + return false; + } +} + +/** @internal */ +export interface EvaluationResolver { + evaluateEntityNameExpression(expr: EntityNameExpression, location: Declaration | undefined): string | number | undefined; + evaluateElementAccessExpression(expr: ElementAccessExpression, location: Declaration | undefined): string | number | undefined; + onNumericLiteral(expr: NumericLiteral): void; +} + +/** @internal */ +export function createEvaluator({ evaluateElementAccessExpression, evaluateEntityNameExpression, onNumericLiteral }: EvaluationResolver) { + function evaluate(expr: TemplateExpression, location?: Declaration): string; + function evaluate(expr: Expression, location?: Declaration): string | number | undefined; + function evaluate(expr: Expression, location?: Declaration): string | number | undefined { + switch (expr.kind) { + case SyntaxKind.PrefixUnaryExpression: + const value = evaluate((expr as PrefixUnaryExpression).operand, location); + if (typeof value === "number") { + switch ((expr as PrefixUnaryExpression).operator) { + case SyntaxKind.PlusToken: + return value; + case SyntaxKind.MinusToken: + return -value; + case SyntaxKind.TildeToken: + return ~value; + } + } + break; + case SyntaxKind.BinaryExpression: + const left = evaluate((expr as BinaryExpression).left, location); + const right = evaluate((expr as BinaryExpression).right, location); + if (typeof left === "number" && typeof right === "number") { + switch ((expr as BinaryExpression).operatorToken.kind) { + case SyntaxKind.BarToken: + return left | right; + case SyntaxKind.AmpersandToken: + return left & right; + case SyntaxKind.GreaterThanGreaterThanToken: + return left >> right; + case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: + return left >>> right; + case SyntaxKind.LessThanLessThanToken: + return left << right; + case SyntaxKind.CaretToken: + return left ^ right; + case SyntaxKind.AsteriskToken: + return left * right; + case SyntaxKind.SlashToken: + return left / right; + case SyntaxKind.PlusToken: + return left + right; + case SyntaxKind.MinusToken: + return left - right; + case SyntaxKind.PercentToken: + return left % right; + case SyntaxKind.AsteriskAsteriskToken: + return left ** right; + } + } + else if ( + (typeof left === "string" || typeof left === "number") && + (typeof right === "string" || typeof right === "number") && + (expr as BinaryExpression).operatorToken.kind === SyntaxKind.PlusToken + ) { + return "" + left + right; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + return (expr as StringLiteralLike).text; + case SyntaxKind.TemplateExpression: + return evaluateTemplateExpression(expr as TemplateExpression, location); + case SyntaxKind.NumericLiteral: + onNumericLiteral(expr as NumericLiteral); + return +(expr as NumericLiteral).text; + case SyntaxKind.ParenthesizedExpression: + return evaluate((expr as ParenthesizedExpression).expression, location); + case SyntaxKind.Identifier: + case SyntaxKind.PropertyAccessExpression: + return evaluateEntityNameExpression(expr as EntityNameExpression, location); + case SyntaxKind.ElementAccessExpression: + return evaluateElementAccessExpression(expr as ElementAccessExpression, location); + } + return undefined; + } + + function evaluateTemplateExpression(expr: TemplateExpression, location?: Declaration) { + let result = expr.head.text; + for (const span of expr.templateSpans) { + const value = evaluate(span.expression, location); + if (value === undefined) { + return undefined; + } + result += value; + result += span.literal.text; + } + return result; + } + + return evaluate; +} + +/** @internal */ +export function getModuleSpecifierForImportOrExport(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportOrExportSpecifier): Expression | undefined { + switch (node.kind) { + case SyntaxKind.ImportClause: + return node.parent.moduleSpecifier; + case SyntaxKind.ImportEqualsDeclaration: + return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : undefined; + case SyntaxKind.NamespaceImport: + return node.parent.parent.moduleSpecifier; + case SyntaxKind.ImportSpecifier: + return node.parent.parent.parent.moduleSpecifier; + case SyntaxKind.ExportSpecifier: + return node.parent.parent.moduleSpecifier; + default: + return Debug.assertNever(node); + } +} + +/** @internal */ +export function createEntityVisibilityChecker({ isDeclarationVisible, isThisAccessible, markDeclarationAsVisible, resolveName, defaultSymbolAccessibility, getTargetOfExportSpecifier }: { + defaultSymbolAccessibility: SymbolAccessibility; + isDeclarationVisible(node: Node): boolean; + isThisAccessible(identifier: Identifier, meaning: SymbolFlags): SymbolVisibilityResult; + markDeclarationAsVisible(node: Node): void; + getTargetOfExportSpecifier(exportSpecifier: ExportSpecifier, flags: SymbolFlags): Symbol | undefined; + resolveName( + location: Node | undefined, + name: __String, + meaning: SymbolFlags, + nameNotFoundMessage: DiagnosticMessage | undefined, + nameArg: __String | Identifier | undefined, + isUse: boolean, + excludeGlobals?: boolean, + getSpellingSuggestions?: boolean, + ): Symbol | undefined; +}) { + function collectLinkedAliases(node: Identifier, setVisibility?: boolean): Node[] | undefined { + let exportSymbol: Symbol | undefined; + if (node.parent && node.parent.kind === SyntaxKind.ExportAssignment) { + exportSymbol = resolveName(node, node.escapedText, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias, /*nameNotFoundMessage*/ undefined, node, /*isUse*/ false); + } + else if (node.parent.kind === SyntaxKind.ExportSpecifier) { + exportSymbol = getTargetOfExportSpecifier(node.parent as ExportSpecifier, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); + } + let result: Node[] | undefined; + let visited: Set | undefined; + if (exportSymbol) { + visited = new Set(); + visited.add(getSymbolId(exportSymbol)); + buildVisibleNodeList(exportSymbol.declarations); + } + return result; + + function buildVisibleNodeList(declarations: Declaration[] | undefined) { + forEach(declarations, declaration => { + const resultNode = getAnyImportSyntax(declaration) || declaration; + if (setVisibility) { + markDeclarationAsVisible(declaration); + } + else { + result = result || []; + pushIfUnique(result, resultNode); + } + + if (isInternalModuleImportEqualsDeclaration(declaration)) { + // Add the referenced top container visible + const internalModuleReference = declaration.moduleReference as Identifier | QualifiedName; + const firstIdentifier = getFirstIdentifier(internalModuleReference); + const importSymbol = resolveName(declaration, firstIdentifier.escapedText, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); + if (importSymbol && visited) { + if (tryAddToSet(visited, getSymbolId(importSymbol))) { + buildVisibleNodeList(importSymbol.declarations); + } + } + } + }); + } + } + + function hasVisibleDeclarations(symbol: Symbol, shouldComputeAliasToMakeVisible: boolean): SymbolVisibilityResult | undefined { + let aliasesToMakeVisible: LateVisibilityPaintedStatement[] | undefined; + if (!every(filter(symbol.declarations, d => d.kind !== SyntaxKind.Identifier), getIsDeclarationVisible)) { + return undefined; + } + return { accessibility: SymbolAccessibility.Accessible, aliasesToMakeVisible }; + + function getIsDeclarationVisible(declaration: Declaration) { + if (!isDeclarationVisible(declaration)) { + // Mark the unexported alias as visible if its parent is visible + // because these kind of aliases can be used to name types in declaration file + + const anyImportSyntax = getAnyImportSyntax(declaration); + if ( + anyImportSyntax && + !hasSyntacticModifier(anyImportSyntax, ModifierFlags.Export) && // import clause without export + isDeclarationVisible(anyImportSyntax.parent) + ) { + return addVisibleAlias(declaration, anyImportSyntax); + } + else if ( + isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && + !hasSyntacticModifier(declaration.parent.parent, ModifierFlags.Export) && // unexported variable statement + isDeclarationVisible(declaration.parent.parent.parent) + ) { + return addVisibleAlias(declaration, declaration.parent.parent); + } + else if ( + isLateVisibilityPaintedStatement(declaration) // unexported top-level statement + && !hasSyntacticModifier(declaration, ModifierFlags.Export) + && isDeclarationVisible(declaration.parent) + ) { + return addVisibleAlias(declaration, declaration); + } + else if (isBindingElement(declaration)) { + if ( + symbol.flags & SymbolFlags.Alias && isInJSFile(declaration) && declaration.parent?.parent // exported import-like top-level JS require statement + && isVariableDeclaration(declaration.parent.parent) + && declaration.parent.parent.parent?.parent && isVariableStatement(declaration.parent.parent.parent.parent) + && !hasSyntacticModifier(declaration.parent.parent.parent.parent, ModifierFlags.Export) + && declaration.parent.parent.parent.parent.parent // check if the thing containing the variable statement is visible (ie, the file) + && isDeclarationVisible(declaration.parent.parent.parent.parent.parent) + ) { + return addVisibleAlias(declaration, declaration.parent.parent.parent.parent); + } + else if (symbol.flags & SymbolFlags.BlockScopedVariable) { + const variableStatement = findAncestor(declaration, isVariableStatement)!; + if (hasSyntacticModifier(variableStatement, ModifierFlags.Export)) { + return true; + } + if (!isDeclarationVisible(variableStatement.parent)) { + return false; + } + return addVisibleAlias(declaration, variableStatement); + } + } + + // Declaration is not visible + return false; + } + + return true; + } + + function addVisibleAlias(declaration: Declaration, aliasingStatement: LateVisibilityPaintedStatement) { + // In function "buildTypeDisplay" where we decide whether to write type-alias or serialize types, + // we want to just check if type- alias is accessible or not but we don't care about emitting those alias at that time + // since we will do the emitting later in trackSymbol. + if (shouldComputeAliasToMakeVisible) { + markDeclarationAsVisible(declaration); + aliasesToMakeVisible = appendIfUnique(aliasesToMakeVisible, aliasingStatement); + } + return true; + } + } + + function isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult { + // get symbol of the first identifier of the entityName + let meaning: SymbolFlags; + if ( + entityName.parent.kind === SyntaxKind.TypeQuery || + entityName.parent.kind === SyntaxKind.ExpressionWithTypeArguments && !isPartOfTypeNode(entityName.parent) || + entityName.parent.kind === SyntaxKind.ComputedPropertyName + ) { + // Typeof value + meaning = SymbolFlags.Value | SymbolFlags.ExportValue; + } + else if ( + entityName.kind === SyntaxKind.QualifiedName || entityName.kind === SyntaxKind.PropertyAccessExpression || + entityName.parent.kind === SyntaxKind.ImportEqualsDeclaration + ) { + // Left identifier from type reference or TypeAlias + // Entity name of the import declaration + meaning = SymbolFlags.Namespace; + } + else { + // Type Reference or TypeAlias entity = Identifier + meaning = SymbolFlags.Type; + } + + const firstIdentifier = getFirstIdentifier(entityName); + const symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); + if (symbol && symbol.flags & SymbolFlags.TypeParameter && meaning & SymbolFlags.Type) { + return { accessibility: SymbolAccessibility.Accessible }; + } + + if (!symbol && isThisIdentifier(firstIdentifier) && isThisAccessible(firstIdentifier, meaning).accessibility === SymbolAccessibility.Accessible) { + return { accessibility: SymbolAccessibility.Accessible }; + } + + // Verify if the symbol is accessible + return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { + accessibility: defaultSymbolAccessibility, + errorSymbolName: getTextOfNode(firstIdentifier), + errorNode: firstIdentifier, + }; + } + + return { hasVisibleDeclarations, isEntityNameVisible, collectLinkedAliases }; +} + +/** @internal */ +export function isPrimitiveLiteralValue(node: Expression, includeBigInt = true): boolean { + function isPositiveOrNegativeNumber(node: Expression, includeBigInt: boolean) { + if (isBigIntLiteral(node)) return includeBigInt; + if (isNumericLiteral(node)) return true; + if (isPrefixUnaryExpression(node)) { + const operand = node.operand; + if (node.operator === SyntaxKind.MinusToken) { + return isNumericLiteral(operand) || (includeBigInt && isBigIntLiteral(operand)); + } + if (node.operator === SyntaxKind.PlusToken) { + return isNumericLiteral(operand); + } + } + } + if (isPositiveOrNegativeNumber(node, includeBigInt) || isStringLiteralLike(node)) return true; + + if (node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; + + if (isTemplateExpression(node)) { + return node.templateSpans.every(t => isStringLiteral(t.expression) || isPositiveOrNegativeNumber(t.expression, /*includeBigInt*/ false)); + } + return false; +} + +/** @internal */ +export function isConstAssertion(location: Node) { + return (isAssertionExpression(location) && isConstTypeReference(location.type)) + || (isJSDocTypeTag(location) && isConstTypeReference(location.typeExpression)); +} + +/** @internal */ +export function findConstructorDeclaration(node: ClassLikeDeclaration): ConstructorDeclaration | undefined { + const members = node.members; + for (const member of members) { + if (member.kind === SyntaxKind.Constructor && nodeIsPresent((member as ConstructorDeclaration).body)) { + return member as ConstructorDeclaration; + } + } +} + +/** @internal */ +export function createNameResolver( + compilerOptions: CompilerOptions, + getSymbolOfDeclaration: (node: Declaration) => Symbol, + error: (location: Node | undefined, message: DiagnosticMessage, ...args: DiagnosticArguments) => void, + globals: SymbolTable, + argumentsSymbol: Symbol, + requireSymbol: Symbol, + emptySymbols: SymbolTable, + extendedResolveErrorReporting: ( + result: Symbol | undefined, + originalLocation: Node | undefined, + name: __String, + meaning: SymbolFlags, + nameNotFoundMessage: DiagnosticMessage | undefined, + nameArg: __String | Identifier | undefined, + getSpellingSuggestions: boolean, + lookup: (symbols: SymbolTable, name: __String, meaning: SymbolFlags) => Symbol | undefined, + lastLocation: Node | undefined, + errorLocation: Node | undefined, + propertyWithInvalidInitializer: PropertyDeclaration | undefined, + associatedDeclarationForContainingInitializerOrBindingName: ParameterDeclaration | BindingElement | undefined, + withinDeferredContext: boolean, + isInExternalModule: boolean, + ) => Symbol | undefined, + lookup: (symbols: SymbolTable, name: __String, meaning: SymbolFlags) => Symbol | undefined, + getNodeLinks: (node: Node) => { declarationRequiresScopeChange?: boolean; }, +) { + /* eslint-disable no-var */ + var isolatedModulesLikeFlagName = compilerOptions.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"; + /* eslint-disable no-var */ + var emitStandardClassFields = getEmitStandardClassFields(compilerOptions); + + return resolveNameHelper; + + function isTypeParameterSymbolDeclaredInContainer(symbol: Symbol, container: Node) { + if (symbol.declarations) { + for (const decl of symbol.declarations) { + if (decl.kind === SyntaxKind.TypeParameter) { + const parent = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; + if (parent === container) { + return !(isJSDocTemplateTag(decl.parent) && find((decl.parent.parent as JSDoc).tags, isJSDocTypeAlias)); + } + } + } + } + + return false; + } + + type SelfReferenceLocation = + | FunctionDeclaration + | ClassDeclaration + | InterfaceDeclaration + | EnumDeclaration + | TypeAliasDeclaration + | ModuleDeclaration; + + function isSelfReferenceLocation(node: Node): node is SelfReferenceLocation { + switch (node.kind) { + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.ModuleDeclaration: // For `namespace N { N; }` + return true; + default: + return false; + } + } + + function getIsDeferredContext(location: Node, lastLocation: Node | undefined): boolean { + if (location.kind !== SyntaxKind.ArrowFunction && location.kind !== SyntaxKind.FunctionExpression) { + // initializers in instance property declaration of class like entities are executed in constructor and thus deferred + return isTypeQueryNode(location) || (( + isFunctionLikeDeclaration(location) || + (location.kind === SyntaxKind.PropertyDeclaration && !isStatic(location)) + ) && (!lastLocation || lastLocation !== (location as SignatureDeclaration | PropertyDeclaration).name)); // A name is evaluated within the enclosing scope - so it shouldn't count as deferred + } + if (lastLocation && lastLocation === (location as FunctionExpression | ArrowFunction).name) { + return false; + } + // generator functions and async functions are not inlined in control flow when immediately invoked + if ((location as FunctionExpression | ArrowFunction).asteriskToken || hasSyntacticModifier(location, ModifierFlags.Async)) { + return true; + } + return !getImmediatelyInvokedFunctionExpression(location); + } + + function useOuterVariableScopeInParameter(result: Symbol, location: Node, lastLocation: Node) { + const target = getEmitScriptTarget(compilerOptions); + const functionLocation = location as FunctionLikeDeclaration; + if ( + isParameter(lastLocation) + && functionLocation.body + && result.valueDeclaration + && result.valueDeclaration.pos >= functionLocation.body.pos + && result.valueDeclaration.end <= functionLocation.body.end + ) { + // check for several cases where we introduce temporaries that require moving the name/initializer of the parameter to the body + // - static field in a class expression + // - optional chaining pre-es2020 + // - nullish coalesce pre-es2020 + // - spread assignment in binding pattern pre-es2017 + if (target >= ScriptTarget.ES2015) { + const links = getNodeLinks(functionLocation); + if (links.declarationRequiresScopeChange === undefined) { + links.declarationRequiresScopeChange = forEach(functionLocation.parameters, requiresScopeChange) || false; + } + return !links.declarationRequiresScopeChange; + } + } + return false; + + function requiresScopeChange(node: ParameterDeclaration): boolean { + return requiresScopeChangeWorker(node.name) + || !!node.initializer && requiresScopeChangeWorker(node.initializer); + } + + function requiresScopeChangeWorker(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Constructor: + // do not descend into these + return false; + case SyntaxKind.MethodDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.PropertyAssignment: + return requiresScopeChangeWorker((node as MethodDeclaration | AccessorDeclaration | PropertyAssignment).name); + case SyntaxKind.PropertyDeclaration: + // static properties in classes introduce temporary variables + if (hasStaticModifier(node)) { + return !emitStandardClassFields; + } + return requiresScopeChangeWorker((node as PropertyDeclaration).name); + default: + // null coalesce and optional chain pre-es2020 produce temporary variables + if (isNullishCoalesce(node) || isOptionalChain(node)) { + return target < ScriptTarget.ES2020; + } + if (isBindingElement(node) && node.dotDotDotToken && isObjectBindingPattern(node.parent)) { + return target < ScriptTarget.ES2017; + } + if (isTypeNode(node)) return false; + return forEachChild(node, requiresScopeChangeWorker) || false; + } + } + } + + function resolveNameHelper( + location: Node | undefined, + name: __String, + meaning: SymbolFlags, + nameNotFoundMessage: DiagnosticMessage | undefined, + nameArg: __String | Identifier | undefined, + isUse: boolean, + excludeGlobals: boolean, + getSpellingSuggestions: boolean, + ): Symbol | undefined { + const originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location + let result: Symbol | undefined; + let lastLocation: Node | undefined; + let lastSelfReferenceLocation: Declaration | undefined; + let propertyWithInvalidInitializer: PropertyDeclaration | undefined; + let associatedDeclarationForContainingInitializerOrBindingName: ParameterDeclaration | BindingElement | undefined; + let withinDeferredContext = false; + const errorLocation = location; + let grandparent: Node; + let isInExternalModule = false; + + loop: + while (location) { + if (name === "const" && isConstAssertion(location)) { + // `const` in an `as const` has no symbol, but issues no error because there is no *actual* lookup of the type + // (it refers to the constant type of the expression instead) + return undefined; + } + if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) { + // If lastLocation is the name of a namespace or enum, skip the parent since it will have is own locals that could + // conflict. + lastLocation = location; + location = location.parent; + } + // Locals of a source file are not in scope (because they get merged into the global symbol table) + if (canHaveLocals(location) && location.locals && !isGlobalSourceFile(location)) { + if (result = lookup(location.locals, name, meaning)) { + let useResult = true; + if (isFunctionLike(location) && lastLocation && lastLocation !== (location as FunctionLikeDeclaration).body) { + // symbol lookup restrictions for function-like declarations + // - Type parameters of a function are in scope in the entire function declaration, including the parameter + // list and return type. However, local types are only in scope in the function body. + // - parameters are only in the scope of function body + // This restriction does not apply to JSDoc comment types because they are parented + // at a higher level than type parameters would normally be + if (meaning & result.flags & SymbolFlags.Type && lastLocation.kind !== SyntaxKind.JSDoc) { + useResult = result.flags & SymbolFlags.TypeParameter + // type parameters are visible in parameter list, return type and type parameter list + ? lastLocation === (location as FunctionLikeDeclaration).type || + lastLocation.kind === SyntaxKind.Parameter || + lastLocation.kind === SyntaxKind.JSDocParameterTag || + lastLocation.kind === SyntaxKind.JSDocReturnTag || + lastLocation.kind === SyntaxKind.TypeParameter + // local types not visible outside the function body + : false; + } + if (meaning & result.flags & SymbolFlags.Variable) { + // expression inside parameter will lookup as normal variable scope when targeting es2015+ + if (useOuterVariableScopeInParameter(result, location, lastLocation)) { + useResult = false; + } + else if (result.flags & SymbolFlags.FunctionScopedVariable) { + // parameters are visible only inside function body, parameter list and return type + // technically for parameter list case here we might mix parameters and variables declared in function, + // however it is detected separately when checking initializers of parameters + // to make sure that they reference no variables declared after them. + useResult = lastLocation.kind === SyntaxKind.Parameter || + ( + lastLocation === (location as FunctionLikeDeclaration).type && + !!findAncestor(result.valueDeclaration, isParameter) + ); + } + } + } + else if (location.kind === SyntaxKind.ConditionalType) { + // A type parameter declared using 'infer T' in a conditional type is visible only in + // the true branch of the conditional type. + useResult = lastLocation === location.trueType; + } + + if (useResult) { + break loop; + } + else { + result = undefined; + } + } + } + withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); + switch (location.kind) { + case SyntaxKind.SourceFile: + if (!isExternalOrCommonJsModule(location as SourceFile)) break; + isInExternalModule = true; + // falls through + case SyntaxKind.ModuleDeclaration: + const moduleExports = getSymbolOfDeclaration(location as SourceFile | ModuleDeclaration)?.exports || emptySymbols; + if (location.kind === SyntaxKind.SourceFile || (isModuleDeclaration(location) && location.flags & NodeFlags.Ambient && !isGlobalScopeAugmentation(location))) { + // It's an external module. First see if the module has an export default and if the local + // name of that export default matches. + if (result = moduleExports.get(InternalSymbolName.Default)) { + const localSymbol = getLocalSymbolForExportDefault(result); + if (localSymbol && (result.flags & meaning) && localSymbol.escapedName === name) { + break loop; + } + result = undefined; + } + + // Because of module/namespace merging, a module's exports are in scope, + // yet we never want to treat an export specifier as putting a member in scope. + // Therefore, if the name we find is purely an export specifier, it is not actually considered in scope. + // Two things to note about this: + // 1. We have to check this without calling getSymbol. The problem with calling getSymbol + // on an export specifier is that it might find the export specifier itself, and try to + // resolve it as an alias. This will cause the checker to consider the export specifier + // a circular alias reference when it might not be. + // 2. We check === SymbolFlags.Alias in order to check that the symbol is *purely* + // an alias. If we used &, we'd be throwing out symbols that have non alias aspects, + // which is not the desired behavior. + const moduleExport = moduleExports.get(name); + if ( + moduleExport && + moduleExport.flags === SymbolFlags.Alias && + (getDeclarationOfKind(moduleExport, SyntaxKind.ExportSpecifier) || getDeclarationOfKind(moduleExport, SyntaxKind.NamespaceExport)) + ) { + break; + } + } + + // ES6 exports are also visible locally (except for 'default'), but commonjs exports are not (except typedefs) + if (name !== InternalSymbolName.Default && (result = lookup(moduleExports, name, meaning & SymbolFlags.ModuleMember))) { + if (isSourceFile(location) && location.commonJsModuleIndicator && !result.declarations?.some(isJSDocTypeAlias)) { + result = undefined; + } + else { + break loop; + } + } + break; + case SyntaxKind.EnumDeclaration: + if (result = lookup(getSymbolOfDeclaration(location as EnumDeclaration)?.exports || emptySymbols, name, meaning & SymbolFlags.EnumMember)) { + if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & NodeFlags.Ambient) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { + error( + errorLocation, + Diagnostics.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, + unescapeLeadingUnderscores(name), + isolatedModulesLikeFlagName, + `${unescapeLeadingUnderscores(getSymbolOfDeclaration(location as EnumDeclaration)!.escapedName)}.${unescapeLeadingUnderscores(name)}`, + ); + } + break loop; + } + break; + case SyntaxKind.PropertyDeclaration: + // TypeScript 1.0 spec (April 2014): 8.4.1 + // Initializer expressions for instance member variables are evaluated in the scope + // of the class constructor body but are not permitted to reference parameters or + // local variables of the constructor. This effectively means that entities from outer scopes + // by the same name as a constructor parameter or local variable are inaccessible + // in initializer expressions for instance member variables. + if (!isStatic(location)) { + const ctor = findConstructorDeclaration(location.parent as ClassLikeDeclaration); + if (ctor && ctor.locals) { + if (lookup(ctor.locals, name, meaning & SymbolFlags.Value)) { + // Remember the property node, it will be used later to report appropriate error + Debug.assertNode(location, isPropertyDeclaration); + propertyWithInvalidInitializer = location; + } + } + } + break; + case SyntaxKind.ClassDeclaration: + case SyntaxKind.ClassExpression: + case SyntaxKind.InterfaceDeclaration: + // The below is used to lookup type parameters within a class or interface, as they are added to the class/interface locals + // These can never be latebound, so the symbol's raw members are sufficient. `getMembersOfNode` cannot be used, as it would + // trigger resolving late-bound names, which we may already be in the process of doing while we're here! + if (result = lookup(getSymbolOfDeclaration(location as ClassLikeDeclaration | InterfaceDeclaration).members || emptySymbols, name, meaning & SymbolFlags.Type)) { + if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { + // ignore type parameters not declared in this container + result = undefined; + break; + } + if (lastLocation && isStatic(lastLocation)) { + // TypeScript 1.0 spec (April 2014): 3.4.1 + // The scope of a type parameter extends over the entire declaration with which the type + // parameter list is associated, with the exception of static member declarations in classes. + if (nameNotFoundMessage) { + error(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); + } + return undefined; + } + break loop; + } + if (isClassExpression(location) && meaning & SymbolFlags.Class) { + const className = location.name; + if (className && name === className.escapedText) { + result = location.symbol; + break loop; + } + } + break; + case SyntaxKind.ExpressionWithTypeArguments: + // The type parameters of a class are not in scope in the base class expression. + if (lastLocation === (location as ExpressionWithTypeArguments).expression && (location.parent as HeritageClause).token === SyntaxKind.ExtendsKeyword) { + const container = location.parent.parent; + if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members!, name, meaning & SymbolFlags.Type))) { + if (nameNotFoundMessage) { + error(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); + } + return undefined; + } + } + break; + // It is not legal to reference a class's own type parameters from a computed property name that + // belongs to the class. For example: + // + // function foo() { return '' } + // class C { // <-- Class's own type parameter T + // [foo()]() { } // <-- Reference to T from class's own computed property + // } + // + case SyntaxKind.ComputedPropertyName: + grandparent = location.parent.parent; + if (isClassLike(grandparent) || grandparent.kind === SyntaxKind.InterfaceDeclaration) { + // A reference to this grandparent's type parameters would be an error + if (result = lookup(getSymbolOfDeclaration(grandparent as ClassLikeDeclaration | InterfaceDeclaration).members!, name, meaning & SymbolFlags.Type)) { + if (nameNotFoundMessage) { + error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); + } + return undefined; + } + } + break; + case SyntaxKind.ArrowFunction: + // when targeting ES6 or higher there is no 'arguments' in an arrow function + // for lower compile targets the resolved symbol is used to emit an error + if (getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015) { + break; + } + // falls through + case SyntaxKind.MethodDeclaration: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.FunctionDeclaration: + if (meaning & SymbolFlags.Variable && name === "arguments") { + result = argumentsSymbol; + break loop; + } + break; + case SyntaxKind.FunctionExpression: + if (meaning & SymbolFlags.Variable && name === "arguments") { + result = argumentsSymbol; + break loop; + } + + if (meaning & SymbolFlags.Function) { + const functionName = (location as FunctionExpression).name; + if (functionName && name === functionName.escapedText) { + result = (location as FunctionExpression).symbol; + break loop; + } + } + break; + case SyntaxKind.Decorator: + // Decorators are resolved at the class declaration. Resolving at the parameter + // or member would result in looking up locals in the method. + // + // function y() {} + // class C { + // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. + // } + // + if (location.parent && location.parent.kind === SyntaxKind.Parameter) { + location = location.parent; + } + // + // function y() {} + // class C { + // @y method(x, y) {} // <-- decorator y should be resolved at the class declaration, not the method. + // } + // + + // class Decorators are resolved outside of the class to avoid referencing type parameters of that class. + // + // type T = number; + // declare function y(x: T): any; + // @param(1 as T) // <-- T should resolve to the type alias outside of class C + // class C {} + if (location.parent && (isClassElement(location.parent) || location.parent.kind === SyntaxKind.ClassDeclaration)) { + location = location.parent; + } + break; + case SyntaxKind.JSDocTypedefTag: + case SyntaxKind.JSDocCallbackTag: + case SyntaxKind.JSDocEnumTag: + // js type aliases do not resolve names from their host, so skip past it + const root = getJSDocRoot(location); + if (root) { + location = root.parent; + } + break; + case SyntaxKind.Parameter: + if ( + lastLocation && ( + lastLocation === (location as ParameterDeclaration).initializer || + lastLocation === (location as ParameterDeclaration).name && isBindingPattern(lastLocation) + ) + ) { + if (!associatedDeclarationForContainingInitializerOrBindingName) { + associatedDeclarationForContainingInitializerOrBindingName = location as ParameterDeclaration; + } + } + break; + case SyntaxKind.BindingElement: + if ( + lastLocation && ( + lastLocation === (location as BindingElement).initializer || + lastLocation === (location as BindingElement).name && isBindingPattern(lastLocation) + ) + ) { + if (isParameterDeclaration(location as BindingElement) && !associatedDeclarationForContainingInitializerOrBindingName) { + associatedDeclarationForContainingInitializerOrBindingName = location as BindingElement; + } + } + break; + case SyntaxKind.InferType: + if (meaning & SymbolFlags.TypeParameter) { + const parameterName = (location as InferTypeNode).typeParameter.name; + if (parameterName && name === parameterName.escapedText) { + result = (location as InferTypeNode).typeParameter.symbol; + break loop; + } + } + break; + case SyntaxKind.ExportSpecifier: + // External module export bindings shouldn't be resolved to local symbols. + if ( + lastLocation && + lastLocation === (location as ExportSpecifier).propertyName && + (location as ExportSpecifier).parent.parent.moduleSpecifier + ) { + location = location.parent.parent.parent; + } + break; + } + if (isSelfReferenceLocation(location)) { + lastSelfReferenceLocation = location; + } + lastLocation = location; + location = isJSDocTemplateTag(location) ? getEffectiveContainerForJSDocTemplateTag(location) || location.parent : + isJSDocParameterTag(location) || isJSDocReturnTag(location) ? getHostSignatureFromJSDoc(location) || location.parent : + location.parent; + } + + // We just climbed up parents looking for the name, meaning that we started in a descendant node of `lastLocation`. + // If `result === lastSelfReferenceLocation.symbol`, that means that we are somewhere inside `lastSelfReferenceLocation` looking up a name, and resolving to `lastLocation` itself. + // That means that this is a self-reference of `lastLocation`, and shouldn't count this when considering whether `lastLocation` is used. + if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) { + result.isReferenced! |= meaning; + } + + if (!result) { + if (lastLocation) { + Debug.assertNode(lastLocation, isSourceFile); + if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) { + return lastLocation.symbol; + } + } + + if (!excludeGlobals) { + result = lookup(globals, name, meaning); + } + } + if (!result) { + if (originalLocation && isInJSFile(originalLocation) && originalLocation.parent) { + if (isRequireCall(originalLocation.parent, /*requireStringLiteralLikeArgument*/ false)) { + return requireSymbol; + } + } + } + return extendedResolveErrorReporting( + result, + originalLocation, + name, + meaning, + nameNotFoundMessage, + nameArg, + getSpellingSuggestions, + lookup, + lastLocation, + errorLocation, + propertyWithInvalidInitializer, + associatedDeclarationForContainingInitializerOrBindingName, + withinDeferredContext, + isInExternalModule, + ); + } +} diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts index 0a4c746c2e7c6..d9e0b8929088a 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -1,5 +1,6 @@ import { ConciseBody, + CoreTransformationContext, Debug, EmitFlags, Expression, @@ -100,7 +101,6 @@ import { some, Statement, SyntaxKind, - TransformationContext, Visitor, } from "./_namespaces/ts"; @@ -378,7 +378,7 @@ function visitArrayWorker( * Starts a new lexical environment and visits a statement list, ending the lexical environment * and merging hoisted declarations upon completion. */ -export function visitLexicalEnvironment(statements: NodeArray, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor: NodesVisitor = visitNodes) { +export function visitLexicalEnvironment(statements: NodeArray, visitor: Visitor, context: CoreTransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor: NodesVisitor = visitNodes) { context.startLexicalEnvironment(); statements = nodesVisitor(statements, visitor, isStatement, start); if (ensureUseStrict) statements = context.factory.ensureUseStrict(statements); @@ -389,9 +389,9 @@ export function visitLexicalEnvironment(statements: NodeArray, visito * Starts a new lexical environment and visits a parameter list, suspending the lexical * environment upon completion. */ -export function visitParameterList(nodes: NodeArray, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray; -export function visitParameterList(nodes: NodeArray | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray | undefined; -export function visitParameterList(nodes: NodeArray | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor = visitNodes) { +export function visitParameterList(nodes: NodeArray, visitor: Visitor, context: CoreTransformationContext, nodesVisitor?: NodesVisitor): NodeArray; +export function visitParameterList(nodes: NodeArray | undefined, visitor: Visitor, context: CoreTransformationContext, nodesVisitor?: NodesVisitor): NodeArray | undefined; +export function visitParameterList(nodes: NodeArray | undefined, visitor: Visitor, context: CoreTransformationContext, nodesVisitor = visitNodes) { let updated: NodeArray | undefined; context.startLexicalEnvironment(); if (nodes) { @@ -416,7 +416,7 @@ export function visitParameterList(nodes: NodeArray | unde return updated; } -function addDefaultValueAssignmentsIfNeeded(parameters: NodeArray, context: TransformationContext) { +function addDefaultValueAssignmentsIfNeeded(parameters: NodeArray, context: CoreTransformationContext) { let result: ParameterDeclaration[] | undefined; for (let i = 0; i < parameters.length; i++) { const parameter = parameters[i]; @@ -432,7 +432,7 @@ function addDefaultValueAssignmentsIfNeeded(parameters: NodeArray, visitor: * @param visitor The callback used to visit each child. * @param context A lexical environment context for the visitor. */ -export function visitEachChild(node: T, visitor: Visitor, context: TransformationContext | undefined): T; +export function visitEachChild(node: T, visitor: Visitor, context: CoreTransformationContext | undefined): T; /** @internal */ -export function visitEachChild(node: T, visitor: Visitor, context: TransformationContext | undefined, nodesVisitor?: NodesVisitor, tokenVisitor?: Visitor, nodeVisitor?: NodeVisitor): T; // eslint-disable-line @typescript-eslint/unified-signatures +export function visitEachChild(node: T, visitor: Visitor, context: CoreTransformationContext | undefined, nodesVisitor?: NodesVisitor, tokenVisitor?: Visitor, nodeVisitor?: NodeVisitor): T; // eslint-disable-line @typescript-eslint/unified-signatures /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * @@ -591,10 +591,10 @@ export function visitEachChild(node: T, visitor: Visitor, contex * @param visitor The callback used to visit each child. * @param context A lexical environment context for the visitor. */ -export function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext | undefined, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; +export function visitEachChild(node: T | undefined, visitor: Visitor, context: CoreTransformationContext | undefined, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; /** @internal */ -export function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext | undefined, nodesVisitor?: NodesVisitor, tokenVisitor?: Visitor, nodeVisitor?: NodeVisitor): T | undefined; -export function visitEachChild(node: T | undefined, visitor: Visitor, context = nullTransformationContext, nodesVisitor = visitNodes, tokenVisitor?: Visitor, nodeVisitor: NodeVisitor = visitNode): T | undefined { +export function visitEachChild(node: T | undefined, visitor: Visitor, context: CoreTransformationContext | undefined, nodesVisitor?: NodesVisitor, tokenVisitor?: Visitor, nodeVisitor?: NodeVisitor): T | undefined; +export function visitEachChild(node: T | undefined, visitor: Visitor, context: CoreTransformationContext = nullTransformationContext, nodesVisitor = visitNodes, tokenVisitor?: Visitor, nodeVisitor: NodeVisitor = visitNode): T | undefined { if (node === undefined) { return undefined; } @@ -603,7 +603,7 @@ export function visitEachChild(node: T | undefined, visitor: Vis return fn === undefined ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor); } -type VisitEachChildFunction = (node: T, visitor: Visitor, context: TransformationContext, nodesVisitor: NodesVisitor, nodeVisitor: NodeVisitor, tokenVisitor: Visitor | undefined) => T; +type VisitEachChildFunction = (node: T, visitor: Visitor, context: CoreTransformationContext, nodesVisitor: NodesVisitor, nodeVisitor: NodeVisitor, tokenVisitor: Visitor | undefined) => T; // A type that correlates a `SyntaxKind` to a `VisitEachChildFunction`, for nodes in the `HasChildren` union. // This looks something like: diff --git a/src/harness/compilerImpl.ts b/src/harness/compilerImpl.ts index 370f09bcf69e2..9318cdbf55110 100644 --- a/src/harness/compilerImpl.ts +++ b/src/harness/compilerImpl.ts @@ -241,7 +241,14 @@ export class CompilationResult { } } -export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions, typeScriptVersion?: string): CompilationResult { +export function compileFiles( + host: fakes.CompilerHost, + rootFiles: string[] | undefined, + compilerOptions: ts.CompilerOptions, + typeScriptVersion?: string, + forceDtsEmit?: boolean, + skipErrorComparison?: boolean, +): CompilationResult { if (compilerOptions.project || !rootFiles || rootFiles.length === 0) { const project = readProject(host.parseConfigHost, compilerOptions.project, compilerOptions); if (project) { @@ -264,12 +271,20 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und // pre-emit/post-emit error comparison requires declaration emit twice, which can be slow. If it's unlikely to flag any error consistency issues // and if the test is running `skipLibCheck` - an indicator that we want the tets to run quickly - skip the before/after error comparison, too - const skipErrorComparison = ts.length(rootFiles) >= 100 || (!!compilerOptions.skipLibCheck && !!compilerOptions.declaration); + skipErrorComparison ??= ts.length(rootFiles) >= 100 || (!!compilerOptions.skipLibCheck && !!compilerOptions.declaration); + const preProgram = !skipErrorComparison ? ts.createProgram({ rootNames: rootFiles || [], options: { ...compilerOptions, configFile: compilerOptions.configFile, traceResolution: false }, host, typeScriptVersion }) : undefined; const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); const program = ts.createProgram({ rootNames: rootFiles || [], options: compilerOptions, host, typeScriptVersion }); - const emitResult = program.emit(); + const emitResult = program.emit( + /*targetSourceFile*/ undefined, + /*writeFile*/ undefined, + /*cancellationToken*/ undefined, + /*emitOnly*/ undefined, + /*customTransformers*/ undefined, + /*forceDtsEmit*/ forceDtsEmit, + ); const postErrors = ts.getPreEmitDiagnostics(program); const longerErrors = ts.length(preErrors) > postErrors.length ? preErrors : postErrors; const shorterErrors = longerErrors === preErrors ? postErrors : preErrors; diff --git a/src/harness/fakesHosts.ts b/src/harness/fakesHosts.ts index 4388b77aa1ca5..31112a4618552 100644 --- a/src/harness/fakesHosts.ts +++ b/src/harness/fakesHosts.ts @@ -371,7 +371,7 @@ export class CompilerHost implements ts.CompilerHost { // and so any options bag will be keyed as "[object Object]", and we'll incorrectly share // SourceFiles parsed with different options. But fixing this doesn't expose any bugs and // doubles the memory usage of a test run, so I'm leaving it for now. - const cacheKey = this.vfs.shadowRoot && `SourceFile[languageVersionOrOptions=${languageVersionOrOptions},setParentNodes=${this._setParentNodes}]`; + const cacheKey = this.vfs.shadowRoot && `SourceFile[languageVersionOrOptions=${languageVersionOrOptions},setParentNodes=${this._setParentNodes},accessPath=${canonicalFileName}]`; if (cacheKey) { const meta = this.vfs.filemeta(canonicalFileName); const sourceFileFromMetadata = meta.get(cacheKey) as ts.SourceFile | undefined; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 7b7506d30f5bb..7fb7013c9c850 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1,3 +1,4 @@ +import * as collections from "./_namespaces/collections"; import * as compiler from "./_namespaces/compiler"; import * as documents from "./_namespaces/documents"; import * as fakes from "./_namespaces/fakes"; @@ -7,6 +8,12 @@ import { TypeWriterWalker, } from "./_namespaces/Harness"; import * as ts from "./_namespaces/ts"; +import { + createGetCanonicalFileName, + mapDefined, + transpileDeclaration, + TranspileDeclarationsOptions, +} from "./_namespaces/ts"; import * as Utils from "./_namespaces/Utils"; import * as vfs from "./_namespaces/vfs"; import * as vpath from "./_namespaces/vpath"; @@ -278,12 +285,14 @@ export namespace Compiler { return fileName; } - interface HarnessOptions { + export interface HarnessOptions { useCaseSensitiveFileNames?: boolean; includeBuiltFile?: string; baselineFile?: string; libFiles?: string; noTypesAndSymbols?: boolean; + forceDtsEmit?: boolean; + skipErrorComparison?: boolean; } // Additional options not already in ts.optionDeclarations @@ -303,6 +312,7 @@ export namespace Compiler { { name: "noTypesAndSymbols", type: "boolean", defaultValueDescription: false }, // Emitted js baseline will print full paths for every output file { name: "fullEmitPaths", type: "boolean", defaultValueDescription: false }, + { name: "forceDtsEmit", type: "boolean", defaultValueDescription: false }, ]; let optionsIndex: Map; @@ -324,7 +334,7 @@ export namespace Compiler { if (value === undefined) { throw new Error(`Cannot have undefined value for compiler option '${name}'.`); } - if (name === "typeScriptVersion") { + if (name === "typeScriptVersion" || name === "isolatedDeclarationDiffReason" || name === "isolatedDeclarationFixedDiffReason") { continue; } const option = getCommandLineOption(name); @@ -370,7 +380,7 @@ export namespace Compiler { fileOptions?: any; } - export function compileFiles( + export function prepareEnvironment( inputFiles: TestFile[], otherFiles: TestFile[], harnessSettings: TestCaseParser.CompilerSettings | undefined, @@ -378,7 +388,7 @@ export namespace Compiler { // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file currentDirectory: string | undefined, symlinks?: vfs.FileSet, - ): compiler.CompilationResult { + ): HarnessCompilerEnvironment { const options: ts.CompilerOptions & HarnessOptions = compilerOptions ? ts.cloneCompilerOptions(compilerOptions) : { noResolve: false }; options.target = ts.getEmitScriptTarget(options); options.newLine = options.newLine || ts.NewLineKind.CarriageReturnLineFeed; @@ -425,8 +435,39 @@ export namespace Compiler { } ts.assign(options, ts.convertToOptionsWithAbsolutePaths(options, path => ts.getNormalizedAbsolutePath(path, currentDirectory))); - const host = new fakes.CompilerHost(fs, options); - const result = compiler.compileFiles(host, programFileNames, options, typeScriptVersion); + + return { + fileSystem: fs, + compilerOptions: options, + programFileNames, + symlinks, + typeScriptVersion, + }; + } + export function compileFiles( + inputFiles: TestFile[], + otherFiles: TestFile[], + harnessSettings: TestCaseParser.CompilerSettings | undefined, + compilerOptions: ts.CompilerOptions | undefined, + // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file + currentDirectory: string | undefined, + symlinks?: vfs.FileSet, + ): compiler.CompilationResult { + const config = prepareEnvironment(inputFiles, otherFiles, harnessSettings, compilerOptions, currentDirectory, symlinks); + return compileFilesWithEnvironment(config); + } + export interface HarnessCompilerEnvironment { + fileSystem: vfs.FileSystem; + compilerOptions: ts.CompilerOptions & HarnessOptions; + programFileNames: string[]; + typeScriptVersion?: string; + symlinks: vfs.FileSet | undefined; + } + export function compileFilesWithEnvironment( + { fileSystem, compilerOptions, programFileNames, symlinks, typeScriptVersion }: HarnessCompilerEnvironment, + ): compiler.CompilationResult { + const host = new fakes.CompilerHost(fileSystem, compilerOptions); + const result = compiler.compileFiles(host, programFileNames, compilerOptions, typeScriptVersion, compilerOptions.forceDtsEmit, compilerOptions.skipErrorComparison); result.symlinks = symlinks; return result; } @@ -514,6 +555,120 @@ export namespace Compiler { } } + export function compileDeclarationFilesWithIsolatedEmitter( + toBeCompiled: TestFile[], + _otherFiles: TestFile[], + tscHost: fakes.CompilerHost, + options: ts.CompilerOptions, + currentDirectory: string, + ) { + if (typeof currentDirectory === "undefined") { + currentDirectory = vfs.srcFolder; + } + + options = ts.cloneCompilerOptions(options); + options.isolatedDeclarations = true; + + const programFileNames = mapDefined(toBeCompiled, file => { + const fileName = ts.getNormalizedAbsolutePath(file.unitName, currentDirectory); + if (!vpath.isTypeScript(fileName) || vpath.isDeclaration(fileName)) { + return; + } + return ts.getNormalizedAbsolutePath(file.unitName, currentDirectory); + }); + + function addFile({ resolvedFileName, originalPath }: { originalPath?: string; resolvedFileName?: string; } = {}) { + if (!resolvedFileName) return; + + if ( + !(!options.jsx && ts.fileExtensionIs(resolvedFileName, ts.Extension.Tsx)) + && vpath.isTypeScript(resolvedFileName) + && !ts.isInsideNodeModules(resolvedFileName) + && !(originalPath && ts.isInsideNodeModules(originalPath)) + ) { + ts.pushIfUnique(programFileNames, resolvedFileName); + } + } + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let i = 0; i < programFileNames.length; i++) { + const fileName = programFileNames[i]; + const source = tscHost.getSourceFile(fileName, options.target ?? ts.ScriptTarget.ES5); + + source?.referencedFiles + ?.forEach(r => { + const localPath = r.fileName; + const resolvedFileName = ts.resolveTripleslashReference(localPath, fileName); + if (!ts.hasExtension(resolvedFileName)) { + ts.forEach( + ts.supportedTSExtensionsFlat, + extension => { + const resolvedFileNameWithExt = resolvedFileName + extension; + if (tscHost.vfs.existsSync(resolvedFileNameWithExt)) { + addFile({ resolvedFileName: resolvedFileNameWithExt }); + return true; + } + }, + ); + } + else { + addFile({ resolvedFileName }); + } + }); + source?.imports + ?.forEach(i => { + const localPath = i.text; + const resolution = ts.resolveModuleName(localPath, fileName, options, tscHost); + addFile(resolution.resolvedModule); + }); + } + + const fs = tscHost.vfs.shadowRoot ? tscHost.vfs.shadowRoot.shadow() : tscHost.vfs; + const dts = new collections.SortedMap({ comparer: fs.stringComparer, sort: "insertion" }); + const dtsMap = new collections.SortedMap({ comparer: fs.stringComparer, sort: "insertion" }); + + const getCanonicalFileName = createGetCanonicalFileName(tscHost.sys.useCaseSensitiveFileNames); + const commonSourceDirectory = ts.getCommonSourceDirectory( + options, + () => programFileNames.filter(f => !vpath.isDeclaration(f)), + currentDirectory, + getCanonicalFileName, + ); + const transpileOptions: TranspileDeclarationsOptions = { + compilerOptions: options, + commonSourceDirectory, + currentDirectory: fs.cwd(), + useCaseSensitiveFileNames: fs.ignoreCase, + }; + const diagnostics: ts.Diagnostic[] = []; + + programFileNames.forEach(fileName => { + if (vpath.isDeclaration(fileName)) { + return; + } + const file = tscHost.getSourceFile(fileName, { + languageVersion: ts.getEmitScriptTarget(options), + }); + if (!file) { + return; + } + const { + diagnostics: fileDiagnostics = [], + declaration, + declarationPath, + declarationMap, + declarationMapPath, + } = transpileDeclaration(file, transpileOptions); + // Ensure file will be rebound. + file.locals = undefined; + dts.set(declarationPath, new documents.TextDocument(declarationPath, options.emitBOM ? Utils.addUTF8ByteOrderMark(declaration) : declaration)); + if (declarationMapPath && declarationMap) { + dtsMap.set(declarationMapPath, new documents.TextDocument(declarationMapPath, declarationMap)); + } + diagnostics.push(...fileDiagnostics); + }); + return { dts, dtsMap, diagnostics }; + } + export function compileDeclarationFiles(context: DeclarationCompilationContext | undefined, symlinks: vfs.FileSet | undefined) { if (!context) { return; @@ -854,7 +1009,7 @@ export namespace Compiler { if (sourceMapCode) sourceMapCode += "\r\n"; sourceMapCode += fileOutput(sourceMap, harnessSettings); if (!options.inlineSourceMap) { - sourceMapCode += createSourceMapPreviewLink(sourceMap.text, result); + sourceMapCode += createSourceMapPreviewLink(sourceMap.text, result.outputs, result.inputs); } }); } @@ -862,12 +1017,12 @@ export namespace Compiler { } } - function createSourceMapPreviewLink(sourcemap: string, result: compiler.CompilationResult) { + function createSourceMapPreviewLink(sourcemap: string, outputs: readonly documents.TextDocument[], inputs: readonly documents.TextDocument[]) { const sourcemapJSON = JSON.parse(sourcemap); - const outputJSFile = result.outputs.find(td => td.file.endsWith(sourcemapJSON.file)); + const outputJSFile = outputs.find(td => td.file.endsWith(sourcemapJSON.file)); if (!outputJSFile) return ""; - const sourceTDs = ts.map(sourcemapJSON.sources, (s: string) => result.inputs.find(td => td.file.endsWith(s))); + const sourceTDs = ts.map(sourcemapJSON.sources, (s: string) => inputs.find(td => td.file.endsWith(s))); const anyUnfoundSources = ts.contains(sourceTDs, /*value*/ undefined); if (anyUnfoundSources) return ""; @@ -875,6 +1030,133 @@ export namespace Compiler { return "\n//// https://sokra.github.io/source-map-visualization" + hash + "\n"; } + export function doDeclarationMapDiffBaseline( + baselinePath: string, + type: string, + header: string, + dteDeclarationFiles: readonly TestFile[], + dteDeclarationMapFiles: readonly TestFile[], + tscDeclarationFiles: readonly TestFile[], + tscDeclarationMapFiles: readonly TestFile[], + tsSources: readonly TestFile[], + reason: string | undefined, + ) { + const Diff = require("diff"); + const dteContent = declarationSourceMapContent(dteDeclarationFiles, dteDeclarationMapFiles, tsSources); + const tscContent = declarationSourceMapContent(tscDeclarationFiles, tscDeclarationMapFiles, tsSources); + + let fullDiff = "// [[Reason: " + reason + "]] ////\r\n\r\n"; + fullDiff += "//// [" + header + "] ////\r\n\r\n"; + fullDiff += Diff.createTwoFilesPatch("TSC", "DTE", tscContent, dteContent, "declarations", "declarations"); + + Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts.map.diff`), fullDiff); + } + + export function doDeclarationDiffBaseline( + baselinePath: string, + type: string, + header: string, + dteDeclarationFiles: readonly TestFile[], + dteDiagnostics: readonly ts.Diagnostic[], + tscDeclarationFiles: readonly TestFile[], + tscDiagnostics: readonly ts.Diagnostic[], + tsSources: readonly TestFile[], + prettyErrors: boolean | undefined, + reason: string | undefined, + ) { + const Diff = require("diff"); + const dteContent = declarationContent(dteDeclarationFiles, tsSources, dteDiagnostics, prettyErrors); + const tscContent = declarationContent(tscDeclarationFiles, tsSources, tscDiagnostics, prettyErrors); + + let fullDiff = "// [[Reason: " + reason + "]] ////\r\n\r\n"; + fullDiff += "//// [" + header + "] ////\r\n\r\n"; + fullDiff += Diff.createTwoFilesPatch("TSC", "DTE", tscContent, dteContent, "declarations", "declarations"); + + Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts.diff`), fullDiff); + } + function sourceContent(tsSources: readonly TestFile[]) { + let code = ""; + for (let i = 0; i < tsSources.length; i++) { + code += "//// [" + ts.getBaseFileName(tsSources[i].unitName) + "]\r\n"; + code += tsSources[i].content + (i < (tsSources.length - 1) ? "\r\n" : ""); + } + return code; + } + function declarationContent(declarationFiles: readonly TestFile[], tsSources: readonly TestFile[], errors: readonly ts.Diagnostic[], prettyErrors?: boolean) { + let dtsCode = ""; + if (declarationFiles.length > 0) { + dtsCode += "\r\n\r\n"; + for (let i = 0; i < declarationFiles.length; i++) { + const declFile = declarationFiles[i]; + dtsCode += "//// [" + declFile.unitName + "]\r\n"; + dtsCode += declFile.content + (i < (declarationFiles.length - 1) ? "\r\n" : ""); + } + } + if (errors.length > 0) { + dtsCode += "\r\n/// [Errors] ////\r\n\r\n"; + dtsCode += getErrorBaseline(tsSources, errors, prettyErrors); + } + return dtsCode; + } + + function declarationSourceMapContent( + declarationFiles: readonly TestFile[], + declarationMapFiles: readonly TestFile[], + tsSources: readonly TestFile[], + ) { + let code = ""; + const outputs = declarationFiles.map(u => new documents.TextDocument(u.unitName, u.content)); + const inputs = tsSources.map(u => new documents.TextDocument(u.unitName, u.content)); + for (const mapFile of declarationMapFiles) { + code += "\r\n//// [" + mapFile.unitName + "]\r\n"; + code += mapFile.content + "\r\n"; + code += createSourceMapPreviewLink(mapFile.content, outputs, inputs) + "\r\n"; + } + return code; + } + export function doDeclarationBaseline( + baselinePath: string, + type: string, + header: string, + declarationFiles: readonly TestFile[], + errors: readonly ts.Diagnostic[], + tsSources: readonly TestFile[], + prettyErrors?: boolean, + ) { + let code = ""; + code += "//// [" + header + "] ////\r\n\r\n"; + + code += sourceContent(tsSources); + + code += "\r\n\r\n/// [Declarations] ////\r\n\r\n"; + code += declarationContent(declarationFiles, tsSources, errors, prettyErrors); + + // eslint-disable-next-line no-null/no-null + Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts`), code.length > 0 ? code : null); + } + + export function doDeclarationMapBaseline( + baselinePath: string, + type: string, + header: string, + declarationFiles: readonly TestFile[], + declarationMapFiles: readonly TestFile[], + tsSources: readonly TestFile[], + ) { + let code = ""; + code += "//// [" + header + "] ////\r\n\r\n"; + + code += sourceContent(tsSources); + + code += "\r\n\r\n/// [Declarations] ////\r\n\r\n"; + code += declarationContent(declarationFiles, tsSources, []); + code += "\r\n\r\n/// [Declarations Maps] ////\r\n\r\n"; + code += declarationSourceMapContent(declarationFiles, declarationMapFiles, tsSources); + + // eslint-disable-next-line no-null/no-null + Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts.map`), code.length > 0 ? code : null); + } + export function doJsEmitBaseline(baselinePath: string, header: string, options: ts.CompilerOptions, result: compiler.CompilationResult, tsConfigFiles: readonly TestFile[], toBeCompiled: readonly TestFile[], otherFiles: readonly TestFile[], harnessSettings: TestCaseParser.CompilerSettings) { if (!options.noEmit && !options.emitDeclarationOnly && result.js.size === 0 && result.diagnostics.length === 0) { throw new Error("Expected at least one js file to be emitted or at least one error to be created."); @@ -884,11 +1166,7 @@ export namespace Compiler { let tsCode = ""; const tsSources = otherFiles.concat(toBeCompiled); tsCode += "//// [" + header + "] ////\r\n\r\n"; - - for (let i = 0; i < tsSources.length; i++) { - tsCode += "//// [" + ts.getBaseFileName(tsSources[i].unitName) + "]\r\n"; - tsCode += tsSources[i].content + (i < (tsSources.length - 1) ? "\r\n" : ""); - } + tsCode += sourceContent(tsSources); let jsCode = ""; result.js.forEach(file => { @@ -1181,6 +1459,7 @@ export namespace TestCaseParser { tsConfig: ts.ParsedCommandLine | undefined; tsConfigFileUnitData: TestUnitData | undefined; symlinks?: vfs.FileSet; + sourceCode: string; } /** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ @@ -1311,7 +1590,7 @@ export namespace TestCaseParser { break; } } - return { settings, testUnitData, tsConfig, tsConfigFileUnitData, symlinks }; + return { settings, testUnitData, tsConfig, tsConfigFileUnitData, symlinks, sourceCode: code }; } } diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts new file mode 100644 index 0000000000000..2805458947294 --- /dev/null +++ b/src/harness/isolatedDeclarationFixer.ts @@ -0,0 +1,311 @@ +import * as fake from "./_namespaces/fakes"; +import * as ts from "./_namespaces/ts"; +import * as vfs from "./_namespaces/vfs"; + +export const isolatedDeclarationsErrors = new Set([ + ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_which_are_not_supported_with_isolatedDeclarations, + ts.Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, + ts.Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations, + ts.Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations, + ts.Diagnostics.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations, + ts.Diagnostics.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations, + ts.Diagnostics.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations, + ts.Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations, +].map(d => d.code)); + +export function fixTestFiles( + fs: vfs.FileSystem, + programFileNames: string[], + options: ts.CompilerOptions, +) { + const host = new fake.CompilerHost(fs, options); + + const snapShotRegistry = createSnapshotRegistry(host); + const langHost = createLanguageHost(snapShotRegistry, { + fileNames: programFileNames, + options, + errors: [], + }, host); + + return fixProjectInternal( + langHost, + ts.createDocumentRegistryInternal( + host.useCaseSensitiveFileNames(), + host.getCurrentDirectory(), + /*jsDocParsingMode*/ undefined, + { + getDocument(_key, path) { + const sourceFile = host.getSourceFile(path, { languageVersion: ts.getEmitScriptTarget(options) }); + if (sourceFile) { + const version = snapShotRegistry.getScriptVersion(path); + sourceFile.version = version.toString(); + sourceFile.impliedNodeFormat = ts.getImpliedNodeFormatForFile( + path, + langHost.getCompilerHost?.()?.getModuleResolutionCache?.()?.getPackageJsonInfoCache(), + host, + options, + ); + } + return sourceFile; + }, + setDocument() { + }, + }, + ), + snapShotRegistry, + isolatedDeclarationsErrors, + { includeRelativeTypeFixes: false, includeInlineTypeFixes: false }, + ); +} + +export function fixProjectInternal( + host: ts.LanguageServiceHost, + documentRegistry: ts.DocumentRegistry | undefined, + snapShotRegistry: VersionedFileRegistry, + fixableErrors: Set, + userPreferences: ts.UserPreferences, +) { + documentRegistry = documentRegistry ?? ts.createDocumentRegistry( + host.useCaseSensitiveFileNames?.(), + host.getCurrentDirectory(), + ); + const service = ts.createLanguageService(host, documentRegistry); + try { + const program = service.getProgram()!; + const files = program.getSourceFiles(); + if (files.some(f => f.parseDiagnostics.length !== 0)) { + return { success: false } as const; + } + const defaultFormatOptions = ts.getDefaultFormatCodeSettings(); + + for (const file of files) { + if (file.fileName.endsWith(".d.ts")) continue; + + let diagnostics = getIsolatedDeclarationsErrors(file.fileName); + + if (diagnostics.length === 0) continue; + + const fixAll = service.getCombinedCodeFix({ type: "file", fileName: file.fileName }, "fixMissingTypeAnnotationOnExports", defaultFormatOptions, userPreferences); + applyFix(fixAll.changes); + + // Some fixes need to be applied individually such as fixing `export =` + diagnostics = getIsolatedDeclarationsErrors(file.fileName); + let lastFixedDiagnostic: ts.Diagnostic | undefined; + let stuckCount = 0; + let skipCount = 0; + while (diagnostics.length > skipCount) { + const diag = diagnostics[diagnostics.length - 1 - skipCount]; + // Ensure we break out of a unfixable loop + if (lastFixedDiagnostic?.start === diag.start) { + stuckCount++; + } + else { + stuckCount = 0; + } + if (stuckCount === 3) { + return { success: false } as const; + } + const fixes = service.getCodeFixesAtPosition(file.fileName, diag.start, diag.start + diag.length, [diag.code], defaultFormatOptions, userPreferences); + // Un-fixable error + if (fixes.length === 0) { + skipCount++; + continue; + } + const fix = fixes[0]; + + if (fix.changes.length === 0) break; + lastFixedDiagnostic = diag; + diagnostics = getIsolatedDeclarationsErrors(file.fileName); + } + } + return { success: true, unfixedDiagnostics: getIsolatedDeclarationsErrors() } as const; + } + finally { + service.dispose(); + } + function applyFix(changes: readonly ts.FileTextChanges[]) { + for (const fileChanges of changes) { + const snapshot = snapShotRegistry.getSnapshot(fileChanges.fileName)!; + const newSnapShot = applyChangesSnapShot(snapshot, fileChanges.textChanges); + snapShotRegistry.setSnapshot(fileChanges.fileName, newSnapShot); + } + } + function getIsolatedDeclarationsErrors(fileName?: string) { + const program = service.getProgram(); + if (!program) return []; + const sourceFile = fileName === undefined ? undefined : program.getSourceFile(fileName); + return program.getDeclarationDiagnostics(sourceFile).filter(d => fixableErrors.has(d.code)) ?? []; + } +} + +export function createLanguageHost( + snapShotRegistry: VersionedFileRegistry, + cmdLine: ts.ParsedCommandLine, + compilerHost: ts.CompilerHost, +) { + function readFile(path: string) { + const snapShot = snapShotRegistry.getSnapshot(path); + if (snapShot) { + return snapShot.getText(0, snapShot.getLength()); + } + return undefined; + } + + // Create a new TypeScript language service + const langHost: ts.LanguageServiceHost = { + useCaseSensitiveFileNames: () => true, + getCompilationSettings: () => cmdLine.options, + fileExists: path => compilerHost.fileExists(path), + readFile, + getScriptFileNames: () => cmdLine.fileNames, + getScriptVersion: path => { + return snapShotRegistry.getScriptVersion(path).toString(); + }, + getScriptSnapshot: snapShotRegistry.getSnapshot, + readDirectory: (path, extensions, excludes, includes, depth) => compilerHost.readDirectory!(path, extensions ?? [], excludes, includes ?? [], depth), + getCurrentDirectory: () => compilerHost.getCurrentDirectory(), + getDefaultLibFileName: options => compilerHost.getDefaultLibFileName(options), + getProjectReferences: () => cmdLine.projectReferences, + writeFile(fileName, content) { + compilerHost.writeFile(fileName, content, !!cmdLine.options.emitBOM); + }, + directoryExists(directoryName) { + return compilerHost.directoryExists!(directoryName); + }, + getDirectories(directoryName) { + return compilerHost.getDirectories!(directoryName); + }, + }; + return langHost; +} + +export interface VersionedFileRegistry { + getSnapshot(file: string): VersionedScriptSnapshot | undefined; + setSnapshot(file: string, value: VersionedScriptSnapshot): void; + getScriptVersion(path: string): number; + updateFromDisk(file: string): VersionedScriptSnapshot | undefined; +} + +export interface VersionedScriptSnapshot extends ts.IScriptSnapshot { + version: number; +} + +export function createSnapshotRegistry(sys: Pick): VersionedFileRegistry { + const changedFiles = new Map(); + + function getScriptVersion(filePath: string) { + return (changedFiles.get(filePath)?.version ?? 0); + } + function updateFromDisk(filePath: string): VersionedScriptSnapshot | undefined { + return getSnapshot(filePath, /*forceRead*/ true); + } + function getSnapshot(filePath: string, forceRead = false): VersionedScriptSnapshot | undefined { + let snapShot = changedFiles.get(filePath); + if (snapShot && !forceRead) { + return snapShot; + } + const text = sys.readFile(filePath); + if (text === undefined) return undefined; + if (snapShot && text === snapShot.getText(0, snapShot.getLength())) { + return snapShot; + } + snapShot = Object.assign(ts.ScriptSnapshot.fromString(text), { + version: (snapShot?.version ?? 0) + 1, + }); + changedFiles.set(filePath, snapShot); + return snapShot; + } + function setSnapshot(path: string, newVersion: VersionedScriptSnapshot) { + const existing = changedFiles.get(path); + // No change + const newVersionText = newVersion.getText(0, newVersion.getLength()); + const existingVersionText = existing && existing.getText(0, existing.getLength()); + if (existingVersionText === newVersionText) { + return; + } + changedFiles.set(path, newVersion); + sys.writeFile(path, newVersionText); + } + + return { + getScriptVersion, + getSnapshot, + setSnapshot, + updateFromDisk, + }; +} + +export function textSpanEnd(span: ts.TextSpan) { + return span.start + span.length; +} + +export function applyChangesSnapShot(snapshot: VersionedScriptSnapshot, changes: readonly ts.TextChange[]): VersionedScriptSnapshot { + let text = snapshot.getText(0, snapshot.getLength()); + let changeStart = text.length; + let changeEnd = 0; + const original = text; + for (let i = changes.length - 1; i >= 0; i--) { + const { span, newText } = changes[i]; + const spanEnd = textSpanEnd(span); + text = `${text.substring(0, span.start)}${newText}${text.substring(spanEnd)}`; + changeStart = Math.min(changeStart, span.start); + changeEnd = Math.max(changeEnd, spanEnd); + } + + const originalLength = changeEnd - changeStart; + const newLength = originalLength + (text.length - original.length); + + return createChangeSnapshot( + snapshot, + text, + { start: changeStart, length: originalLength }, + newLength, + ); +} + +export function revertChangeSnapShot(originalSnapShot: VersionedScriptSnapshot, changedSnapShot: VersionedScriptSnapshot): VersionedScriptSnapshot { + const change = changedSnapShot.getChangeRange(originalSnapShot); + const originalText = originalSnapShot.getText(0, originalSnapShot.getLength()); + if (!change) { + return createVersionedSnapshot(changedSnapShot, originalText); + } + return createChangeSnapshot(changedSnapShot, originalText, { start: change.span.start, length: change.newLength }, change.span.length); +} + +export function createVersionedSnapshot(baseSnapshot: VersionedScriptSnapshot, text: string): VersionedScriptSnapshot { + return { + version: baseSnapshot.version + 1, + ...ts.ScriptSnapshot.fromString(text), + }; +} +export function createChangeSnapshot(baseSnapshot: VersionedScriptSnapshot, text: string, span: ts.TextSpan, newLength: number): VersionedScriptSnapshot { + return { + version: baseSnapshot.version + 1, + getChangeRange(snapshot) { + if (snapshot !== baseSnapshot) return undefined; + return { span, newLength }; + }, + getText(start, end) { + if (start === 0 && end === text.length) { + return text; + } + return text.substring(start, end); + }, + dispose() { + }, + getLength() { + return text.length; + }, + }; +} diff --git a/src/services/_namespaces/ts.codefix.ts b/src/services/_namespaces/ts.codefix.ts index 3bf0c18cb9e5a..3d7eec453f32e 100644 --- a/src/services/_namespaces/ts.codefix.ts +++ b/src/services/_namespaces/ts.codefix.ts @@ -49,6 +49,7 @@ export * from "../codefixes/fixUnreachableCode"; export * from "../codefixes/fixUnusedLabel"; export * from "../codefixes/fixJSDocTypes"; export * from "../codefixes/fixMissingCallParentheses"; +export * from "../codefixes/fixMissingTypeAnnotationOnExports"; export * from "../codefixes/fixAwaitInSyncFunction"; export * from "../codefixes/fixPropertyOverrideAccessor"; export * from "../codefixes/inferFromUsage"; diff --git a/src/services/codeFixProvider.ts b/src/services/codeFixProvider.ts index 7ca63871fb2de..9691542a55ab0 100644 --- a/src/services/codeFixProvider.ts +++ b/src/services/codeFixProvider.ts @@ -127,6 +127,7 @@ function getDiagnostics({ program, sourceFile, cancellationToken }: CodeFixConte return [ ...program.getSemanticDiagnostics(sourceFile, cancellationToken), ...program.getSyntacticDiagnostics(sourceFile, cancellationToken), + ...program.getDeclarationDiagnostics(sourceFile, cancellationToken), ...computeSuggestionDiagnostics(sourceFile, program, cancellationToken), ]; } diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts new file mode 100644 index 0000000000000..715079cf32e39 --- /dev/null +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -0,0 +1,1092 @@ +import { + ArrayBindingPattern, + ArrayLiteralExpression, + AssertionExpression, + BinaryExpression, + BindingElement, + BindingPattern, + ClassDeclaration, + CodeFixAction, + CodeFixAllContext, + CodeFixContext, + createPrinter, + Debug, + Declaration, + defaultMaximumTruncationLength, + DiagnosticAndArguments, + DiagnosticOrDiagnosticAndArguments, + Diagnostics, + ElementAccessExpression, + EmitFlags, + EmitHint, + EntityName, + EntityNameExpression, + ExportAssignment, + Expression, + factory, + FileTextChanges, + findAncestor, + GeneratedIdentifierFlags, + getEmitScriptTarget, + getSourceFileOfNode, + getSynthesizedDeepClone, + getTokenAtPosition, + getTrailingCommentRanges, + hasSyntacticModifier, + Identifier, + isArrayBindingPattern, + isArrayLiteralExpression, + isAssertionExpression, + isBinaryExpression, + isBindingPattern, + isCallExpression, + isComputedPropertyName, + isConditionalExpression, + isConstTypeReference, + isDeclaration, + isEntityNameExpression, + isEnumMember, + isExpandoPropertyDeclaration, + isExpression, + isFunctionExpressionOrArrowFunction, + isHeritageClause, + isIdentifier, + isIdentifierText, + isNumericLiteral, + isObjectBindingPattern, + isObjectLiteralExpression, + isOmittedExpression, + isParameter, + isPrefixUnaryExpression, + isPropertyAccessExpression, + isPropertyAssignment, + isPropertyDeclaration, + isShorthandPropertyAssignment, + isSpreadAssignment, + isSpreadElement, + isStatement, + isStringLiteral, + isValueSignatureDeclaration, + isVariableDeclaration, + ModifierFlags, + Node, + NodeArray, + NodeBuilderFlags, + NodeFlags, + ObjectBindingPattern, + ObjectLiteralExpression, + ParameterDeclaration, + PropertyAccessExpression, + PropertyDeclaration, + PropertyName, + setEmitFlags, + SignatureDeclaration, + some, + SourceFile, + SpreadAssignment, + SpreadElement, + SyntaxKind, + textChanges, + TextSpan, + Type, + TypeChecker, + TypeFlags, + TypeNode, + VariableDeclaration, + VariableStatement, + walkUpParenthesizedExpressions, +} from "../_namespaces/ts"; +import { + createCodeFixAction, + createCombinedCodeActions, + createImportAdder, + eachDiagnostic, + registerCodeFix, + typeToAutoImportableTypeNode, +} from "../_namespaces/ts.codefix"; + +const fixId = "fixMissingTypeAnnotationOnExports"; +const addAnnotationFix = "add-annotation"; +const addInlineTypeAssertion = "add-type-assertion"; +const extractExpression = "extract-expression"; +const errorCodes = [ + Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + Diagnostics.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations, + Diagnostics.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations, + Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations, + Diagnostics.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations, + Diagnostics.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations, + Diagnostics.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations, + Diagnostics.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations, + Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations, + Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations, + Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations, + Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, +].map(d => d.code); + +const canHaveExplicitTypeAnnotation = new Set([ + SyntaxKind.GetAccessor, + SyntaxKind.MethodDeclaration, + SyntaxKind.PropertyDeclaration, + SyntaxKind.FunctionDeclaration, + SyntaxKind.FunctionExpression, + SyntaxKind.ArrowFunction, + SyntaxKind.VariableDeclaration, + SyntaxKind.Parameter, + SyntaxKind.ExportAssignment, + SyntaxKind.ClassDeclaration, + SyntaxKind.ObjectBindingPattern, + SyntaxKind.ArrayBindingPattern, +]); + +const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals + | NodeBuilderFlags.WriteClassExpressionAsTypeLiteral + | NodeBuilderFlags.UseTypeOfFunction + | NodeBuilderFlags.UseStructuralFallback + | NodeBuilderFlags.AllowEmptyTuple + | NodeBuilderFlags.GenerateNamesForShadowedTypeParams + | NodeBuilderFlags.NoTruncation + | NodeBuilderFlags.WriteComputedProps; + +registerCodeFix({ + errorCodes, + fixIds: [fixId], + getCodeActions(context) { + const fixes: CodeFixAction[] = []; + const { includeRelativeTypeFixes, includeInlineTypeFixes } = context.preferences; + + addCodeAction(addAnnotationFix, fixes, context, "full", f => f.addFullAnnotation(context.span)); + + if (includeRelativeTypeFixes !== false) { + addCodeAction(addAnnotationFix, fixes, context, "relative", f => f.addFullAnnotation(context.span)); + } + if (includeInlineTypeFixes !== false) { + addCodeAction(addInlineTypeAssertion, fixes, context, "full", f => f.addInlineAnnotation(context.span)); + } + if (includeInlineTypeFixes !== false && includeRelativeTypeFixes !== false) { + addCodeAction(addInlineTypeAssertion, fixes, context, "relative", f => f.addInlineAnnotation(context.span)); + } + addCodeAction(extractExpression, fixes, context, "full", f => f.extractAsVariable(context.span)); + return fixes; + }, + getAllCodeActions: context => { + const changes = withChanges(context, "full", f => { + eachDiagnostic(context, errorCodes, diag => { + f.addFullAnnotation(diag); + }); + }); + return createCombinedCodeActions(changes.textChanges); + }, +}); +interface Fixer { + addFullAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined; + addInlineAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined; + extractAsVariable(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined; +} + +function addCodeAction( + fixName: string, + fixes: CodeFixAction[], + context: CodeFixContext | CodeFixAllContext, + typePrinter: "relative" | "full", + cb: (fixer: Fixer) => DiagnosticOrDiagnosticAndArguments | undefined, +) { + const changes = withChanges(context, typePrinter, cb); + if (changes.result && changes.textChanges.length) { + const newFix = createCodeFixAction( + fixName, + changes.textChanges, + changes.result, + fixId, + Diagnostics.Add_all_missing_type_annotations, + ); + if (!fixes.find(f => f.description === newFix.description)) fixes.push(newFix); + } +} +function withChanges( + context: CodeFixContext | CodeFixAllContext, + typePrinter: "relative" | "full", + cb: (fixer: Fixer) => T, +): { + textChanges: FileTextChanges[]; + result: T; +} { + const emptyInferenceResult: InferenceResult = { typeNode: undefined, mutatedTarget: false }; + const changeTracker = textChanges.ChangeTracker.fromContext(context); + const sourceFile: SourceFile = context.sourceFile; + const program = context.program; + const typeChecker: TypeChecker = program.getTypeChecker(); + const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); + const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); + const fixedNodes = new Set(); + + const result = cb({ addFullAnnotation, addInlineAnnotation, extractAsVariable }); + importAdder.writeFixes(changeTracker); + return { + result, + textChanges: changeTracker.getChanges(), + }; + + function addFullAnnotation(span: TextSpan) { + const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); + const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag) ?? findExpandoFunction(nodeWithDiag); + if (nodeWithNoType) { + return fixupForIsolatedDeclarations(nodeWithNoType); + } + return undefined; + } + + function needsParenthesizedExpressionForAssertion(node: Expression) { + return !isEntityNameExpression(node) && !isCallExpression(node) && !isObjectLiteralExpression(node) && !isArrayLiteralExpression(node); + } + function createAsExpression(node: Expression, type: TypeNode) { + if (needsParenthesizedExpressionForAssertion(node)) { + node = factory.createParenthesizedExpression(node); + } + return factory.createAsExpression( + node, + type, + ); + } + + function addInlineAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined { + const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); + const expandoFunction = findExpandoFunction(nodeWithDiag); + // No inline assertions for expando members + if (expandoFunction) return; + const targetNode = findTargetErrorNode(nodeWithDiag, span); + if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return; + const isExpressionTarget = isExpression(targetNode); + const isShorthandPropertyAssignmentTarget = isShorthandPropertyAssignment(targetNode); + + if (!isShorthandPropertyAssignmentTarget && isDeclaration(targetNode)) { + return undefined; + } + // No inline assertions on binding patterns + if (findAncestor(targetNode, isBindingPattern)) { + return undefined; + } + + // No inline assertions on enum members + if (findAncestor(targetNode, isEnumMember)) { + return undefined; + } + // No support for typeof in extends clauses + if (isExpressionTarget && findAncestor(targetNode, isHeritageClause)) { + return undefined; + } + // Can't inline type spread elements. Whatever you do isolated declarations will not infer from them + if (isSpreadElement(targetNode)) { + return undefined; + } + + const variableDeclaration = findAncestor(targetNode, isVariableDeclaration); + const type = variableDeclaration && typeChecker.getTypeAtLocation(variableDeclaration); + // We can't use typeof un an unique symbol. Would result in either + // const s = Symbol("") as unique symbol + // const s = Symbol("") as typeof s + // both of which are not cirrect + if (type && type.flags & TypeFlags.UniqueESSymbol) { + return undefined; + } + + if (!(isExpressionTarget || isShorthandPropertyAssignmentTarget)) return undefined; + + const { typeNode, mutatedTarget } = inferNodeType(targetNode); + if (!typeNode || mutatedTarget) return undefined; + + if (isShorthandPropertyAssignmentTarget) { + changeTracker.insertNodeAt( + sourceFile, + targetNode.end, + createAsExpression( + getSynthesizedDeepClone(targetNode.name), + typeNode, + ), + { + prefix: ": ", + }, + ); + } + else if (isExpressionTarget) { + if (needsParenthesizedExpressionForAssertion(targetNode)) { + changeTracker.replaceNode( + sourceFile, + targetNode, + createAsExpression( + getSynthesizedDeepClone(targetNode), + typeNode, + ), + ); + } + else { + changeTracker.insertNodeAt( + sourceFile, + targetNode.end, + getSynthesizedDeepClone(typeNode), + { + prefix: " as ", + }, + ); + } + } + else { + Debug.assertNever(targetNode); + } + return [Diagnostics.Add_inline_type_assertion_to_0, printTypeNode(typeNode)]; + } + + function suggestVariableName(node: Node) { + const nameParts: string[] = []; + while (!(isVariableDeclaration(node) || isPropertyDeclaration(node) || isStatement(node))) { + if (isPropertyAssignment(node)) { + const propName = node.name; + addPropertyName(propName); + } + node = node.parent; + } + if ((isVariableDeclaration(node) || isPropertyDeclaration(node)) && !isBindingPattern(node.name)) { + addPropertyName(node.name); + } + return nameParts.filter(s => isIdentifierText(s, program.getCompilerOptions().target)).reverse().join("_"); + + function addPropertyName(name: PropertyName) { + if (isIdentifier(name)) { + nameParts.push(name.text); + } + if (isStringLiteral(name)) { + nameParts.push(name.text); + } + if (isNumericLiteral(name)) { + nameParts.push(name.text); + } + if (isComputedPropertyName(name)) { + let computedName = name.expression; + + if (isStringLiteral(computedName)) { + nameParts.push(computedName.text); + } + if (isNumericLiteral(computedName)) { + nameParts.push(computedName.text); + } + if ( + isPrefixUnaryExpression(computedName) + && isNumericLiteral(computedName.operand) + ) { + if (computedName.operator === SyntaxKind.MinusToken) { + nameParts.push("M" + computedName.operand.text); + } + else if (computedName.operator === SyntaxKind.PlusToken) { + nameParts.push("M" + computedName.operand.text); + } + } + + // We only support dotted identifiers as property keys + while (true) { + if (isIdentifier(computedName)) { + nameParts.push(computedName.text); + break; + } + else if (isPropertyAccessExpression(computedName)) { + nameParts.push(computedName.name.text); + computedName = computedName.expression; + } + } + } + } + } + + function extractAsVariable(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined { + const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); + const targetNode = findTargetErrorNode(nodeWithDiag, span) as Expression; + if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return; + + const isExpressionTarget = isExpression(targetNode); + + // Only extract expressions + if (!isExpressionTarget) return; + + // Before any extracting array literals must be const + if (isArrayLiteralExpression(targetNode)) { + changeTracker.replaceNode( + sourceFile, + targetNode, + createAsExpression(targetNode, factory.createTypeReferenceNode("const")), + ); + return [Diagnostics.Mark_array_literal_as_const]; + } + + const parentPropertyAssignment = findAncestor(targetNode, isPropertyAssignment); + if (parentPropertyAssignment) { + // identifiers or entity names can already just be typeof-ed + if (parentPropertyAssignment === targetNode.parent && isEntityNameExpression(targetNode)) return; + + const tempName = factory.createUniqueName( + suggestVariableName(targetNode), + GeneratedIdentifierFlags.Optimistic, + ); + let replacementTarget = targetNode; + let initializationNode = targetNode; + if (isSpreadElement(replacementTarget)) { + replacementTarget = walkUpParenthesizedExpressions(replacementTarget.parent) as Expression; + if (isConstAssertion(replacementTarget.parent)) { + initializationNode = replacementTarget = replacementTarget.parent; + } + else { + initializationNode = createAsExpression( + replacementTarget, + factory.createTypeReferenceNode("const"), + ); + } + } + + if (isEntityNameExpression(replacementTarget)) return undefined; + + const variableDefinition = factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + tempName, + /*exclamationToken*/ undefined, + /*type*/ undefined, + initializationNode, + ), + ], NodeFlags.Const), + ); + + const statement = findAncestor(targetNode, isStatement); + changeTracker.insertNodeBefore(sourceFile, statement!, variableDefinition); + + changeTracker.replaceNode( + sourceFile, + replacementTarget, + factory.createAsExpression( + factory.cloneNode(tempName), + factory.createTypeQueryNode( + factory.cloneNode(tempName), + ), + ), + ); + return [Diagnostics.Extract_to_variable_and_replace_with_0_typeof_0, printTypeNode(tempName)]; + } + } + + function findTargetErrorNode(node: Node, span: TextSpan) { + while ( + node && + node.end < span.start + span.length + ) { + node = node.parent; + } + while (node.parent.pos === node.pos && node.parent.end === node.end) { + node = node.parent; + } + return node; + } + // Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation. + // If this is coming from an ill-formed AST with syntax errors, you cannot assume that it'll find a node + // to annotate types, this will return undefined - meaning that it couldn't find the node to annotate types. + function findNearestParentWithTypeAnnotation(node: Node): Node | undefined { + return findAncestor(node, n => + canHaveExplicitTypeAnnotation.has(n.kind) + && ((!isObjectBindingPattern(n) && !isArrayBindingPattern(n)) || isVariableDeclaration(n.parent))); + } + + function findExpandoFunction(node: Node) { + // Expando property + const expandoDeclaration = findAncestor(node, n => isStatement(n) ? "quit" : isExpandoPropertyDeclaration(n as Declaration)) as PropertyAccessExpression | ElementAccessExpression | BinaryExpression; + + if (expandoDeclaration && isExpandoPropertyDeclaration(expandoDeclaration)) { + let assignmentTarget = expandoDeclaration; + + // Some late bound expando members use thw whole expression as the declaration. + if (isBinaryExpression(assignmentTarget)) { + assignmentTarget = assignmentTarget.left as PropertyAccessExpression | ElementAccessExpression; + if (!isExpandoPropertyDeclaration(assignmentTarget)) return undefined; + } + const targetType = typeChecker.getTypeAtLocation(assignmentTarget.expression); + if (!targetType) return; + + const properties = typeChecker.getPropertiesOfType(targetType); + if (some(properties, p => p.valueDeclaration === expandoDeclaration || p.valueDeclaration === expandoDeclaration.parent)) { + const fn = targetType.symbol.valueDeclaration; + if (fn && isFunctionExpressionOrArrowFunction(fn) && isVariableDeclaration(fn.parent)) { + return fn.parent; + } + } + } + return undefined; + } + + /** + * Fixes up to support IsolatedDeclaration by either adding types when possible, or splitting statements and add type annotations + * for the places that cannot have type annotations (e.g. HeritageClause, default exports, ...) + */ + function fixupForIsolatedDeclarations(node: Node): DiagnosticOrDiagnosticAndArguments | undefined { + if (fixedNodes?.has(node)) return undefined; + fixedNodes?.add(node); + switch (node.kind) { + case SyntaxKind.Parameter: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.VariableDeclaration: + const decl = node as ParameterDeclaration | PropertyDeclaration | VariableDeclaration; + return addTypeAnnotation(decl); + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.GetAccessor: + return addTypeToFunctionLikeDeclaration(node as SignatureDeclaration, sourceFile); + case SyntaxKind.ExportAssignment: + const defaultExport = node as ExportAssignment; + if (!defaultExport.isExportEquals) { + const { typeNode } = inferNodeType(defaultExport.expression); + if (!typeNode) return undefined; + changeTracker.replaceNodeWithNodes(sourceFile, node, [ + factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + "__default", + /*exclamationToken*/ undefined, + typeNode, + defaultExport.expression, + )], + NodeFlags.Const, + ), + ), + factory.updateExportAssignment(defaultExport, defaultExport?.modifiers, factory.createIdentifier("__default")), + ]); + return [ + Diagnostics.Extract_default_export_to_variable, + ]; + } + break; + // Handling expression like heritage clauses e.g. class A extends mixin(B) .. + case SyntaxKind.ClassDeclaration: + return handleClassDeclaration(node as ClassDeclaration); + case SyntaxKind.ObjectBindingPattern: + case SyntaxKind.ArrayBindingPattern: + return transformDestructuringPatterns(node as BindingPattern); + default: + throw new Error(`Cannot find a fix for the given node ${node.kind}`); + } + } + + function addTypeToFunctionLikeDeclaration(func: SignatureDeclaration, sourceFile: SourceFile): undefined | DiagnosticOrDiagnosticAndArguments { + if (func.type) { + return; + } + const { typeNode } = inferNodeType(func); + addTypesToParametersArray(func.parameters); + if (typeNode) { + changeTracker.tryInsertTypeAnnotation( + sourceFile, + func, + typeNode, + ); + return [Diagnostics.Add_return_type_0, printTypeNode(typeNode)]; + } + } + + function handleClassDeclaration(classDecl: ClassDeclaration): DiagnosticAndArguments | undefined { + const extendsHeritage = classDecl.heritageClauses?.find(p => p.token === SyntaxKind.ExtendsKeyword); + const heritageExpression = extendsHeritage?.types[0]; + if (!heritageExpression) { + return undefined; + } + const { typeNode: heritageTypeNode } = inferNodeType(heritageExpression.expression); + if (!heritageTypeNode) { + return undefined; + } + + const heritageVariableName = factory.createUniqueName( + classDecl.name ? classDecl.name.text + "Base" : "Anonymous", + GeneratedIdentifierFlags.Optimistic, + ); + // e.g. const Point3DBase: typeof Point2D = mixin(Point2D); + const heritageVariable = factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + heritageVariableName, + /*exclamationToken*/ undefined, + heritageTypeNode, + heritageExpression.expression, + )], + NodeFlags.Const, + ), + ); + // const touchingToken = getTouchingToken(heritageExpression); + changeTracker.insertNodeBefore(sourceFile, classDecl, heritageVariable); + const trailingComments = getTrailingCommentRanges(sourceFile.text, heritageExpression.end); + const realEnd = trailingComments?.[trailingComments.length - 1]?.end ?? heritageExpression.end; + changeTracker.replaceRange( + sourceFile, + { + pos: heritageExpression.getFullStart(), + end: realEnd, + }, + heritageVariableName, + { + prefix: " ", + }, + ); + return [Diagnostics.Extract_base_class_to_variable]; + } + + interface ExpressionReverseChain { + element?: BindingElement; + parent?: ExpressionReverseChain; + expression: SubExpression; + } + + const enum ExpressionType { + TEXT = 0, + COMPUTED = 1, + ARRAY_ACCESS = 2, + IDENTIFIER = 3, + } + + type SubExpression = + | { kind: ExpressionType.TEXT; text: string; } + | { kind: ExpressionType.COMPUTED; computed: Expression; } + | { kind: ExpressionType.ARRAY_ACCESS; arrayIndex: number; } + | { kind: ExpressionType.IDENTIFIER; identifier: Identifier; }; + + function transformDestructuringPatterns(bindingPattern: BindingPattern): DiagnosticOrDiagnosticAndArguments | undefined { + const enclosingVariableDeclaration = bindingPattern.parent as VariableDeclaration; + const enclosingVarStmt = bindingPattern.parent.parent.parent as VariableStatement; + if (!enclosingVariableDeclaration.initializer) return undefined; + + let baseExpr: ExpressionReverseChain; + const newNodes: Node[] = []; + if (!isIdentifier(enclosingVariableDeclaration.initializer)) { + // For complex expressions we want to create a temporary variable + const tempHolderForReturn = factory.createUniqueName("dest", GeneratedIdentifierFlags.Optimistic); + baseExpr = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; + newNodes.push(factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + tempHolderForReturn, + /*exclamationToken*/ undefined, + /*type*/ undefined, + enclosingVariableDeclaration.initializer, + )], + NodeFlags.Const, + ), + )); + } + else { + // If we are destructuring an identifier, just use that. No need for temp var. + baseExpr = { expression: { kind: ExpressionType.IDENTIFIER, identifier: enclosingVariableDeclaration.initializer } }; + } + + const bindingElements: ExpressionReverseChain[] = []; + if (isArrayBindingPattern(bindingPattern)) { + addArrayBindingPatterns(bindingPattern, bindingElements, baseExpr); + } + else { + addObjectBindingPatterns(bindingPattern, bindingElements, baseExpr); + } + + const expressionToVar = new Map(); + + for (const bindingElement of bindingElements) { + if (bindingElement.element!.propertyName && isComputedPropertyName(bindingElement.element!.propertyName)) { + const computedExpression = bindingElement.element!.propertyName.expression; + const identifierForComputedProperty = factory.getGeneratedNameForNode(computedExpression); + const variableDecl = factory.createVariableDeclaration( + identifierForComputedProperty, + /*exclamationToken*/ undefined, + /*type*/ undefined, + computedExpression, + ); + const variableList = factory.createVariableDeclarationList([variableDecl], NodeFlags.Const); + const variableStatement = factory.createVariableStatement(/*modifiers*/ undefined, variableList); + newNodes.push(variableStatement); + expressionToVar.set(computedExpression, identifierForComputedProperty); + } + + // Name is the RHS of : in case colon exists, otherwise it's just the name of the destructuring + const name = bindingElement.element!.name; + // isBindingPattern + if (isArrayBindingPattern(name)) { + addArrayBindingPatterns(name, bindingElements, bindingElement); + } + else if (isObjectBindingPattern(name)) { + addObjectBindingPatterns(name, bindingElements, bindingElement); + } + else { + const { typeNode } = inferNodeType(name); + let variableInitializer = createChainedExpression(bindingElement, expressionToVar); + if (bindingElement.element!.initializer) { + const propertyName = bindingElement.element?.propertyName; + const tempName = factory.createUniqueName( + propertyName && isIdentifier(propertyName) ? propertyName.text : "temp", + GeneratedIdentifierFlags.Optimistic, + ); + newNodes.push(factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + tempName, + /*exclamationToken*/ undefined, + /*type*/ undefined, + variableInitializer, + )], + NodeFlags.Const, + ), + )); + variableInitializer = factory.createConditionalExpression( + factory.createBinaryExpression( + tempName, + factory.createToken(SyntaxKind.EqualsEqualsEqualsToken), + factory.createIdentifier("undefined"), + ), + factory.createToken(SyntaxKind.QuestionToken), + bindingElement.element!.initializer, + factory.createToken(SyntaxKind.ColonToken), + variableInitializer, + ); + } + const exportModifier = hasSyntacticModifier(enclosingVarStmt, ModifierFlags.Export) ? + [factory.createToken(SyntaxKind.ExportKeyword)] : + undefined; + newNodes.push(factory.createVariableStatement( + exportModifier, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + name, + /*exclamationToken*/ undefined, + typeNode, + variableInitializer, + )], + NodeFlags.Const, + ), + )); + } + } + + if (enclosingVarStmt.declarationList.declarations.length > 1) { + newNodes.push(factory.updateVariableStatement( + enclosingVarStmt, + enclosingVarStmt.modifiers, + factory.updateVariableDeclarationList( + enclosingVarStmt.declarationList, + enclosingVarStmt.declarationList.declarations.filter(node => node !== bindingPattern.parent), + ), + )); + } + changeTracker.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); + return [ + Diagnostics.Extract_binding_expressions_to_variable, + ]; + } + + function addArrayBindingPatterns(bindingPattern: ArrayBindingPattern, bindingElements: ExpressionReverseChain[], parent: ExpressionReverseChain) { + for (let i = 0; i < bindingPattern.elements.length; ++i) { + const element = bindingPattern.elements[i]; + if (isOmittedExpression(element)) { + continue; + } + bindingElements.push({ + element, + parent, + expression: { kind: ExpressionType.ARRAY_ACCESS, arrayIndex: i }, + }); + } + } + + function addObjectBindingPatterns(bindingPattern: ObjectBindingPattern, bindingElements: ExpressionReverseChain[], parent: ExpressionReverseChain) { + for (const bindingElement of bindingPattern.elements) { + let name: string; + if (bindingElement.propertyName) { + if (isComputedPropertyName(bindingElement.propertyName)) { + bindingElements.push({ + element: bindingElement, + parent, + expression: { kind: ExpressionType.COMPUTED, computed: bindingElement.propertyName.expression }, + }); + continue; + } + else { + name = bindingElement.propertyName.text; + } + } + else { + name = (bindingElement.name as Identifier).text; + } + bindingElements.push({ + element: bindingElement, + parent, + expression: { kind: ExpressionType.TEXT, text: name }, + }); + } + } + + function createChainedExpression(expression: ExpressionReverseChain, expressionToVar: Map): Expression { + const reverseTraverse: ExpressionReverseChain[] = [expression]; + while (expression.parent) { + expression = expression.parent; + reverseTraverse.push(expression); + } + let chainedExpression: Expression = (reverseTraverse[reverseTraverse.length - 1].expression as { identifier: Identifier; }).identifier; + for (let i = reverseTraverse.length - 2; i >= 0; --i) { + const nextSubExpr = reverseTraverse[i].expression; + if (nextSubExpr.kind === ExpressionType.TEXT) { + chainedExpression = factory.createPropertyAccessChain( + chainedExpression, + /*questionDotToken*/ undefined, + factory.createIdentifier(nextSubExpr.text), + ); + } + else if (nextSubExpr.kind === ExpressionType.COMPUTED) { + chainedExpression = factory.createElementAccessExpression( + chainedExpression, + expressionToVar.get(nextSubExpr.computed)!, + ); + } + else if (nextSubExpr.kind === ExpressionType.ARRAY_ACCESS) { + chainedExpression = factory.createElementAccessExpression( + chainedExpression, + nextSubExpr.arrayIndex, + ); + } + } + return chainedExpression; + } + interface InferenceResult { + typeNode?: TypeNode | undefined; + mutatedTarget: boolean; + } + function inferNodeType(node: Node): InferenceResult { + if (typePrinter === "full") { + const type = isValueSignatureDeclaration(node) ? + tryGetReturnType(node) : + typeChecker.getTypeAtLocation(node); + if (!type) { + return emptyInferenceResult; + } + const flags = ( + isVariableDeclaration(node) || + (isPropertyDeclaration(node) && hasSyntacticModifier(node, ModifierFlags.Static | ModifierFlags.Readonly)) + ) && type.flags & TypeFlags.UniqueESSymbol ? + NodeBuilderFlags.AllowUniqueESSymbolType : NodeBuilderFlags.None; + return { + typeNode: typeToTypeNode(type, findAncestor(node, isDeclaration) ?? sourceFile, flags), + mutatedTarget: false, + }; + } + else { + return relativeType(node); + } + } + + function createTypeOfFromEntityNameExpression(node: EntityNameExpression) { + // Convert EntityNameExpression to EntityName ? + return factory.createTypeQueryNode(getSynthesizedDeepClone(node) as EntityName); + } + function typeFromArraySpreadElements( + node: ArrayLiteralExpression, + name = "temp", + ) { + const isConstContext = !!findAncestor(node, isConstAssertion); + if (!isConstContext) return emptyInferenceResult; + return typeFromSpreads( + node, + name, + isConstContext, + n => n.elements, + isSpreadElement, + factory.createSpreadElement, + props => factory.createArrayLiteralExpression(props, /*multiLine*/ true), + types => factory.createTupleTypeNode(types.map(factory.createRestTypeNode)), + ); + } + + function typeFromObjectSpreadAssignment( + node: ObjectLiteralExpression, + name = "temp", + ) { + const isConstContext = !!findAncestor(node, isConstAssertion); + return typeFromSpreads( + node, + name, + isConstContext, + n => n.properties, + isSpreadAssignment, + factory.createSpreadAssignment, + props => factory.createObjectLiteralExpression(props, /*multiLine*/ true), + factory.createIntersectionTypeNode, + ); + } + function typeFromSpreads( + node: T, + name: string, + isConstContext: boolean, + getChildren: (node: T) => readonly TElements[], + isSpread: (node: Node) => node is TSpread, + createSpread: (node: Expression) => TSpread, + makeNodeOfKind: (newElements: (TSpread | TElements)[]) => T, + finalType: (types: TypeNode[]) => TypeNode, + ): InferenceResult { + const intersectionTypes: TypeNode[] = []; + const newSpreads: TSpread[] = []; + let currentVariableProperties: TElements[] | undefined; + const statement = findAncestor(node, isStatement); + for (const prop of getChildren(node)) { + if (isSpread(prop)) { + finalizesVariablePart(); + if (isEntityNameExpression(prop.expression)) { + intersectionTypes.push(createTypeOfFromEntityNameExpression(prop.expression)); + newSpreads.push(prop); + } + else { + makeVariable(prop.expression); + } + } + else { + (currentVariableProperties ??= []).push(prop); + } + } + if (newSpreads.length === 0) { + return emptyInferenceResult; + } + finalizesVariablePart(); + changeTracker.replaceNode(sourceFile, node, makeNodeOfKind(newSpreads)); + return { + typeNode: finalType(intersectionTypes), + mutatedTarget: true, + }; + function makeVariable(expression: Expression) { + const tempName = factory.createUniqueName( + name + "_Part" + (newSpreads.length + 1), + GeneratedIdentifierFlags.Optimistic, + ); + const initializer = !isConstContext ? expression : factory.createAsExpression( + expression, + factory.createTypeReferenceNode("const"), + ); + const variableDefinition = factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + tempName, + /*exclamationToken*/ undefined, + /*type*/ undefined, + initializer, + ), + ], NodeFlags.Const), + ); + changeTracker.insertNodeBefore(sourceFile, statement!, variableDefinition); + + intersectionTypes.push(createTypeOfFromEntityNameExpression(tempName)); + newSpreads.push(createSpread(tempName)); + } + function finalizesVariablePart() { + if (currentVariableProperties) { + makeVariable(makeNodeOfKind( + currentVariableProperties, + )); + currentVariableProperties = undefined; + } + } + } + function isConstAssertion(location: Node): location is AssertionExpression { + return (isAssertionExpression(location) && isConstTypeReference(location.type)); + } + + function relativeType(node: Node): InferenceResult { + if (isParameter(node)) { + return emptyInferenceResult; + } + if (isShorthandPropertyAssignment(node)) { + return { + typeNode: createTypeOfFromEntityNameExpression(node.name), + mutatedTarget: false, + }; + } + if (isEntityNameExpression(node)) { + return { + typeNode: createTypeOfFromEntityNameExpression(node), + mutatedTarget: false, + }; + } + if (isConstAssertion(node)) { + return relativeType(node.expression); + } + if (isArrayLiteralExpression(node)) { + const variableDecl = findAncestor(node, isVariableDeclaration); + const partName = variableDecl && isIdentifier(variableDecl.name) ? variableDecl.name.text : undefined; + return typeFromArraySpreadElements(node, partName); + } + if (isObjectLiteralExpression(node)) { + const variableDecl = findAncestor(node, isVariableDeclaration); + const partName = variableDecl && isIdentifier(variableDecl.name) ? variableDecl.name.text : undefined; + return typeFromObjectSpreadAssignment(node, partName); + } + if ( + isVariableDeclaration(node) + && node.initializer + ) { + return relativeType(node.initializer); + } + if (isConditionalExpression(node)) { + const { typeNode: trueType, mutatedTarget: mTrue } = relativeType(node.whenTrue); + if (!trueType) return emptyInferenceResult; + const { typeNode: falseType, mutatedTarget: mFalse } = relativeType(node.whenFalse); + if (!falseType) return emptyInferenceResult; + return { + typeNode: factory.createUnionTypeNode([trueType, falseType]), + mutatedTarget: mTrue || mFalse, + }; + } + + return emptyInferenceResult; + } + + function typeToTypeNode(type: Type, enclosingDeclaration: Node, flags = NodeBuilderFlags.None) { + return typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags | flags); + } + + function tryGetReturnType(node: SignatureDeclaration): Type | undefined { + const signature = typeChecker.getSignatureFromDeclaration(node); + if (signature) { + return typeChecker.getReturnTypeOfSignature(signature); + } + } + + function addTypesToParametersArray(nodeArray: NodeArray | undefined) { + if (nodeArray === undefined) return; + nodeArray.forEach(param => fixupForIsolatedDeclarations(param)); + } + + function addTypeAnnotation(decl: ParameterDeclaration | VariableDeclaration | PropertyDeclaration): undefined | DiagnosticOrDiagnosticAndArguments { + if (decl.type) return undefined; + + const { typeNode } = inferNodeType(decl); + if (typeNode) { + changeTracker.tryInsertTypeAnnotation(getSourceFileOfNode(decl), decl, typeNode); + return [Diagnostics.Add_annotation_of_type_0, printTypeNode(typeNode)]; + } + } + function printTypeNode(node: Node) { + setEmitFlags(node, EmitFlags.SingleLine); + const printer = createPrinter({ + preserveSourceNewlines: false, + }); + const result = printer.printNode(EmitHint.Unspecified, node, sourceFile); + if (result.length > defaultMaximumTruncationLength) { + return result.substr(0, defaultMaximumTruncationLength - "...".length) + "..."; + } + setEmitFlags(node, EmitFlags.None); + return result; + } +} diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index 5e6dd79755636..119b9a2633a6e 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -47,7 +47,6 @@ import { isFunctionExpression, isGetAccessorDeclaration, isIdentifier, - isImportTypeNode, isInJSFile, isLiteralImportTypeNode, isMethodDeclaration, @@ -591,7 +590,7 @@ function createTypeParameterName(index: number) { /** @internal */ export function typeToAutoImportableTypeNode(checker: TypeChecker, importAdder: ImportAdder, type: Type, contextNode: Node | undefined, scriptTarget: ScriptTarget, flags?: NodeBuilderFlags, tracker?: SymbolTracker): TypeNode | undefined { let typeNode = checker.typeToTypeNode(type, contextNode, flags, tracker); - if (typeNode && isImportTypeNode(typeNode)) { + if (typeNode) { const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); if (importableReference) { importSymbols(importAdder, importableReference.symbols); diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index f15aff7173a18..83034bf8d7d54 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -130,6 +130,7 @@ import { NodeArray, NodeFactoryFlags, nodeIsSynthesized, + NullTransformationContext, nullTransformationContext, ObjectLiteralElementLike, ObjectLiteralExpression, @@ -164,7 +165,6 @@ import { textSpanEnd, Token, tokenToString, - TransformationContext, TypeLiteralNode, TypeNode, TypeParameterDeclaration, @@ -1372,7 +1372,7 @@ function isTrivia(s: string) { // A transformation context that won't perform parenthesization, as some parenthesization rules // are more aggressive than is strictly necessary. -const textChangesTransformationContext: TransformationContext = { +const textChangesTransformationContext: NullTransformationContext = { ...nullTransformationContext, factory: createNodeFactory( nullTransformationContext.factory.flags | NodeFactoryFlags.NoParenthesizerRules, diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 5005e4e050a32..5b4e2eedc5a15 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -2462,7 +2462,7 @@ export function createModuleSpecifierResolutionHost(program: Program, host: Lang return { fileExists: fileName => program.fileExists(fileName), getCurrentDirectory: () => host.getCurrentDirectory(), - readFile: maybeBind(host, host.readFile), + readFile: fileName => host.readFile(fileName), useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), getSymlinkCache: maybeBind(host, host.getSymlinkCache) || program.getSymlinkCache, getModuleSpecifierCache: maybeBind(host, host.getModuleSpecifierCache), diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index b5d08ca8f2e03..96236d2dfb9d8 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -1,3 +1,6 @@ +import { + fixTestFiles, +} from "../harness/isolatedDeclarationFixer"; import * as compiler from "./_namespaces/compiler"; import { Baseline, @@ -90,12 +93,19 @@ export class CompilerBaselineRunner extends RunnerBase { // Mocha holds onto the closure environment of the describe callback even after the test is done. // Everything declared here should be cleared out in the "after" callback. let compilerTest!: CompilerTest; + let environment!: CompilerTestEnvironment; before(() => { let payload; if (test && test.content) { payload = TestCaseParser.makeUnitsFromTest(test.content, test.file); } - compilerTest = new CompilerTest(fileName, payload, configuration); + environment = CompilerTest.initializeCompilerEnvironment(fileName, payload, configuration); + const fileSystem = environment.fileSystem.makeReadonly(); + + compilerTest = new CompilerTest({ + ...environment, + fileSystem: fileSystem.shadow(), + }); }); it(`Correct errors for ${fileName}`, () => compilerTest.verifyDiagnostics()); it(`Correct module resolution tracing for ${fileName}`, () => compilerTest.verifyModuleResolution()); @@ -103,8 +113,55 @@ export class CompilerBaselineRunner extends RunnerBase { it(`Correct JS output for ${fileName}`, () => (this.emit && compilerTest.verifyJavaScriptOutput())); it(`Correct Sourcemap output for ${fileName}`, () => compilerTest.verifySourceMapOutput()); it(`Correct type/symbol baselines for ${fileName}`, () => compilerTest.verifyTypesAndSymbols()); + + describe("isolated declarations", () => { + let isolatedTest: IsolatedDeclarationTest | undefined; + before(function () { + const isolatedTestEnv = IsolatedDeclarationTest.transformEnvironment(environment); + if (isolatedTestEnv) { + isolatedTest = new IsolatedDeclarationTest(isolatedTestEnv); + } + else { + this.skip(); + } + }); + it(`Correct dte emit for ${fileName}`, () => isolatedTest?.verifyDteOutput()); + it(`Correct tsc emit for ${fileName}`, () => isolatedTest?.verifyTscOutput()); + it(`Correct dte/tsc diff for ${fileName}`, () => isolatedTest?.verifyDiff()); + it(`Correct diff reason for ${fileName}`, () => isolatedTest?.verifyDiffReason()); + + after(() => { + isolatedTest = undefined!; + }); + }); + + describe("isolated declarations fixed", () => { + let fixedIsolatedTest: FixedIsolatedDeclarationTest | undefined; + before(function () { + const fixedIsolatedTestEnv = FixedIsolatedDeclarationTest.fixTestProject(environment); + if (fixedIsolatedTestEnv) { + fixedIsolatedTest = new FixedIsolatedDeclarationTest(fixedIsolatedTestEnv); + } + else { + this.skip(); + } + }); + it(`Correct dte emit for fixed ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); + it(`Correct tsc emit for fixed ${fileName}`, () => fixedIsolatedTest?.verifyTscOutput()); + it(`Correct dte/tsc diff for fixed ${fileName}`, () => fixedIsolatedTest?.verifyDiff()); + it(`Correct dte map emit for fixed ${fileName}`, () => fixedIsolatedTest?.verifyDteMapOutput()); + it(`Correct tsc map emit for fixed ${fileName}`, () => fixedIsolatedTest?.verifyTscMapOutput()); + it(`Correct dte/tsc map diff for fixed ${fileName}`, () => fixedIsolatedTest?.verifyMapDiff()); + it(`Correct diff reason for fixed ${fileName}`, () => fixedIsolatedTest?.verifyDiffReason()); + + after(() => { + fixedIsolatedTest = undefined!; + }); + }); + after(() => { compilerTest = undefined!; + environment = undefined!; }); } @@ -125,8 +182,25 @@ export class CompilerBaselineRunner extends RunnerBase { } } } +interface CompilerTestEnvironment { + fileName: string; + justName: string; + toBeCompiled: Compiler.TestFile[]; + otherFiles: Compiler.TestFile[]; + tsConfigFiles: Compiler.TestFile[]; + allFiles: Compiler.TestFile[]; + compilerOptions: ts.CompilerOptions & Compiler.HarnessOptions; + configuredName: string; + hasNonDtsFiles: boolean; + testCaseContent: TestCaseParser.TestCaseContent; + configurationOverrides?: TestCaseParser.CompilerSettings; + fileSystem: vfs.FileSystem; + programFileNames: string[]; + symlinks: vfs.FileSet | undefined; + typeScriptVersion?: string; +} -class CompilerTest { +class CompilerTestBase { private static varyBy: readonly string[] = [ "module", "moduleResolution", @@ -165,26 +239,42 @@ class CompilerTest { "resolveJsonModule", "allowArbitraryExtensions", ]; - private fileName: string; - private justName: string; - private configuredName: string; - private harnessSettings: TestCaseParser.CompilerSettings; - private hasNonDtsFiles: boolean; - private result: compiler.CompilationResult; - private options: ts.CompilerOptions; - private tsConfigFiles: Compiler.TestFile[]; + protected fileName: string; + protected justName: string; + protected configuredName: string; + protected harnessSettings: TestCaseParser.CompilerSettings; + protected hasNonDtsFiles: boolean; + protected result: compiler.CompilationResult; + protected options: ts.CompilerOptions; + protected tsConfigFiles: Compiler.TestFile[]; // equivalent to the files that will be passed on the command line - private toBeCompiled: Compiler.TestFile[]; + protected toBeCompiled: Compiler.TestFile[]; // equivalent to other files on the file system not directly passed to the compiler (ie things that are referenced by other files) - private otherFiles: Compiler.TestFile[]; + protected otherFiles: Compiler.TestFile[]; + protected allFiles: Compiler.TestFile[]; - constructor(fileName: string, testCaseContent?: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings) { - const absoluteRootDir = vfs.srcFolder; - this.fileName = fileName; - this.justName = vpath.basename(fileName); - this.configuredName = this.justName; + constructor(compilerEnvironment: CompilerTestEnvironment) { + this.fileName = compilerEnvironment.fileName; + this.justName = compilerEnvironment.justName; + this.hasNonDtsFiles = compilerEnvironment.hasNonDtsFiles; + this.configuredName = compilerEnvironment.configuredName; + this.toBeCompiled = compilerEnvironment.toBeCompiled; + this.otherFiles = compilerEnvironment.otherFiles; + this.allFiles = compilerEnvironment.allFiles; + this.tsConfigFiles = compilerEnvironment.tsConfigFiles; + + this.harnessSettings = compilerEnvironment.testCaseContent.settings; + + this.result = Compiler.compileFilesWithEnvironment(compilerEnvironment); + + this.options = this.result.options; + } + + public static initializeCompilerEnvironment(fileName: string, testCaseContent?: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings): CompilerTestEnvironment { + const justName = vpath.basename(fileName); + let configuredName = justName; if (configurationOverrides) { - let configuredName = ""; + configuredName = ""; const keys = Object .keys(configurationOverrides) .sort(); @@ -195,9 +285,9 @@ class CompilerTest { configuredName += `${key.toLowerCase()}=${configurationOverrides[key].toLowerCase()}`; } if (configuredName) { - const extname = vpath.extname(this.justName); - const basename = vpath.basename(this.justName, extname, /*ignoreCase*/ true); - this.configuredName = `${basename}(${configuredName})${extname}`; + const extname = vpath.extname(justName); + const basename = vpath.basename(justName, extname, /*ignoreCase*/ true); + configuredName = `${basename}(${configuredName})${extname}`; } } @@ -209,29 +299,30 @@ class CompilerTest { testCaseContent = { ...testCaseContent, settings: { ...testCaseContent.settings, ...configurationOverrides } }; } + const absoluteRootDir = vfs.srcFolder; const units = testCaseContent.testUnitData; - this.toBeCompiled = []; - this.otherFiles = []; - this.hasNonDtsFiles = units.some(unit => !ts.fileExtensionIs(unit.name, ts.Extension.Dts)); - this.harnessSettings = testCaseContent.settings; + let toBeCompiled = []; + const otherFiles = []; + const hasNonDtsFiles = testCaseContent.testUnitData.some(unit => !ts.fileExtensionIs(unit.name, ts.Extension.Dts)); + const harnessSettings = testCaseContent.settings; let tsConfigOptions: ts.CompilerOptions | undefined; - this.tsConfigFiles = []; + const tsConfigFiles = []; if (testCaseContent.tsConfig) { tsConfigOptions = ts.cloneCompilerOptions(testCaseContent.tsConfig.options); - this.tsConfigFiles.push(this.createHarnessTestFile(testCaseContent.tsConfigFileUnitData!)); + tsConfigFiles.push(this.createHarnessTestFile(testCaseContent.tsConfigFileUnitData!)); for (const unit of units) { if (testCaseContent.tsConfig.fileNames.includes(ts.getNormalizedAbsolutePath(unit.name, absoluteRootDir))) { - this.toBeCompiled.push(this.createHarnessTestFile(unit)); + toBeCompiled.push(this.createHarnessTestFile(unit)); } else { - this.otherFiles.push(this.createHarnessTestFile(unit)); + otherFiles.push(this.createHarnessTestFile(unit)); } } } else { - const baseUrl = this.harnessSettings.baseUrl; + const baseUrl = harnessSettings.baseUrl; if (baseUrl !== undefined && !ts.isRootedDiskPath(baseUrl)) { - this.harnessSettings.baseUrl = ts.getNormalizedAbsolutePath(baseUrl, absoluteRootDir); + harnessSettings.baseUrl = ts.getNormalizedAbsolutePath(baseUrl, absoluteRootDir); } const lastUnit = units[units.length - 1]; @@ -240,15 +331,15 @@ class CompilerTest { // otherwise, assume all files are just meant to be in the same compilation session without explicit references to one another. if (testCaseContent.settings.noImplicitReferences || /require\(/.test(lastUnit.content) || /reference\spath/.test(lastUnit.content)) { - this.toBeCompiled.push(this.createHarnessTestFile(lastUnit)); + toBeCompiled.push(this.createHarnessTestFile(lastUnit)); units.forEach(unit => { if (unit.name !== lastUnit.name) { - this.otherFiles.push(this.createHarnessTestFile(unit)); + otherFiles.push(this.createHarnessTestFile(unit)); } }); } else { - this.toBeCompiled = units.map(unit => { + toBeCompiled = units.map(unit => { return this.createHarnessTestFile(unit); }); } @@ -258,16 +349,32 @@ class CompilerTest { tsConfigOptions.configFile!.fileName = tsConfigOptions.configFilePath; } - this.result = Compiler.compileFiles( - this.toBeCompiled, - this.otherFiles, - this.harnessSettings, - /*options*/ tsConfigOptions, - /*currentDirectory*/ this.harnessSettings.currentDirectory, + const { fileSystem, compilerOptions, programFileNames, typeScriptVersion } = Compiler.prepareEnvironment( + toBeCompiled, + otherFiles, + harnessSettings, + tsConfigOptions, + harnessSettings.currentDirectory, testCaseContent.symlinks, ); - this.options = this.result.options; + return { + fileName, + justName, + toBeCompiled, + programFileNames, + fileSystem, + otherFiles, + tsConfigFiles, + compilerOptions, + configuredName, + hasNonDtsFiles, + testCaseContent, + configurationOverrides, + typeScriptVersion, + symlinks: testCaseContent.symlinks, + allFiles: ts.concatenate(toBeCompiled, otherFiles), + }; } public static getConfigurations(file: string): CompilerFileBasedTest { @@ -278,6 +385,15 @@ class CompilerTest { return { file, configurations, content }; } + protected static createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { + return { + unitName: unit.name, + content: unit.content, + fileOptions: unit.fileOptions, + }; + } +} +class CompilerTest extends CompilerTestBase { public verifyDiagnostics() { // check errors Compiler.doErrorBaseline( @@ -352,12 +468,305 @@ class CompilerTest { !!ts.length(this.result.diagnostics), ); } +} + +class IsolatedDeclarationTest extends CompilerTestBase { + protected dteDiagnostics: readonly ts.Diagnostic[]; + protected tscNonIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; + protected isOutputEquivalent: boolean; + protected dteDtsFiles: Compiler.TestFile[]; + protected tscDtsFiles: Compiler.TestFile[]; + protected dteDtsMapFiles: Compiler.TestFile[]; + protected tscDtsMapFiles: Compiler.TestFile[]; + protected tscIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; + protected isDiagnosticEquivalent: boolean; + protected isOutputMapEquivalent: boolean; + + static transformEnvironment(compilerEnvironment: CompilerTestEnvironment, shouldNotExclude = !!compilerEnvironment.testCaseContent.settings.isolatedDeclarationDiffReason): CompilerTestEnvironment | undefined { + const options = compilerEnvironment.compilerOptions; + if (!shouldNotExclude) { + // Exclude tests some tests + // - those explicitly not opting into isolatedDeclarations + // - those that do not usually emit output anyway + if (options.isolatedDeclarations === false || options.noEmit || options.noTypesAndSymbols || !options.declaration) { + return undefined; + } + } + const clonedOptions: ts.CompilerOptions & Compiler.HarnessOptions = ts.cloneCompilerOptions(compilerEnvironment.compilerOptions); + if (clonedOptions.isolatedDeclarations === undefined) { + clonedOptions.isolatedDeclarations = true; + } + clonedOptions.allowJs = false; + clonedOptions.checkJs = false; + clonedOptions.skipLibCheck = true; + if (clonedOptions.forceDtsEmit === undefined) { + clonedOptions.forceDtsEmit = true; + } + delete clonedOptions.outFile; + delete clonedOptions.out; + if (clonedOptions.declarationMap !== false) { + delete clonedOptions.declarationMap; + } + + const clonedSettings: TestCaseParser.CompilerSettings = { + ...compilerEnvironment.testCaseContent.settings, + allowJS: "false", + checkJS: "false", + isolatedDeclarations: "true", + forceDtsEmit: "true", + skipLibCheck: "true", + }; + delete clonedSettings.outFile; + if (clonedSettings.declarationMap !== "false") { + delete clonedSettings.declarationMap; + } + delete clonedSettings.outfile; + delete clonedSettings.out; - private createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { return { - unitName: unit.name, - content: unit.content, - fileOptions: unit.fileOptions, + ...compilerEnvironment, + fileSystem: compilerEnvironment.fileSystem.shadow(), + testCaseContent: { + ...compilerEnvironment.testCaseContent, + settings: clonedSettings, + }, + compilerOptions: clonedOptions, }; } + constructor(compilerEnvironment: CompilerTestEnvironment) { + super(compilerEnvironment); + + const tscResult = this.result; + const fileCompare = (a: Compiler.TestFile, b: Compiler.TestFile) => this.result.host.vfs.stringComparer(a.unitName, b.unitName); + const currentDirectory = this.harnessSettings.currentDirectory ?? vfs.srcFolder; + const dteResult = Compiler.compileDeclarationFilesWithIsolatedEmitter( + this.toBeCompiled, + this.otherFiles, + tscResult.host, + this.options, + currentDirectory, + ); + this.dteDiagnostics = ts.sortAndDeduplicateDiagnostics(dteResult.diagnostics); + this.dteDtsFiles = [...ts.mapDefinedIterator(dteResult.dts, ([, f]) => f.asTestFile())]; + this.dteDtsFiles.sort(fileCompare); + this.dteDtsMapFiles = [...ts.mapDefinedIterator(dteResult.dtsMap, ([, f]) => f.asTestFile())]; + this.dteDtsMapFiles.sort(fileCompare); + + // With force get JSON definition files we need to ignore + this.tscDtsFiles = [...ts.mapDefinedIterator(tscResult.dts, ([name, f]) => name.endsWith(".d.json.ts") ? undefined : f.asTestFile())]; + + this.tscDtsFiles.sort(fileCompare); + this.tscDtsMapFiles = ts.mapDefined(this.tscDtsFiles, f => tscResult.maps.get(f.unitName + ".map")?.asTestFile()); + this.tscDtsMapFiles.sort(fileCompare); + + const tscDiagnostics = ts.sortAndDeduplicateDiagnostics(this.result.diagnostics); + this.tscNonIsolatedDeclarationsErrors = tscDiagnostics.filter(d => !IsolatedDeclarationTest.dteDiagnosticErrors.has(d.code)); + this.tscIsolatedDeclarationsErrors = tscDiagnostics.filter(d => IsolatedDeclarationTest.dteDiagnosticErrors.has(d.code)); + + // If DTE is the same as TS output we don't need to do any extra checks. + this.isOutputEquivalent = this.dteDtsFiles.length === this.tscDtsFiles.length && this.dteDtsFiles + .every((dteDecl, index) => { + const tscDecl = this.tscDtsFiles[index]; + return tscDecl.unitName === dteDecl.unitName && dteDecl.content === tscDecl.content; + }); + + this.isOutputMapEquivalent = this.dteDtsMapFiles.length === this.tscDtsMapFiles.length && this.dteDtsMapFiles + .every((dteDecl, index) => { + const tscDecl = this.tscDtsMapFiles[index]; + return tscDecl.unitName === dteDecl.unitName && dteDecl.content === tscDecl.content; + }); + + this.isDiagnosticEquivalent = this.tscIsolatedDeclarationsErrors.length === this.dteDiagnostics.length && + this.dteDiagnostics.every((dteDiag, index) => { + const tscDiag = this.tscIsolatedDeclarationsErrors[index]; + return tscDiag.code === dteDiag.code + && tscDiag.file?.fileName === dteDiag.file?.fileName + && tscDiag.start === dteDiag.start + && tscDiag.length === dteDiag.length; + }); + } + private static dteDiagnosticErrors = new Set([ + ts.Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + ts.Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations, + ts.Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations, + ts.Diagnostics.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations, + ts.Diagnostics.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations, + ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_which_are_not_supported_with_isolatedDeclarations, + ts.Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, + ts.Diagnostics.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations, + ts.Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations, + ts.Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations, + ts.Diagnostics.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations, + ].map(d => d.code)); + protected get baselinePath() { + return "isolated-declarations/original"; + } + protected get diffReason() { + return this.harnessSettings.isolatedDeclarationDiffReason; + } + verifyDteOutput() { + if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; + Compiler.doDeclarationBaseline( + this.configuredName, + this.baselinePath + "/dte", + this.fileName, + this.dteDtsFiles, + ts.concatenate(this.dteDiagnostics, this.tscNonIsolatedDeclarationsErrors), + this.allFiles, + this.options.pretty, + ); + } + verifyTscOutput() { + if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; + Compiler.doDeclarationBaseline( + this.configuredName, + this.baselinePath + "/tsc", + this.fileName, + this.tscDtsFiles, + ts.concatenate(this.tscIsolatedDeclarationsErrors, this.tscNonIsolatedDeclarationsErrors), + this.allFiles, + this.options.pretty, + ); + } + verifyDteMapOutput() { + // No point to check maps if output is different + if (this.isOutputMapEquivalent || !this.isOutputEquivalent) return; + Compiler.doDeclarationMapBaseline( + this.configuredName, + this.baselinePath + "/dte", + this.fileName, + this.dteDtsFiles, + this.dteDtsMapFiles, + this.allFiles, + ); + } + verifyTscMapOutput() { + // No point to check maps if output is different + if (this.isOutputMapEquivalent || !this.isOutputEquivalent) return; + Compiler.doDeclarationMapBaseline( + this.configuredName, + this.baselinePath + "/tsc", + this.fileName, + this.tscDtsFiles, + this.tscDtsMapFiles, + this.allFiles, + ); + } + + verifyDiffReason() { + if (this.isOutputMapEquivalent && this.isOutputEquivalent && this.isDiagnosticEquivalent) { + ts.Debug.assert(this.diffReason === undefined, "Should not have a diff reason if everything is equivalent"); + } + else { + ts.Debug.assert(this.diffReason !== undefined, "Should have a reason if everything is not equivalent"); + } + } + verifyDiff() { + if (this.isOutputEquivalent && this.isDiagnosticEquivalent) { + return; + } + Compiler.doDeclarationDiffBaseline( + this.configuredName, + this.baselinePath + "/diff", + this.fileName, + this.dteDtsFiles, + ts.concatenate(this.dteDiagnostics, this.tscNonIsolatedDeclarationsErrors), + this.tscDtsFiles, + ts.concatenate(this.tscIsolatedDeclarationsErrors, this.tscNonIsolatedDeclarationsErrors), + this.allFiles, + this.options.pretty, + this.diffReason, + ); + } + + verifyMapDiff() { + // No point to check maps if output is different + if (this.isOutputMapEquivalent || !this.isOutputEquivalent) return; + Compiler.doDeclarationMapDiffBaseline( + this.configuredName, + this.baselinePath + "/diff", + this.fileName, + this.dteDtsFiles, + this.dteDtsMapFiles, + this.tscDtsFiles, + this.tscDtsMapFiles, + this.allFiles, + this.diffReason, + ); + } +} + +class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { + static fixTestProject(compilerEnvironment: CompilerTestEnvironment, shouldNotExclude = !!compilerEnvironment.testCaseContent.settings.isolatedDeclarationFixedDiffReason): CompilerTestEnvironment | undefined { + if (!shouldNotExclude) { + // Exclude test that disable types and symbols (good proxy for very complex test) + if (compilerEnvironment.compilerOptions.noTypesAndSymbols) { + return undefined; + } + if (!compilerEnvironment.compilerOptions.declaration) { + return undefined; + } + } + + const env = IsolatedDeclarationTest.transformEnvironment(compilerEnvironment, shouldNotExclude); + if (!env) { + return undefined; + } + + env.compilerOptions.isolatedDeclarations = false; + if (env.compilerOptions.declarationMap === undefined) { + env.compilerOptions.declarationMap = true; + } + env.compilerOptions.forceDtsEmit = false; + + const fixerOptions = ts.cloneCompilerOptions(env.compilerOptions); + fixerOptions.isolatedDeclarations = true; + const fixResults = fixTestFiles(env.fileSystem, env.programFileNames, fixerOptions); + + const hasReferenceDirectiveErrors = fixResults.success && fixResults.unfixedDiagnostics.some(d => FixedIsolatedDeclarationTest.referenceDirectiveErrors.has(d.code)); + for (const file of env.allFiles) { + const content = env.fileSystem.readFileSync(file.unitName, "utf-8"); + file.content = content; + } + + if (!fixResults.success || hasReferenceDirectiveErrors) { + return undefined; + } + env.fileSystem.makeReadonly(); + env.fileSystem = env.fileSystem.shadow(); + return env; + } + private static referenceDirectiveErrors = new Set([ + ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_which_are_not_supported_with_isolatedDeclarations.code, + ts.Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations.code, + ]); + constructor(compilerEnvironment: CompilerTestEnvironment) { + super(compilerEnvironment); + + // Suppress diff for tests with reference directives. + if ( + this.dteDiagnostics.some(d => d.code === ts.Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations.code) + ) { + this.isOutputMapEquivalent = true; + this.isDiagnosticEquivalent = true; + this.isOutputEquivalent = true; + } + } + + protected override get baselinePath() { + return "isolated-declarations/auto-fixed"; + } + + protected override get diffReason() { + return this.harnessSettings.isolatedDeclarationFixedDiffReason; + } } diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 1e433e55d63f3..b0222465e5a77 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -7540,6 +7540,7 @@ declare namespace ts { inlineSourceMap?: boolean; inlineSources?: boolean; isolatedModules?: boolean; + isolatedDeclarations?: boolean; jsx?: JsxEmit; keyofStringsOnly?: boolean; lib?: string[]; @@ -7930,6 +7931,19 @@ declare namespace ts { All = 15, ExcludeJSDocTypeAssertion = 16, } + interface TranspileDeclarationsOutput { + declaration: string; + declarationPath: string; + declarationMap: string | undefined; + declarationMapPath: string | undefined; + diagnostics: Diagnostic[]; + } + interface TranspileDeclarationsOptions { + compilerOptions: CompilerOptions; + commonSourceDirectory?: string; + currentDirectory?: string; + useCaseSensitiveFileNames?: boolean; + } type ImmediatelyInvokedFunctionExpression = CallExpression & { readonly expression: FunctionExpression; }; @@ -9824,32 +9838,32 @@ declare namespace ts { * Starts a new lexical environment and visits a statement list, ending the lexical environment * and merging hoisted declarations upon completion. */ - function visitLexicalEnvironment(statements: NodeArray, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray; + function visitLexicalEnvironment(statements: NodeArray, visitor: Visitor, context: CoreTransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray; /** * Starts a new lexical environment and visits a parameter list, suspending the lexical * environment upon completion. */ - function visitParameterList(nodes: NodeArray, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray; - function visitParameterList(nodes: NodeArray | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray | undefined; + function visitParameterList(nodes: NodeArray, visitor: Visitor, context: CoreTransformationContext, nodesVisitor?: NodesVisitor): NodeArray; + function visitParameterList(nodes: NodeArray | undefined, visitor: Visitor, context: CoreTransformationContext, nodesVisitor?: NodesVisitor): NodeArray | undefined; /** * Resumes a suspended lexical environment and visits a function body, ending the lexical * environment and merging hoisted declarations upon completion. */ - function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody; + function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: CoreTransformationContext): FunctionBody; /** * Resumes a suspended lexical environment and visits a function body, ending the lexical * environment and merging hoisted declarations upon completion. */ - function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined; + function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: CoreTransformationContext): FunctionBody | undefined; /** * Resumes a suspended lexical environment and visits a concise body, ending the lexical * environment and merging hoisted declarations upon completion. */ - function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody; + function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: CoreTransformationContext): ConciseBody; /** * Visits an iteration body, adding any block-scoped variables required by the transformation. */ - function visitIterationBody(body: Statement, visitor: Visitor, context: TransformationContext): Statement; + function visitIterationBody(body: Statement, visitor: Visitor, context: CoreTransformationContext): Statement; /** * Visits the elements of a {@link CommaListExpression}. * @param visitor The visitor to use when visiting expressions whose result will not be discarded at runtime. @@ -9863,7 +9877,7 @@ declare namespace ts { * @param visitor The callback used to visit each child. * @param context A lexical environment context for the visitor. */ - function visitEachChild(node: T, visitor: Visitor, context: TransformationContext | undefined): T; + function visitEachChild(node: T, visitor: Visitor, context: CoreTransformationContext | undefined): T; /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * @@ -9871,7 +9885,8 @@ declare namespace ts { * @param visitor The callback used to visit each child. * @param context A lexical environment context for the visitor. */ - function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext | undefined, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; + function visitEachChild(node: T | undefined, visitor: Visitor, context: CoreTransformationContext | undefined, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; + function transpileDeclaration(sourceFile: SourceFile, transpileOptions: TranspileDeclarationsOptions): TranspileDeclarationsOutput; function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js index 7409d2130cf40..ff667dc51f4c1 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js @@ -17,8 +17,8 @@ class C3 { accessor #y = 0; } -//// [file3.ts] -class C3 { +//// [file3-2.ts] +class C32 { accessor x = 0; } @@ -51,6 +51,11 @@ class C2 { } //// [file3.js] class C3 { + static accessor #x = 0; + accessor #y = 0; +} +//// [file3-2.js] +class C32 { accessor x = 0; } //// [file4.js] diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols index 4739c303d907a..9c4ab983fa9d2 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols @@ -22,17 +22,18 @@ class C3 { >C3 : Symbol(C3, Decl(file3.ts, 0, 0)) static accessor #x = 0; ->x : Symbol(C3.x, Decl(file3.ts, 0, 10)) +>#x : Symbol(C3.#x, Decl(file3.ts, 0, 10)) accessor #y = 0; +>#y : Symbol(C3.#y, Decl(file3.ts, 1, 27)) } -=== file3.ts === -class C3 { ->C3 : Symbol(C3, Decl(file3.ts, 0, 0)) +=== file3-2.ts === +class C32 { +>C32 : Symbol(C32, Decl(file3-2.ts, 0, 0)) accessor x = 0; ->x : Symbol(C3.x, Decl(file3.ts, 0, 10)) +>x : Symbol(C32.x, Decl(file3-2.ts, 0, 11)) } === file4.ts === diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types index c7ddf4f10e403..69294d2e43ce6 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types @@ -24,15 +24,17 @@ class C3 { >C3 : C3 static accessor #x = 0; ->x : number +>#x : number >0 : 0 accessor #y = 0; +>#y : number +>0 : 0 } -=== file3.ts === -class C3 { ->C3 : C3 +=== file3-2.ts === +class C32 { +>C32 : C32 accessor x = 0; >x : number diff --git a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt new file mode 100644 index 0000000000000..9a9a1276100c9 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt @@ -0,0 +1,76 @@ +computedPropertiesNarrowed.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(18,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(22,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(26,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(37,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + +==== computedPropertiesNarrowed.ts (6 errors) ==== + const x: 0 | 1 = Math.random()? 0: 1; + declare function assert(n: number): asserts n is 1; + assert(x); + export let o = { + [x]: 1 // error narrow type !== declared type + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:4:12: Add a type annotation to the variable o. + } + + + const y: 0 = 0 + export let o2 = { + [y]: 1 // ok literal computed type + } + + // literals are ok + export let o3 = { [1]: 1 } + export let o31 = { [-1]: 1 } + + export let o32 = { [1-1]: 1 } // error number + ~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:18:12: Add a type annotation to the variable o32. + + let u = Symbol(); + export let o4 = { + [u]: 1 // Should error, nut a unique symbol + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:21:12: Add a type annotation to the variable o4. + } + + export let o5 ={ + [Symbol()]: 1 // Should error + ~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:25:12: Add a type annotation to the variable o5. + } + + const uu: unique symbol = Symbol(); + export let o6 = { + [uu]: 1 // Should be ok + } + + + function foo (): 1 { return 1; } + export let o7 = { + [foo()]: 1 // Should error + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:36:12: Add a type annotation to the variable o7. + }; + + let E = { A: 1 } as const + export const o8 = { + [E.A]: 1 // Fresh + } + + function ns() { return { v: 0 } as const } + export const o9 = { + [ns().v]: 1 + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:46:14: Add a type annotation to the variable o9. + } + \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertiesNarrowed.js b/tests/baselines/reference/computedPropertiesNarrowed.js new file mode 100644 index 0000000000000..832b9aae4ac8c --- /dev/null +++ b/tests/baselines/reference/computedPropertiesNarrowed.js @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +//// [computedPropertiesNarrowed.ts] +const x: 0 | 1 = Math.random()? 0: 1; +declare function assert(n: number): asserts n is 1; +assert(x); +export let o = { + [x]: 1 // error narrow type !== declared type +} + + +const y: 0 = 0 +export let o2 = { + [y]: 1 // ok literal computed type +} + +// literals are ok +export let o3 = { [1]: 1 } +export let o31 = { [-1]: 1 } + +export let o32 = { [1-1]: 1 } // error number + +let u = Symbol(); +export let o4 = { + [u]: 1 // Should error, nut a unique symbol +} + +export let o5 ={ + [Symbol()]: 1 // Should error +} + +const uu: unique symbol = Symbol(); +export let o6 = { + [uu]: 1 // Should be ok +} + + +function foo (): 1 { return 1; } +export let o7 = { + [foo()]: 1 // Should error +}; + +let E = { A: 1 } as const +export const o8 = { + [E.A]: 1 // Fresh +} + +function ns() { return { v: 0 } as const } +export const o9 = { + [ns().v]: 1 +} + + +//// [computedPropertiesNarrowed.js] +const x = Math.random() ? 0 : 1; +assert(x); +export let o = { + [x]: 1 // error narrow type !== declared type +}; +const y = 0; +export let o2 = { + [y]: 1 // ok literal computed type +}; +// literals are ok +export let o3 = { [1]: 1 }; +export let o31 = { [-1]: 1 }; +export let o32 = { [1 - 1]: 1 }; // error number +let u = Symbol(); +export let o4 = { + [u]: 1 // Should error, nut a unique symbol +}; +export let o5 = { + [Symbol()]: 1 // Should error +}; +const uu = Symbol(); +export let o6 = { + [uu]: 1 // Should be ok +}; +function foo() { return 1; } +export let o7 = { + [foo()]: 1 // Should error +}; +let E = { A: 1 }; +export const o8 = { + [E.A]: 1 // Fresh +}; +function ns() { return { v: 0 }; } +export const o9 = { + [ns().v]: 1 +}; diff --git a/tests/baselines/reference/computedPropertiesNarrowed.symbols b/tests/baselines/reference/computedPropertiesNarrowed.symbols new file mode 100644 index 0000000000000..0e46b6ff9ae97 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesNarrowed.symbols @@ -0,0 +1,127 @@ +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +=== computedPropertiesNarrowed.ts === +const x: 0 | 1 = Math.random()? 0: 1; +>x : Symbol(x, Decl(computedPropertiesNarrowed.ts, 0, 5)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + +declare function assert(n: number): asserts n is 1; +>assert : Symbol(assert, Decl(computedPropertiesNarrowed.ts, 0, 37)) +>n : Symbol(n, Decl(computedPropertiesNarrowed.ts, 1, 24)) +>n : Symbol(n, Decl(computedPropertiesNarrowed.ts, 1, 24)) + +assert(x); +>assert : Symbol(assert, Decl(computedPropertiesNarrowed.ts, 0, 37)) +>x : Symbol(x, Decl(computedPropertiesNarrowed.ts, 0, 5)) + +export let o = { +>o : Symbol(o, Decl(computedPropertiesNarrowed.ts, 3, 10)) + + [x]: 1 // error narrow type !== declared type +>[x] : Symbol([x], Decl(computedPropertiesNarrowed.ts, 3, 16)) +>x : Symbol(x, Decl(computedPropertiesNarrowed.ts, 0, 5)) +} + + +const y: 0 = 0 +>y : Symbol(y, Decl(computedPropertiesNarrowed.ts, 8, 5)) + +export let o2 = { +>o2 : Symbol(o2, Decl(computedPropertiesNarrowed.ts, 9, 10)) + + [y]: 1 // ok literal computed type +>[y] : Symbol([y], Decl(computedPropertiesNarrowed.ts, 9, 17)) +>y : Symbol(y, Decl(computedPropertiesNarrowed.ts, 8, 5)) +} + +// literals are ok +export let o3 = { [1]: 1 } +>o3 : Symbol(o3, Decl(computedPropertiesNarrowed.ts, 14, 10)) +>[1] : Symbol([1], Decl(computedPropertiesNarrowed.ts, 14, 17)) +>1 : Symbol([1], Decl(computedPropertiesNarrowed.ts, 14, 17)) + +export let o31 = { [-1]: 1 } +>o31 : Symbol(o31, Decl(computedPropertiesNarrowed.ts, 15, 10)) +>[-1] : Symbol([-1], Decl(computedPropertiesNarrowed.ts, 15, 18)) + +export let o32 = { [1-1]: 1 } // error number +>o32 : Symbol(o32, Decl(computedPropertiesNarrowed.ts, 17, 10)) +>[1-1] : Symbol([1-1], Decl(computedPropertiesNarrowed.ts, 17, 18)) + +let u = Symbol(); +>u : Symbol(u, Decl(computedPropertiesNarrowed.ts, 19, 3)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +export let o4 = { +>o4 : Symbol(o4, Decl(computedPropertiesNarrowed.ts, 20, 10)) + + [u]: 1 // Should error, nut a unique symbol +>[u] : Symbol([u], Decl(computedPropertiesNarrowed.ts, 20, 17)) +>u : Symbol(u, Decl(computedPropertiesNarrowed.ts, 19, 3)) +} + +export let o5 ={ +>o5 : Symbol(o5, Decl(computedPropertiesNarrowed.ts, 24, 10)) + + [Symbol()]: 1 // Should error +>[Symbol()] : Symbol([Symbol()], Decl(computedPropertiesNarrowed.ts, 24, 17)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +} + +const uu: unique symbol = Symbol(); +>uu : Symbol(uu, Decl(computedPropertiesNarrowed.ts, 28, 5)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +export let o6 = { +>o6 : Symbol(o6, Decl(computedPropertiesNarrowed.ts, 29, 10)) + + [uu]: 1 // Should be ok +>[uu] : Symbol([uu], Decl(computedPropertiesNarrowed.ts, 29, 18)) +>uu : Symbol(uu, Decl(computedPropertiesNarrowed.ts, 28, 5)) +} + + +function foo (): 1 { return 1; } +>foo : Symbol(foo, Decl(computedPropertiesNarrowed.ts, 31, 1)) + +export let o7 = { +>o7 : Symbol(o7, Decl(computedPropertiesNarrowed.ts, 35, 10)) + + [foo()]: 1 // Should error +>[foo()] : Symbol([foo()], Decl(computedPropertiesNarrowed.ts, 35, 17)) +>foo : Symbol(foo, Decl(computedPropertiesNarrowed.ts, 31, 1)) + +}; + +let E = { A: 1 } as const +>E : Symbol(E, Decl(computedPropertiesNarrowed.ts, 39, 3)) +>A : Symbol(A, Decl(computedPropertiesNarrowed.ts, 39, 9)) +>const : Symbol(const) + +export const o8 = { +>o8 : Symbol(o8, Decl(computedPropertiesNarrowed.ts, 40, 12)) + + [E.A]: 1 // Fresh +>[E.A] : Symbol([E.A], Decl(computedPropertiesNarrowed.ts, 40, 19)) +>E.A : Symbol(A, Decl(computedPropertiesNarrowed.ts, 39, 9)) +>E : Symbol(E, Decl(computedPropertiesNarrowed.ts, 39, 3)) +>A : Symbol(A, Decl(computedPropertiesNarrowed.ts, 39, 9)) +} + +function ns() { return { v: 0 } as const } +>ns : Symbol(ns, Decl(computedPropertiesNarrowed.ts, 42, 1)) +>v : Symbol(v, Decl(computedPropertiesNarrowed.ts, 44, 24)) +>const : Symbol(const) + +export const o9 = { +>o9 : Symbol(o9, Decl(computedPropertiesNarrowed.ts, 45, 12)) + + [ns().v]: 1 +>[ns().v] : Symbol([ns().v], Decl(computedPropertiesNarrowed.ts, 45, 19)) +>ns().v : Symbol(v, Decl(computedPropertiesNarrowed.ts, 44, 24)) +>ns : Symbol(ns, Decl(computedPropertiesNarrowed.ts, 42, 1)) +>v : Symbol(v, Decl(computedPropertiesNarrowed.ts, 44, 24)) +} + diff --git a/tests/baselines/reference/computedPropertiesNarrowed.types b/tests/baselines/reference/computedPropertiesNarrowed.types new file mode 100644 index 0000000000000..82efb67ffb230 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesNarrowed.types @@ -0,0 +1,169 @@ +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +=== computedPropertiesNarrowed.ts === +const x: 0 | 1 = Math.random()? 0: 1; +>x : 0 | 1 +>Math.random()? 0: 1 : 0 | 1 +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +>0 : 0 +>1 : 1 + +declare function assert(n: number): asserts n is 1; +>assert : (n: number) => asserts n is 1 +>n : number + +assert(x); +>assert(x) : void +>assert : (n: number) => asserts n is 1 +>x : 0 | 1 + +export let o = { +>o : { 1: number; } +>{ [x]: 1 // error narrow type !== declared type} : { 1: number; } + + [x]: 1 // error narrow type !== declared type +>[x] : number +>x : 1 +>1 : 1 +} + + +const y: 0 = 0 +>y : 0 +>0 : 0 + +export let o2 = { +>o2 : { 0: number; } +>{ [y]: 1 // ok literal computed type } : { 0: number; } + + [y]: 1 // ok literal computed type +>[y] : number +>y : 0 +>1 : 1 +} + +// literals are ok +export let o3 = { [1]: 1 } +>o3 : { 1: number; } +>{ [1]: 1 } : { 1: number; } +>[1] : number +>1 : 1 +>1 : 1 + +export let o31 = { [-1]: 1 } +>o31 : { [-1]: number; } +>{ [-1]: 1 } : { [-1]: number; } +>[-1] : number +>-1 : -1 +>1 : 1 +>1 : 1 + +export let o32 = { [1-1]: 1 } // error number +>o32 : { [x: number]: number; } +>{ [1-1]: 1 } : { [x: number]: number; } +>[1-1] : number +>1-1 : number +>1 : 1 +>1 : 1 +>1 : 1 + +let u = Symbol(); +>u : symbol +>Symbol() : symbol +>Symbol : SymbolConstructor + +export let o4 = { +>o4 : { [x: symbol]: number; } +>{ [u]: 1 // Should error, nut a unique symbol} : { [x: symbol]: number; } + + [u]: 1 // Should error, nut a unique symbol +>[u] : number +>u : symbol +>1 : 1 +} + +export let o5 ={ +>o5 : { [x: symbol]: number; } +>{ [Symbol()]: 1 // Should error} : { [x: symbol]: number; } + + [Symbol()]: 1 // Should error +>[Symbol()] : number +>Symbol() : symbol +>Symbol : SymbolConstructor +>1 : 1 +} + +const uu: unique symbol = Symbol(); +>uu : unique symbol +>Symbol() : unique symbol +>Symbol : SymbolConstructor + +export let o6 = { +>o6 : { [uu]: number; } +>{ [uu]: 1 // Should be ok} : { [uu]: number; } + + [uu]: 1 // Should be ok +>[uu] : number +>uu : unique symbol +>1 : 1 +} + + +function foo (): 1 { return 1; } +>foo : () => 1 +>1 : 1 + +export let o7 = { +>o7 : { 1: number; } +>{ [foo()]: 1 // Should error} : { 1: number; } + + [foo()]: 1 // Should error +>[foo()] : number +>foo() : 1 +>foo : () => 1 +>1 : 1 + +}; + +let E = { A: 1 } as const +>E : { readonly A: 1; } +>{ A: 1 } as const : { readonly A: 1; } +>{ A: 1 } : { readonly A: 1; } +>A : 1 +>1 : 1 + +export const o8 = { +>o8 : { 1: number; } +>{ [E.A]: 1 // Fresh } : { 1: number; } + + [E.A]: 1 // Fresh +>[E.A] : number +>E.A : 1 +>E : { readonly A: 1; } +>A : 1 +>1 : 1 +} + +function ns() { return { v: 0 } as const } +>ns : () => { readonly v: 0; } +>{ v: 0 } as const : { readonly v: 0; } +>{ v: 0 } : { readonly v: 0; } +>v : 0 +>0 : 0 + +export const o9 = { +>o9 : { 0: number; } +>{ [ns().v]: 1} : { 0: number; } + + [ns().v]: 1 +>[ns().v] : number +>ns().v : 0 +>ns() : { readonly v: 0; } +>ns : () => { readonly v: 0; } +>v : 0 +>1 : 1 +} + diff --git a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.errors.txt b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.errors.txt index 466c66649665c..759a77a808c40 100644 --- a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.errors.txt @@ -1,30 +1,34 @@ -computedPropertyNamesWithStaticProperty.ts(3,10): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(6,10): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(9,6): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(14,10): error TS2449: Class 'C2' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(17,10): error TS2449: Class 'C2' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(20,6): error TS2449: Class 'C2' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +computedPropertyNamesWithStaticProperty.ts(4,10): error TS2449: Class 'C1' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(7,10): error TS2449: Class 'C1' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(10,6): error TS2449: Class 'C1' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(15,10): error TS2449: Class 'C2' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(18,10): error TS2449: Class 'C2' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used before its declaration. -==== computedPropertyNamesWithStaticProperty.ts (6 errors) ==== +==== computedPropertyNamesWithStaticProperty.ts (7 errors) ==== + class C { class C1 { + ~~~~~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. static staticProp = 10; get [C1.staticProp]() { ~~ !!! error TS2449: Class 'C1' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C1' is declared here. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. return "hello"; } set [C1.staticProp](x: string) { ~~ !!! error TS2449: Class 'C1' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C1' is declared here. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. var y = x; } [C1.staticProp]() { } ~~ !!! error TS2449: Class 'C1' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C1' is declared here. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. } (class C2 { @@ -32,18 +36,18 @@ computedPropertyNamesWithStaticProperty.ts(20,6): error TS2449: Class 'C2' used get [C2.staticProp]() { ~~ !!! error TS2449: Class 'C2' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:12:8: 'C2' is declared here. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:13:8: 'C2' is declared here. return "hello"; } set [C2.staticProp](x: string) { ~~ !!! error TS2449: Class 'C2' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:12:8: 'C2' is declared here. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:13:8: 'C2' is declared here. var y = x; } [C2.staticProp]() { } ~~ !!! error TS2449: Class 'C2' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:12:8: 'C2' is declared here. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:13:8: 'C2' is declared here. }) \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js index 63068159d9039..571ad60ca0574 100644 --- a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js +++ b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js @@ -1,6 +1,7 @@ //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// //// [computedPropertyNamesWithStaticProperty.ts] +class C { class C1 { static staticProp = 10; get [C1.staticProp]() { @@ -26,6 +27,8 @@ class C1 { //// [computedPropertyNamesWithStaticProperty.js] var _a; +class C { +} class C1 { get [C1.staticProp]() { return "hello"; diff --git a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.symbols b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.symbols index 42410e531ebc2..fe49c5374e53a 100644 --- a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.symbols +++ b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.symbols @@ -1,68 +1,71 @@ //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// === computedPropertyNamesWithStaticProperty.ts === +class C { +>C : Symbol(C, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 0)) + class C1 { ->C1 : Symbol(C1, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 0)) +>C1 : Symbol(C1, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 9)) static staticProp = 10; ->staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 10)) +>staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 1, 10)) get [C1.staticProp]() { ->[C1.staticProp] : Symbol(C1[C1.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 1, 27)) ->C1.staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 10)) ->C1 : Symbol(C1, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 0)) ->staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 10)) +>[C1.staticProp] : Symbol(C1[C1.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 2, 27)) +>C1.staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 1, 10)) +>C1 : Symbol(C1, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 9)) +>staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 1, 10)) return "hello"; } set [C1.staticProp](x: string) { ->[C1.staticProp] : Symbol(C1[C1.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 4, 5)) ->C1.staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 10)) ->C1 : Symbol(C1, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 0)) ->staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 10)) ->x : Symbol(x, Decl(computedPropertyNamesWithStaticProperty.ts, 5, 24)) +>[C1.staticProp] : Symbol(C1[C1.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 5, 5)) +>C1.staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 1, 10)) +>C1 : Symbol(C1, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 9)) +>staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 1, 10)) +>x : Symbol(x, Decl(computedPropertyNamesWithStaticProperty.ts, 6, 24)) var y = x; ->y : Symbol(y, Decl(computedPropertyNamesWithStaticProperty.ts, 6, 11)) ->x : Symbol(x, Decl(computedPropertyNamesWithStaticProperty.ts, 5, 24)) +>y : Symbol(y, Decl(computedPropertyNamesWithStaticProperty.ts, 7, 11)) +>x : Symbol(x, Decl(computedPropertyNamesWithStaticProperty.ts, 6, 24)) } [C1.staticProp]() { } ->[C1.staticProp] : Symbol(C1[C1.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 7, 5)) ->C1.staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 10)) ->C1 : Symbol(C1, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 0)) ->staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 10)) +>[C1.staticProp] : Symbol(C1[C1.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 8, 5)) +>C1.staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 1, 10)) +>C1 : Symbol(C1, Decl(computedPropertyNamesWithStaticProperty.ts, 0, 9)) +>staticProp : Symbol(C1.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 1, 10)) } (class C2 { ->C2 : Symbol(C2, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 1)) +>C2 : Symbol(C2, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 1)) static staticProp = 10; ->staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 11)) +>staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 11)) get [C2.staticProp]() { ->[C2.staticProp] : Symbol(C2[C2.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 12, 27)) ->C2.staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 11)) ->C2 : Symbol(C2, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 1)) ->staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 11)) +>[C2.staticProp] : Symbol(C2[C2.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 13, 27)) +>C2.staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 11)) +>C2 : Symbol(C2, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 1)) +>staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 11)) return "hello"; } set [C2.staticProp](x: string) { ->[C2.staticProp] : Symbol(C2[C2.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 15, 5)) ->C2.staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 11)) ->C2 : Symbol(C2, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 1)) ->staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 11)) ->x : Symbol(x, Decl(computedPropertyNamesWithStaticProperty.ts, 16, 24)) +>[C2.staticProp] : Symbol(C2[C2.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 16, 5)) +>C2.staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 11)) +>C2 : Symbol(C2, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 1)) +>staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 11)) +>x : Symbol(x, Decl(computedPropertyNamesWithStaticProperty.ts, 17, 24)) var y = x; ->y : Symbol(y, Decl(computedPropertyNamesWithStaticProperty.ts, 17, 11)) ->x : Symbol(x, Decl(computedPropertyNamesWithStaticProperty.ts, 16, 24)) +>y : Symbol(y, Decl(computedPropertyNamesWithStaticProperty.ts, 18, 11)) +>x : Symbol(x, Decl(computedPropertyNamesWithStaticProperty.ts, 17, 24)) } [C2.staticProp]() { } ->[C2.staticProp] : Symbol(C2[C2.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 18, 5)) ->C2.staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 11)) ->C2 : Symbol(C2, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 1)) ->staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 11, 11)) +>[C2.staticProp] : Symbol(C2[C2.staticProp], Decl(computedPropertyNamesWithStaticProperty.ts, 19, 5)) +>C2.staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 11)) +>C2 : Symbol(C2, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 1)) +>staticProp : Symbol(C2.staticProp, Decl(computedPropertyNamesWithStaticProperty.ts, 12, 11)) }) diff --git a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types index 00d4cdf9e214d..781fc901405b6 100644 --- a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types +++ b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types @@ -1,6 +1,9 @@ //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// === computedPropertyNamesWithStaticProperty.ts === +class C { +>C : C + class C1 { >C1 : C1 diff --git a/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json index e075f973c4d28..4d0e7a4c4b588 100644 --- a/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json index e075f973c4d28..4d0e7a4c4b588 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json index e075f973c4d28..4d0e7a4c4b588 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json index 3379ad1a3b576..40f6b15824cc0 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index e9e873054b703..0d38096edc957 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 178abdeca2791..59d6ed817725b 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json index 6136a0e0ce953..fbce4f1f879bf 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 84bdc4354ee70..a990843d5e987 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index e075f973c4d28..4d0e7a4c4b588 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 8b051d2b3dd93..cb560621aa99d 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json index c0c664e0d7c8a..fd2e4b5228724 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -76,6 +76,7 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Ensure that each file can have declaration emit generated without type information */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ diff --git a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedDeclarations/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedDeclarations/tsconfig.json new file mode 100644 index 0000000000000..32cc784bec987 --- /dev/null +++ b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedDeclarations/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "isolatedDeclarations": true + } +} diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js index 3bcdba587ec86..961de87f1f567 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js @@ -17,7 +17,7 @@ declare let dec: any; @dec export default class C {} -//// [c.ts] +//// [d.ts] declare let dec: any; @dec export default class {} @@ -62,6 +62,25 @@ let C = (() => { })(); export { C }; //// [c.js] +let C = (() => { + let _classDecorators = [dec]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + var C = _classThis = class { + }; + __setFunctionName(_classThis, "C"); + (() => { + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); + __runInitializers(_classThis, _classExtraInitializers); + })(); + return C = _classThis; +})(); +export default C; +//// [d.js] export default (() => { let _classDecorators = [dec]; let _classDescriptor; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js index 2569ebe10eeb2..1d20151d0028e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js @@ -17,7 +17,7 @@ declare let dec: any; @dec export default class C {} -//// [c.ts] +//// [d.ts] declare let dec: any; @dec export default class {} @@ -62,6 +62,25 @@ let C = (() => { })(); export { C }; //// [c.js] +let C = (() => { + let _classDecorators = [dec]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + var C = class { + static { _classThis = this; } + static { + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); + __runInitializers(_classThis, _classExtraInitializers); + } + }; + return C = _classThis; +})(); +export default C; +//// [d.js] export default (() => { let _classDecorators = [dec]; let _classDescriptor; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js index 226f4e24f8d75..53320d7ba25a8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js @@ -17,7 +17,7 @@ declare let dec: any; @dec export default class C {} -//// [c.ts] +//// [d.ts] declare let dec: any; @dec export default class {} @@ -74,6 +74,30 @@ exports.C = C; //// [c.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +var C = function () { + var _classDecorators = [dec]; + var _classDescriptor; + var _classExtraInitializers = []; + var _classThis; + var C = _classThis = /** @class */ (function () { + function C_1() { + } + return C_1; + }()); + __setFunctionName(_classThis, "C"); + (function () { + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); + __runInitializers(_classThis, _classExtraInitializers); + })(); + return C = _classThis; +}(); +exports.default = C; +//// [d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); var default_1 = function () { var _classDecorators = [dec]; var _classDescriptor; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=esnext).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=esnext).js index 6c0889fa38717..7e03d766face5 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=esnext).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=esnext).js @@ -17,7 +17,7 @@ declare let dec: any; @dec export default class C {} -//// [c.ts] +//// [d.ts] declare let dec: any; @dec export default class {} @@ -34,5 +34,9 @@ export class C { } //// [c.js] @dec +export default class C { +} +//// [d.js] +@dec export default class { } diff --git a/tests/baselines/reference/expandoFunctionNestedAssigments.errors.txt b/tests/baselines/reference/expandoFunctionNestedAssigments.errors.txt new file mode 100644 index 0000000000000..86cf666fbd3b4 --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.errors.txt @@ -0,0 +1,57 @@ +expandoFunctionNestedAssigments.ts(7,23): error TS2339: Property 'inNestedFunction' does not exist on type 'typeof Foo'. + + +==== expandoFunctionNestedAssigments.ts (1 errors) ==== + function Foo(): void { + + } + let d: number = (Foo.inVariableInit = 1); + + + function bar(p = (Foo.inNestedFunction = 1)) { + ~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'inNestedFunction' does not exist on type 'typeof Foo'. + + } + + (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + + if(Foo.fromIf = 1) { + Foo.inIf = 1; + } + + while(Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } + } + + do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } + } while(Foo.fromDoCondition = 1); + + for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } + } + + for(let f of (Foo.forOf = []) ){ + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } + } + + + for(let f in (Foo.forIn = []) ){ + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/expandoFunctionNestedAssigments.js b/tests/baselines/reference/expandoFunctionNestedAssigments.js new file mode 100644 index 0000000000000..fe8b13b3a919e --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.js @@ -0,0 +1,130 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +//// [expandoFunctionNestedAssigments.ts] +function Foo(): void { + +} +let d: number = (Foo.inVariableInit = 1); + + +function bar(p = (Foo.inNestedFunction = 1)) { + +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + +if(Foo.fromIf = 1) { + Foo.inIf = 1; +} + +while(Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } +} + +do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } +} while(Foo.fromDoCondition = 1); + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } +} + +for(let f of (Foo.forOf = []) ){ + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } +} + + +for(let f in (Foo.forIn = []) ){ + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } +} + +//// [expandoFunctionNestedAssigments.js] +function Foo() { +} +var d = (Foo.inVariableInit = 1); +function bar(p) { + if (p === void 0) { p = (Foo.inNestedFunction = 1); } +} +(Foo.bla = { foo: 1 }).foo = (Foo.baz = 1) + (Foo.bar = 0); +if (Foo.fromIf = 1) { + Foo.inIf = 1; +} +while (Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } +} +do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } +} while (Foo.fromDoCondition = 1); +for (Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1) { + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } +} +for (var _i = 0, _a = (Foo.forOf = []); _i < _a.length; _i++) { + var f = _a[_i]; + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } +} +for (var f in (Foo.forIn = [])) { + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } +} + + +//// [expandoFunctionNestedAssigments.d.ts] +declare function Foo(): void; +declare namespace Foo { + var inVariableInit: number; + var bla: { + foo: number; + }; + var baz: number; + var bar: number; + var fromIf: number; + var inIf: number; + var fromWhileCondition: number; + var fromWhileBody: number; + var fromWhileBodyNested: number; + var fromDoBody: number; + var fromDoBodyNested: number; + var fromDoCondition: number; + var forInit: number; + var forCond: number; + var fromForBody: number; + var fromForBodyNested: number; + var forIncr: number; + var forOf: any[]; + var fromForOfBody: number; + var fromForOfBodyNested: number; + var forIn: any[]; + var fromForInBody: number; + var fromForInBodyNested: number; +} +declare let d: number; +declare function bar(p?: number): void; diff --git a/tests/baselines/reference/expandoFunctionNestedAssigments.symbols b/tests/baselines/reference/expandoFunctionNestedAssigments.symbols new file mode 100644 index 0000000000000..6c91cc3b68c52 --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.symbols @@ -0,0 +1,138 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +=== expandoFunctionNestedAssigments.ts === +function Foo(): void { +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) + +} +let d: number = (Foo.inVariableInit = 1); +>d : Symbol(d, Decl(expandoFunctionNestedAssigments.ts, 3, 3)) +>Foo.inVariableInit : Symbol(Foo.inVariableInit, Decl(expandoFunctionNestedAssigments.ts, 3, 17)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>inVariableInit : Symbol(Foo.inVariableInit, Decl(expandoFunctionNestedAssigments.ts, 3, 17)) + + +function bar(p = (Foo.inNestedFunction = 1)) { +>bar : Symbol(bar, Decl(expandoFunctionNestedAssigments.ts, 3, 41)) +>p : Symbol(p, Decl(expandoFunctionNestedAssigments.ts, 6, 13)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) + +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); +>(Foo.bla = { foo: 1}).foo : Symbol(foo, Decl(expandoFunctionNestedAssigments.ts, 10, 12)) +>Foo.bla : Symbol(Foo.bla, Decl(expandoFunctionNestedAssigments.ts, 10, 1)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>bla : Symbol(Foo.bla, Decl(expandoFunctionNestedAssigments.ts, 10, 1)) +>foo : Symbol(foo, Decl(expandoFunctionNestedAssigments.ts, 10, 12)) +>foo : Symbol(foo, Decl(expandoFunctionNestedAssigments.ts, 10, 12)) +>Foo.baz : Symbol(Foo.baz, Decl(expandoFunctionNestedAssigments.ts, 10, 29)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>baz : Symbol(Foo.baz, Decl(expandoFunctionNestedAssigments.ts, 10, 29)) +>Foo.bar : Symbol(Foo.bar, Decl(expandoFunctionNestedAssigments.ts, 10, 45)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>bar : Symbol(Foo.bar, Decl(expandoFunctionNestedAssigments.ts, 10, 45)) + +if(Foo.fromIf = 1) { +>Foo.fromIf : Symbol(Foo.fromIf, Decl(expandoFunctionNestedAssigments.ts, 12, 3)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromIf : Symbol(Foo.fromIf, Decl(expandoFunctionNestedAssigments.ts, 12, 3)) + + Foo.inIf = 1; +>Foo.inIf : Symbol(Foo.inIf, Decl(expandoFunctionNestedAssigments.ts, 12, 20)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>inIf : Symbol(Foo.inIf, Decl(expandoFunctionNestedAssigments.ts, 12, 20)) +} + +while(Foo.fromWhileCondition = 1) { +>Foo.fromWhileCondition : Symbol(Foo.fromWhileCondition, Decl(expandoFunctionNestedAssigments.ts, 16, 6)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromWhileCondition : Symbol(Foo.fromWhileCondition, Decl(expandoFunctionNestedAssigments.ts, 16, 6)) + + Foo.fromWhileBody = 1; +>Foo.fromWhileBody : Symbol(Foo.fromWhileBody, Decl(expandoFunctionNestedAssigments.ts, 16, 35)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromWhileBody : Symbol(Foo.fromWhileBody, Decl(expandoFunctionNestedAssigments.ts, 16, 35)) + { + Foo.fromWhileBodyNested = 1; +>Foo.fromWhileBodyNested : Symbol(Foo.fromWhileBodyNested, Decl(expandoFunctionNestedAssigments.ts, 18, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromWhileBodyNested : Symbol(Foo.fromWhileBodyNested, Decl(expandoFunctionNestedAssigments.ts, 18, 5)) + } +} + +do { + Foo.fromDoBody = 1; +>Foo.fromDoBody : Symbol(Foo.fromDoBody, Decl(expandoFunctionNestedAssigments.ts, 23, 4)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromDoBody : Symbol(Foo.fromDoBody, Decl(expandoFunctionNestedAssigments.ts, 23, 4)) + { + Foo.fromDoBodyNested = 1; +>Foo.fromDoBodyNested : Symbol(Foo.fromDoBodyNested, Decl(expandoFunctionNestedAssigments.ts, 25, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromDoBodyNested : Symbol(Foo.fromDoBodyNested, Decl(expandoFunctionNestedAssigments.ts, 25, 5)) + } +} while(Foo.fromDoCondition = 1); +>Foo.fromDoCondition : Symbol(Foo.fromDoCondition, Decl(expandoFunctionNestedAssigments.ts, 28, 8)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromDoCondition : Symbol(Foo.fromDoCondition, Decl(expandoFunctionNestedAssigments.ts, 28, 8)) + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ +>Foo.forInit : Symbol(Foo.forInit, Decl(expandoFunctionNestedAssigments.ts, 30, 4)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>forInit : Symbol(Foo.forInit, Decl(expandoFunctionNestedAssigments.ts, 30, 4)) +>Foo.forCond : Symbol(Foo.forCond, Decl(expandoFunctionNestedAssigments.ts, 30, 22)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>forCond : Symbol(Foo.forCond, Decl(expandoFunctionNestedAssigments.ts, 30, 22)) +>Foo.forIncr : Symbol(Foo.forIncr, Decl(expandoFunctionNestedAssigments.ts, 30, 43)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>forIncr : Symbol(Foo.forIncr, Decl(expandoFunctionNestedAssigments.ts, 30, 43)) + + Foo.fromForBody = 1; +>Foo.fromForBody : Symbol(Foo.fromForBody, Decl(expandoFunctionNestedAssigments.ts, 30, 61)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromForBody : Symbol(Foo.fromForBody, Decl(expandoFunctionNestedAssigments.ts, 30, 61)) + { + Foo.fromForBodyNested = 1; +>Foo.fromForBodyNested : Symbol(Foo.fromForBodyNested, Decl(expandoFunctionNestedAssigments.ts, 32, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromForBodyNested : Symbol(Foo.fromForBodyNested, Decl(expandoFunctionNestedAssigments.ts, 32, 5)) + } +} + +for(let f of (Foo.forOf = []) ){ +>f : Symbol(f, Decl(expandoFunctionNestedAssigments.ts, 37, 7)) +>Foo.forOf : Symbol(Foo.forOf, Decl(expandoFunctionNestedAssigments.ts, 37, 14)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>forOf : Symbol(Foo.forOf, Decl(expandoFunctionNestedAssigments.ts, 37, 14)) + + Foo.fromForOfBody = 1; +>Foo.fromForOfBody : Symbol(Foo.fromForOfBody, Decl(expandoFunctionNestedAssigments.ts, 37, 32)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromForOfBody : Symbol(Foo.fromForOfBody, Decl(expandoFunctionNestedAssigments.ts, 37, 32)) + { + Foo.fromForOfBodyNested = 1; +>Foo.fromForOfBodyNested : Symbol(Foo.fromForOfBodyNested, Decl(expandoFunctionNestedAssigments.ts, 39, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromForOfBodyNested : Symbol(Foo.fromForOfBodyNested, Decl(expandoFunctionNestedAssigments.ts, 39, 5)) + } +} + + +for(let f in (Foo.forIn = []) ){ +>f : Symbol(f, Decl(expandoFunctionNestedAssigments.ts, 45, 7)) +>Foo.forIn : Symbol(Foo.forIn, Decl(expandoFunctionNestedAssigments.ts, 45, 14)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>forIn : Symbol(Foo.forIn, Decl(expandoFunctionNestedAssigments.ts, 45, 14)) + + Foo.fromForInBody = 1; +>Foo.fromForInBody : Symbol(Foo.fromForInBody, Decl(expandoFunctionNestedAssigments.ts, 45, 32)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromForInBody : Symbol(Foo.fromForInBody, Decl(expandoFunctionNestedAssigments.ts, 45, 32)) + { + Foo.fromForInBodyNested = 1; +>Foo.fromForInBodyNested : Symbol(Foo.fromForInBodyNested, Decl(expandoFunctionNestedAssigments.ts, 47, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 12, 3), Decl(expandoFunctionNestedAssigments.ts, 16, 6), Decl(expandoFunctionNestedAssigments.ts, 28, 8), Decl(expandoFunctionNestedAssigments.ts, 30, 4) ... and 1 more) +>fromForInBodyNested : Symbol(Foo.fromForInBodyNested, Decl(expandoFunctionNestedAssigments.ts, 47, 5)) + } +} diff --git a/tests/baselines/reference/expandoFunctionNestedAssigments.types b/tests/baselines/reference/expandoFunctionNestedAssigments.types new file mode 100644 index 0000000000000..2c4a0d7edd98d --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.types @@ -0,0 +1,201 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +=== expandoFunctionNestedAssigments.ts === +function Foo(): void { +>Foo : typeof Foo + +} +let d: number = (Foo.inVariableInit = 1); +>d : number +>(Foo.inVariableInit = 1) : 1 +>Foo.inVariableInit = 1 : 1 +>Foo.inVariableInit : number +>Foo : typeof Foo +>inVariableInit : number +>1 : 1 + + +function bar(p = (Foo.inNestedFunction = 1)) { +>bar : (p?: number) => void +>p : number +>(Foo.inNestedFunction = 1) : 1 +>Foo.inNestedFunction = 1 : 1 +>Foo.inNestedFunction : any +>Foo : typeof Foo +>inNestedFunction : any +>1 : 1 + +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); +>(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0) : number +>(Foo.bla = { foo: 1}).foo : number +>(Foo.bla = { foo: 1}) : { foo: number; } +>Foo.bla = { foo: 1} : { foo: number; } +>Foo.bla : { foo: number; } +>Foo : typeof Foo +>bla : { foo: number; } +>{ foo: 1} : { foo: number; } +>foo : number +>1 : 1 +>foo : number +>(Foo.baz = 1) + (Foo.bar = 0) : number +>(Foo.baz = 1) : 1 +>Foo.baz = 1 : 1 +>Foo.baz : number +>Foo : typeof Foo +>baz : number +>1 : 1 +>(Foo.bar = 0) : 0 +>Foo.bar = 0 : 0 +>Foo.bar : number +>Foo : typeof Foo +>bar : number +>0 : 0 + +if(Foo.fromIf = 1) { +>Foo.fromIf = 1 : 1 +>Foo.fromIf : number +>Foo : typeof Foo +>fromIf : number +>1 : 1 + + Foo.inIf = 1; +>Foo.inIf = 1 : 1 +>Foo.inIf : number +>Foo : typeof Foo +>inIf : number +>1 : 1 +} + +while(Foo.fromWhileCondition = 1) { +>Foo.fromWhileCondition = 1 : 1 +>Foo.fromWhileCondition : number +>Foo : typeof Foo +>fromWhileCondition : number +>1 : 1 + + Foo.fromWhileBody = 1; +>Foo.fromWhileBody = 1 : 1 +>Foo.fromWhileBody : number +>Foo : typeof Foo +>fromWhileBody : number +>1 : 1 + { + Foo.fromWhileBodyNested = 1; +>Foo.fromWhileBodyNested = 1 : 1 +>Foo.fromWhileBodyNested : number +>Foo : typeof Foo +>fromWhileBodyNested : number +>1 : 1 + } +} + +do { + Foo.fromDoBody = 1; +>Foo.fromDoBody = 1 : 1 +>Foo.fromDoBody : number +>Foo : typeof Foo +>fromDoBody : number +>1 : 1 + { + Foo.fromDoBodyNested = 1; +>Foo.fromDoBodyNested = 1 : 1 +>Foo.fromDoBodyNested : number +>Foo : typeof Foo +>fromDoBodyNested : number +>1 : 1 + } +} while(Foo.fromDoCondition = 1); +>Foo.fromDoCondition = 1 : 1 +>Foo.fromDoCondition : number +>Foo : typeof Foo +>fromDoCondition : number +>1 : 1 + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ +>Foo.forInit = 1 : 1 +>Foo.forInit : number +>Foo : typeof Foo +>forInit : number +>1 : 1 +>(Foo.forCond = 1) > 1 : boolean +>(Foo.forCond = 1) : 1 +>Foo.forCond = 1 : 1 +>Foo.forCond : number +>Foo : typeof Foo +>forCond : number +>1 : 1 +>1 : 1 +>Foo.forIncr = 1 : 1 +>Foo.forIncr : number +>Foo : typeof Foo +>forIncr : number +>1 : 1 + + Foo.fromForBody = 1; +>Foo.fromForBody = 1 : 1 +>Foo.fromForBody : number +>Foo : typeof Foo +>fromForBody : number +>1 : 1 + { + Foo.fromForBodyNested = 1; +>Foo.fromForBodyNested = 1 : 1 +>Foo.fromForBodyNested : number +>Foo : typeof Foo +>fromForBodyNested : number +>1 : 1 + } +} + +for(let f of (Foo.forOf = []) ){ +>f : any +>(Foo.forOf = []) : undefined[] +>Foo.forOf = [] : undefined[] +>Foo.forOf : any[] +>Foo : typeof Foo +>forOf : any[] +>[] : undefined[] + + Foo.fromForOfBody = 1; +>Foo.fromForOfBody = 1 : 1 +>Foo.fromForOfBody : number +>Foo : typeof Foo +>fromForOfBody : number +>1 : 1 + { + Foo.fromForOfBodyNested = 1; +>Foo.fromForOfBodyNested = 1 : 1 +>Foo.fromForOfBodyNested : number +>Foo : typeof Foo +>fromForOfBodyNested : number +>1 : 1 + } +} + + +for(let f in (Foo.forIn = []) ){ +>f : string +>(Foo.forIn = []) : undefined[] +>Foo.forIn = [] : undefined[] +>Foo.forIn : any[] +>Foo : typeof Foo +>forIn : any[] +>[] : undefined[] + + Foo.fromForInBody = 1; +>Foo.fromForInBody = 1 : 1 +>Foo.fromForInBody : number +>Foo : typeof Foo +>fromForInBody : number +>1 : 1 + { + Foo.fromForInBodyNested = 1; +>Foo.fromForInBodyNested = 1 : 1 +>Foo.fromForInBodyNested : number +>Foo : typeof Foo +>fromForInBodyNested : number +>1 : 1 + } +} diff --git a/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.js b/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.js new file mode 100644 index 0000000000000..31245f44ced26 --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.js @@ -0,0 +1,143 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigmentsDeclared.ts] //// + +//// [expandoFunctionNestedAssigmentsDeclared.ts] +function Foo(): void { + +} +declare namespace Foo { + var bla: { + foo: number; + }; + var baz: number; + var bar: number; + var fromIf: number; + var inIf: number; + var fromWhileCondition: number; + var fromWhileBody: number; + var fromWhileBodyNested: number; + var fromDoBody: number; + var fromDoBodyNested: number; + var fromDoCondition: number; + var forInit: number; + var forCond: number; + var fromForBody: number; + var fromForBodyNested: number; + var forIncr: number; + var forOf: any[]; + var fromForOfBody: number; + var fromForOfBodyNested: number; + var forIn: any[]; + var fromForInBody: number; + var fromForInBodyNested: number; +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + +if(Foo.fromIf = 1) { + Foo.inIf = 1; +} + +while(Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } +} + +do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } +} while(Foo.fromDoCondition = 1); + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } +} + +for(let f of (Foo.forOf = []) ){ + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } +} + + +for(let f in (Foo.forIn = []) ){ + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } +} + +//// [expandoFunctionNestedAssigmentsDeclared.js] +function Foo() { +} +(Foo.bla = { foo: 1 }).foo = (Foo.baz = 1) + (Foo.bar = 0); +if (Foo.fromIf = 1) { + Foo.inIf = 1; +} +while (Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } +} +do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } +} while (Foo.fromDoCondition = 1); +for (Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1) { + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } +} +for (var _i = 0, _a = (Foo.forOf = []); _i < _a.length; _i++) { + var f = _a[_i]; + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } +} +for (var f in (Foo.forIn = [])) { + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } +} + + +//// [expandoFunctionNestedAssigmentsDeclared.d.ts] +declare function Foo(): void; +declare namespace Foo { + var bla: { + foo: number; + }; + var baz: number; + var bar: number; + var fromIf: number; + var inIf: number; + var fromWhileCondition: number; + var fromWhileBody: number; + var fromWhileBodyNested: number; + var fromDoBody: number; + var fromDoBodyNested: number; + var fromDoCondition: number; + var forInit: number; + var forCond: number; + var fromForBody: number; + var fromForBodyNested: number; + var forIncr: number; + var forOf: any[]; + var fromForOfBody: number; + var fromForOfBodyNested: number; + var forIn: any[]; + var fromForInBody: number; + var fromForInBodyNested: number; +} diff --git a/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.symbols b/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.symbols new file mode 100644 index 0000000000000..8bbec04eff4dd --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.symbols @@ -0,0 +1,198 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigmentsDeclared.ts] //// + +=== expandoFunctionNestedAssigmentsDeclared.ts === +function Foo(): void { +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) + +} +declare namespace Foo { +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) + + var bla: { +>bla : Symbol(bla, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 4, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 1)) + + foo: number; +>foo : Symbol(foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 4, 14)) + + }; + var baz: number; +>baz : Symbol(baz, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 7, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 29)) + + var bar: number; +>bar : Symbol(bar, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 8, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 45)) + + var fromIf: number; +>fromIf : Symbol(fromIf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 9, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3)) + + var inIf: number; +>inIf : Symbol(inIf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 10, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 20)) + + var fromWhileCondition: number; +>fromWhileCondition : Symbol(fromWhileCondition, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 11, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6)) + + var fromWhileBody: number; +>fromWhileBody : Symbol(fromWhileBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 12, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 35)) + + var fromWhileBodyNested: number; +>fromWhileBodyNested : Symbol(fromWhileBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 13, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 38, 5)) + + var fromDoBody: number; +>fromDoBody : Symbol(fromDoBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 14, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 43, 4)) + + var fromDoBodyNested: number; +>fromDoBodyNested : Symbol(fromDoBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 15, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 45, 5)) + + var fromDoCondition: number; +>fromDoCondition : Symbol(fromDoCondition, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 16, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8)) + + var forInit: number; +>forInit : Symbol(forInit, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 17, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 4)) + + var forCond: number; +>forCond : Symbol(forCond, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 18, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 22)) + + var fromForBody: number; +>fromForBody : Symbol(fromForBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 19, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 61)) + + var fromForBodyNested: number; +>fromForBodyNested : Symbol(fromForBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 20, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 52, 5)) + + var forIncr: number; +>forIncr : Symbol(forIncr, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 21, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 43)) + + var forOf: any[]; +>forOf : Symbol(forOf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 22, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 57, 14)) + + var fromForOfBody: number; +>fromForOfBody : Symbol(fromForOfBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 23, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 57, 32)) + + var fromForOfBodyNested: number; +>fromForOfBodyNested : Symbol(fromForOfBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 24, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 59, 5)) + + var forIn: any[]; +>forIn : Symbol(forIn, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 25, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 65, 14)) + + var fromForInBody: number; +>fromForInBody : Symbol(fromForInBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 26, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 65, 32)) + + var fromForInBodyNested: number; +>fromForInBodyNested : Symbol(fromForInBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 27, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 67, 5)) +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); +>(Foo.bla = { foo: 1}).foo : Symbol(foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 12)) +>Foo.bla : Symbol(Foo.bla, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 4, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 1)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>bla : Symbol(Foo.bla, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 4, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 1)) +>foo : Symbol(foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 12)) +>foo : Symbol(foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 12)) +>Foo.baz : Symbol(Foo.baz, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 7, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 29)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>baz : Symbol(Foo.baz, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 7, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 29)) +>Foo.bar : Symbol(Foo.bar, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 8, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 45)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>bar : Symbol(Foo.bar, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 8, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 30, 45)) + +if(Foo.fromIf = 1) { +>Foo.fromIf : Symbol(Foo.fromIf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 9, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromIf : Symbol(Foo.fromIf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 9, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3)) + + Foo.inIf = 1; +>Foo.inIf : Symbol(Foo.inIf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 10, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 20)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>inIf : Symbol(Foo.inIf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 10, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 20)) +} + +while(Foo.fromWhileCondition = 1) { +>Foo.fromWhileCondition : Symbol(Foo.fromWhileCondition, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 11, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromWhileCondition : Symbol(Foo.fromWhileCondition, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 11, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6)) + + Foo.fromWhileBody = 1; +>Foo.fromWhileBody : Symbol(Foo.fromWhileBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 12, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 35)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromWhileBody : Symbol(Foo.fromWhileBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 12, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 35)) + { + Foo.fromWhileBodyNested = 1; +>Foo.fromWhileBodyNested : Symbol(Foo.fromWhileBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 13, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 38, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromWhileBodyNested : Symbol(Foo.fromWhileBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 13, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 38, 5)) + } +} + +do { + Foo.fromDoBody = 1; +>Foo.fromDoBody : Symbol(Foo.fromDoBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 14, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 43, 4)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromDoBody : Symbol(Foo.fromDoBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 14, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 43, 4)) + { + Foo.fromDoBodyNested = 1; +>Foo.fromDoBodyNested : Symbol(Foo.fromDoBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 15, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 45, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromDoBodyNested : Symbol(Foo.fromDoBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 15, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 45, 5)) + } +} while(Foo.fromDoCondition = 1); +>Foo.fromDoCondition : Symbol(Foo.fromDoCondition, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 16, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromDoCondition : Symbol(Foo.fromDoCondition, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 16, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8)) + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ +>Foo.forInit : Symbol(Foo.forInit, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 17, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 4)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>forInit : Symbol(Foo.forInit, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 17, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 4)) +>Foo.forCond : Symbol(Foo.forCond, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 18, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 22)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>forCond : Symbol(Foo.forCond, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 18, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 22)) +>Foo.forIncr : Symbol(Foo.forIncr, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 21, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 43)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>forIncr : Symbol(Foo.forIncr, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 21, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 43)) + + Foo.fromForBody = 1; +>Foo.fromForBody : Symbol(Foo.fromForBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 19, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 61)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromForBody : Symbol(Foo.fromForBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 19, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 50, 61)) + { + Foo.fromForBodyNested = 1; +>Foo.fromForBodyNested : Symbol(Foo.fromForBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 20, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 52, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromForBodyNested : Symbol(Foo.fromForBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 20, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 52, 5)) + } +} + +for(let f of (Foo.forOf = []) ){ +>f : Symbol(f, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 57, 7)) +>Foo.forOf : Symbol(Foo.forOf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 22, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 57, 14)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>forOf : Symbol(Foo.forOf, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 22, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 57, 14)) + + Foo.fromForOfBody = 1; +>Foo.fromForOfBody : Symbol(Foo.fromForOfBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 23, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 57, 32)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromForOfBody : Symbol(Foo.fromForOfBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 23, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 57, 32)) + { + Foo.fromForOfBodyNested = 1; +>Foo.fromForOfBodyNested : Symbol(Foo.fromForOfBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 24, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 59, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromForOfBodyNested : Symbol(Foo.fromForOfBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 24, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 59, 5)) + } +} + + +for(let f in (Foo.forIn = []) ){ +>f : Symbol(f, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 65, 7)) +>Foo.forIn : Symbol(Foo.forIn, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 25, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 65, 14)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>forIn : Symbol(Foo.forIn, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 25, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 65, 14)) + + Foo.fromForInBody = 1; +>Foo.fromForInBody : Symbol(Foo.fromForInBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 26, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 65, 32)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromForInBody : Symbol(Foo.fromForInBody, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 26, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 65, 32)) + { + Foo.fromForInBodyNested = 1; +>Foo.fromForInBodyNested : Symbol(Foo.fromForInBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 27, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 67, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 0, 0), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 2, 1), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 32, 3), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 36, 6), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 48, 8) ... and 2 more) +>fromForInBodyNested : Symbol(Foo.fromForInBodyNested, Decl(expandoFunctionNestedAssigmentsDeclared.ts, 27, 7), Decl(expandoFunctionNestedAssigmentsDeclared.ts, 67, 5)) + } +} diff --git a/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.types b/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.types new file mode 100644 index 0000000000000..2ebc2183ab46c --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.types @@ -0,0 +1,253 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigmentsDeclared.ts] //// + +=== expandoFunctionNestedAssigmentsDeclared.ts === +function Foo(): void { +>Foo : typeof Foo + +} +declare namespace Foo { +>Foo : typeof Foo + + var bla: { +>bla : { foo: number; } + + foo: number; +>foo : number + + }; + var baz: number; +>baz : number + + var bar: number; +>bar : number + + var fromIf: number; +>fromIf : number + + var inIf: number; +>inIf : number + + var fromWhileCondition: number; +>fromWhileCondition : number + + var fromWhileBody: number; +>fromWhileBody : number + + var fromWhileBodyNested: number; +>fromWhileBodyNested : number + + var fromDoBody: number; +>fromDoBody : number + + var fromDoBodyNested: number; +>fromDoBodyNested : number + + var fromDoCondition: number; +>fromDoCondition : number + + var forInit: number; +>forInit : number + + var forCond: number; +>forCond : number + + var fromForBody: number; +>fromForBody : number + + var fromForBodyNested: number; +>fromForBodyNested : number + + var forIncr: number; +>forIncr : number + + var forOf: any[]; +>forOf : any[] + + var fromForOfBody: number; +>fromForOfBody : number + + var fromForOfBodyNested: number; +>fromForOfBodyNested : number + + var forIn: any[]; +>forIn : any[] + + var fromForInBody: number; +>fromForInBody : number + + var fromForInBodyNested: number; +>fromForInBodyNested : number +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); +>(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0) : number +>(Foo.bla = { foo: 1}).foo : number +>(Foo.bla = { foo: 1}) : { foo: number; } +>Foo.bla = { foo: 1} : { foo: number; } +>Foo.bla : { foo: number; } +>Foo : typeof Foo +>bla : { foo: number; } +>{ foo: 1} : { foo: number; } +>foo : number +>1 : 1 +>foo : number +>(Foo.baz = 1) + (Foo.bar = 0) : number +>(Foo.baz = 1) : 1 +>Foo.baz = 1 : 1 +>Foo.baz : number +>Foo : typeof Foo +>baz : number +>1 : 1 +>(Foo.bar = 0) : 0 +>Foo.bar = 0 : 0 +>Foo.bar : number +>Foo : typeof Foo +>bar : number +>0 : 0 + +if(Foo.fromIf = 1) { +>Foo.fromIf = 1 : 1 +>Foo.fromIf : number +>Foo : typeof Foo +>fromIf : number +>1 : 1 + + Foo.inIf = 1; +>Foo.inIf = 1 : 1 +>Foo.inIf : number +>Foo : typeof Foo +>inIf : number +>1 : 1 +} + +while(Foo.fromWhileCondition = 1) { +>Foo.fromWhileCondition = 1 : 1 +>Foo.fromWhileCondition : number +>Foo : typeof Foo +>fromWhileCondition : number +>1 : 1 + + Foo.fromWhileBody = 1; +>Foo.fromWhileBody = 1 : 1 +>Foo.fromWhileBody : number +>Foo : typeof Foo +>fromWhileBody : number +>1 : 1 + { + Foo.fromWhileBodyNested = 1; +>Foo.fromWhileBodyNested = 1 : 1 +>Foo.fromWhileBodyNested : number +>Foo : typeof Foo +>fromWhileBodyNested : number +>1 : 1 + } +} + +do { + Foo.fromDoBody = 1; +>Foo.fromDoBody = 1 : 1 +>Foo.fromDoBody : number +>Foo : typeof Foo +>fromDoBody : number +>1 : 1 + { + Foo.fromDoBodyNested = 1; +>Foo.fromDoBodyNested = 1 : 1 +>Foo.fromDoBodyNested : number +>Foo : typeof Foo +>fromDoBodyNested : number +>1 : 1 + } +} while(Foo.fromDoCondition = 1); +>Foo.fromDoCondition = 1 : 1 +>Foo.fromDoCondition : number +>Foo : typeof Foo +>fromDoCondition : number +>1 : 1 + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ +>Foo.forInit = 1 : 1 +>Foo.forInit : number +>Foo : typeof Foo +>forInit : number +>1 : 1 +>(Foo.forCond = 1) > 1 : boolean +>(Foo.forCond = 1) : 1 +>Foo.forCond = 1 : 1 +>Foo.forCond : number +>Foo : typeof Foo +>forCond : number +>1 : 1 +>1 : 1 +>Foo.forIncr = 1 : 1 +>Foo.forIncr : number +>Foo : typeof Foo +>forIncr : number +>1 : 1 + + Foo.fromForBody = 1; +>Foo.fromForBody = 1 : 1 +>Foo.fromForBody : number +>Foo : typeof Foo +>fromForBody : number +>1 : 1 + { + Foo.fromForBodyNested = 1; +>Foo.fromForBodyNested = 1 : 1 +>Foo.fromForBodyNested : number +>Foo : typeof Foo +>fromForBodyNested : number +>1 : 1 + } +} + +for(let f of (Foo.forOf = []) ){ +>f : any +>(Foo.forOf = []) : undefined[] +>Foo.forOf = [] : undefined[] +>Foo.forOf : any[] +>Foo : typeof Foo +>forOf : any[] +>[] : undefined[] + + Foo.fromForOfBody = 1; +>Foo.fromForOfBody = 1 : 1 +>Foo.fromForOfBody : number +>Foo : typeof Foo +>fromForOfBody : number +>1 : 1 + { + Foo.fromForOfBodyNested = 1; +>Foo.fromForOfBodyNested = 1 : 1 +>Foo.fromForOfBodyNested : number +>Foo : typeof Foo +>fromForOfBodyNested : number +>1 : 1 + } +} + + +for(let f in (Foo.forIn = []) ){ +>f : string +>(Foo.forIn = []) : undefined[] +>Foo.forIn = [] : undefined[] +>Foo.forIn : any[] +>Foo : typeof Foo +>forIn : any[] +>[] : undefined[] + + Foo.fromForInBody = 1; +>Foo.fromForInBody = 1 : 1 +>Foo.fromForInBody : number +>Foo : typeof Foo +>fromForInBody : number +>1 : 1 + { + Foo.fromForInBodyNested = 1; +>Foo.fromForInBodyNested = 1 : 1 +>Foo.fromForInBodyNested : number +>Foo : typeof Foo +>fromForInBodyNested : number +>1 : 1 + } +} diff --git a/tests/baselines/reference/importsNotUsedAsValues_error.errors.txt b/tests/baselines/reference/importsNotUsedAsValues_error.errors.txt index dd2eda5644c57..1c9d69752e277 100644 --- a/tests/baselines/reference/importsNotUsedAsValues_error.errors.txt +++ b/tests/baselines/reference/importsNotUsedAsValues_error.errors.txt @@ -5,6 +5,7 @@ error TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functi /e.ts(1,1): error TS6192: All imports in import declaration are unused. /g.ts(1,1): error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. /i.ts(1,1): error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. +/j.ts(1,8): error TS6133: 'H' is declared but its value is never read. !!! error TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. @@ -69,8 +70,10 @@ error TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functi let h: H = {}; console.log(h); -==== /j.ts (0 errors) ==== +==== /j.ts (1 errors) ==== import H = require('./h'); // noUnusedLocals error only + ~ +!!! error TS6133: 'H' is declared but its value is never read. ==== /k.ts (0 errors) ==== const enum K { One, Two } @@ -80,5 +83,5 @@ error TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functi import K = require('./k'); K.One; -==== /j.ts (0 errors) ==== +==== /m.ts (0 errors) ==== // Sad face https://github.com/microsoft/TypeScript/blob/6b04f5039429b9d412696fe2febe39ecc69ad365/src/testRunner/compilerRunner.ts#L207 \ No newline at end of file diff --git a/tests/baselines/reference/importsNotUsedAsValues_error.js b/tests/baselines/reference/importsNotUsedAsValues_error.js index 0d3b2faa91f65..9a5d3c5322d9e 100644 --- a/tests/baselines/reference/importsNotUsedAsValues_error.js +++ b/tests/baselines/reference/importsNotUsedAsValues_error.js @@ -61,7 +61,7 @@ export = K; import K = require('./k'); K.One; -//// [j.ts] +//// [m.ts] // Sad face https://github.com/microsoft/TypeScript/blob/6b04f5039429b9d412696fe2febe39ecc69ad365/src/testRunner/compilerRunner.ts#L207 //// [a.js] @@ -134,7 +134,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); var h = {}; console.log(h); //// [j.js] -// Sad face https://github.com/microsoft/TypeScript/blob/6b04f5039429b9d412696fe2febe39ecc69ad365/src/testRunner/compilerRunner.ts#L207 +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); //// [k.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -142,3 +143,5 @@ Object.defineProperty(exports, "__esModule", { value: true }); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 /* K.One */; +//// [m.js] +// Sad face https://github.com/microsoft/TypeScript/blob/6b04f5039429b9d412696fe2febe39ecc69ad365/src/testRunner/compilerRunner.ts#L207 diff --git a/tests/baselines/reference/importsNotUsedAsValues_error.symbols b/tests/baselines/reference/importsNotUsedAsValues_error.symbols index 6412034b53c5c..7fe76084f5645 100644 --- a/tests/baselines/reference/importsNotUsedAsValues_error.symbols +++ b/tests/baselines/reference/importsNotUsedAsValues_error.symbols @@ -156,8 +156,8 @@ console.log(h); >h : Symbol(h, Decl(i.ts, 1, 3)) === /j.ts === - import H = require('./h'); // noUnusedLocals error only +>H : Symbol(H, Decl(j.ts, 0, 0)) === /k.ts === const enum K { One, Two } @@ -177,6 +177,6 @@ K.One; >K : Symbol(K, Decl(l.ts, 0, 0)) >One : Symbol(K.One, Decl(k.ts, 0, 14)) -=== /j.ts === +=== /m.ts === // Sad face https://github.com/microsoft/TypeScript/blob/6b04f5039429b9d412696fe2febe39ecc69ad365/src/testRunner/compilerRunner.ts#L207 diff --git a/tests/baselines/reference/importsNotUsedAsValues_error.types b/tests/baselines/reference/importsNotUsedAsValues_error.types index b6c2af7693c7b..baedecb2625b6 100644 --- a/tests/baselines/reference/importsNotUsedAsValues_error.types +++ b/tests/baselines/reference/importsNotUsedAsValues_error.types @@ -153,8 +153,8 @@ console.log(h); >h : H === /j.ts === - import H = require('./h'); // noUnusedLocals error only +>H : typeof H === /k.ts === const enum K { One, Two } @@ -174,6 +174,6 @@ K.One; >K : typeof K >One : K.One -=== /j.ts === +=== /m.ts === // Sad face https://github.com/microsoft/TypeScript/blob/6b04f5039429b9d412696fe2febe39ecc69ad365/src/testRunner/compilerRunner.ts#L207 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorDeclarationEmitVisibilityErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorDeclarationEmitVisibilityErrors.d.ts.diff new file mode 100644 index 0000000000000..2c6110f33fb32 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorDeclarationEmitVisibilityErrors.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,11 @@ + ++ ++//// [accessorDeclarationEmitVisibilityErrors.d.ts] ++export declare class Q { ++ set bet(arg: DoesNotExist); ++} ++//# sourceMappingURL=accessorDeclarationEmitVisibilityErrors.d.ts.map + /// [Errors] //// + + accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS2304: Cannot find name 'DoesNotExist'. + accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS4106: Parameter 'arg' of accessor has or is using private name 'DoesNotExist'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map.diff new file mode 100644 index 0000000000000..53ec2fb79fee2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [accessorInferredReturnTypeErrorInReturnStatement.d.ts.map] +-{"version":3,"file":"accessorInferredReturnTypeErrorInReturnStatement.d.ts","sourceRoot":"","sources":["accessorInferredReturnTypeErrorInReturnStatement.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,aAAa;;CAKvB,CAAC"} ++{"version":3,"file":"accessorInferredReturnTypeErrorInReturnStatement.d.ts","sourceRoot":"","sources":["accessorInferredReturnTypeErrorInReturnStatement.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,aAAa;aAClB,WAAW,EAAI,GAAG;CAIvB,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7O0NBS3ZCLENBQUMifQ==,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7YUFDbEIsV0FBVyxFQUFJLEdBQUc7Q0FJdkIsQ0FBQyJ9,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientConstLiterals.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientConstLiterals.d.ts.diff new file mode 100644 index 0000000000000..fa46fc2201795 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientConstLiterals.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: We made this is an error, thus the auto-fixer is trying to fix it. Although it's possible syntactically to figure out that E is an enum, I think we should rather make this an error for now.]] //// + +//// [tests/cases/compiler/ambientConstLiterals.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -15,9 +15,9 @@ + declare const c5: 123; + declare const c6: -123; + declare const c7 = true; + declare const c8: E.A; +-declare const c8b = E["non identifier"]; ++declare const c8b: (typeof E)["non identifier"]; + declare const c9: { + x: string; + }; + declare const c10: number[]; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrayFakeFlatNoCrashInferenceDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrayFakeFlatNoCrashInferenceDeclarations.d.ts.diff new file mode 100644 index 0000000000000..2eec583daf74e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrayFakeFlatNoCrashInferenceDeclarations.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: Semantically invalid, already has a cyclic error type]] //// + +//// [tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,11 +1,23 @@ + ++ ++//// [arrayFakeFlatNoCrashInferenceDeclarations.d.ts] ++type BadFlatArray = { ++ obj: { ++ "done": Arr; ++ "recur": Arr extends ReadonlyArray ? BadFlatArray : Arr; ++ }[Depth extends -1 ? "done" : "recur"]; ++}["obj"]; ++declare function flat(arr: A, depth?: D): BadFlatArray[]; ++declare function foo(arr: T[], depth: number): invalid; ++//# sourceMappingURL=arrayFakeFlatNoCrashInferenceDeclarations.d.ts.map + /// [Errors] //// + + arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary. ++arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + + +-==== arrayFakeFlatNoCrashInferenceDeclarations.ts (1 errors) ==== ++==== arrayFakeFlatNoCrashInferenceDeclarations.ts (2 errors) ==== + type BadFlatArray = {obj: { + "done": Arr, + "recur": Arr extends ReadonlyArray + ? BadFlatArray +@@ -19,6 +31,9 @@ + + function foo(arr: T[], depth: number) { + ~~~ + !!! error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary. ++ ~~~ ++!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9031 arrayFakeFlatNoCrashInferenceDeclarations.ts:13:10: Add a return type to the function declaration. + return flat(arr, depth); + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/coAndContraVariantInferences.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/coAndContraVariantInferences.d.ts.map.diff new file mode 100644 index 0000000000000..2c312a59c6c6b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/coAndContraVariantInferences.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/coAndContraVariantInferences.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [coAndContraVariantInferences.d.ts.map] +-{"version":3,"file":"coAndContraVariantInferences.d.ts","sourceRoot":"","sources":["coAndContraVariantInferences.ts"],"names":[],"mappings":"AAAA,KAAK,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC;AACvB,KAAK,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC;AAEvB,OAAO,C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geyBraW5kOiAnYicgfTsKCmRlY2xhcmUgY29uc3QgYTogQTsKZGVjbGFyZSBjb25zdCBiOiBCOwoKZGVjbGFyZSBmdW5jdGlvbiBmYWIoYXJnOiBBIHwgQik6IHZvaWQ7CgpkZWNsYXJlIGZ1bmN0aW9uIGZvbzxUPih4OiB7IGtpbmQ6IFQgfSwgZjogKGFyZzogeyBraW5kOiBUIH0pID0+IHZvaWQpOiB2b2lkOwoKZm9vKGEsIGZhYik7CmZvbyhiLCBmYWIpOwoKLy8gUmVwcm8gZnJvbSAjNDU2MDMKCmludGVyZmFjZSBBY3Rpb248VE5hbWUgZXh0ZW5kcyBzdHJpbmcsVFBheWxvYWQ+IHsKICAgIG5hbWU6IFROYW1lLAogICAgcGF5bG9hZDogVFBheWxvYWQKfQoKY29uc3QgYWN0aW9uQSA9IHsgcGF5bG9hZDogJ2FueS1zdHJpbmcnIH0gYXMgQWN0aW9uPCdBQ1RJT05fQScsIHN0cmluZz47CmNvbnN0IGFjdGlvbkIgPSB7IHBheWxvYWQ6IHRydWUgfSBhcyBBY3Rpb248J0FDVElPTl9CJywgYm9vbGVhbj47CgpmdW5jdGlvbiBjYWxsPFROYW1lIGV4dGVuZHMgc3RyaW5nLFRQYXlsb2FkPigKICBhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4sCiAgZm46IChhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4pPT4gYW55LAopOiB2b2lkIHsKICBmbihhY3Rpb24pOwp9Cgpjb25zdCBwcmludEZuID0gKGFjdGlvbjogdHlwZW9mIGFjdGlvbkEgfCB0eXBlb2YgYWN0aW9uQik6IHZvaWQ9PiBjb25zb2xlLmxvZyhhY3Rpb24pOwoKY2FsbChhY3Rpb25BLCBwcmludEZuKTsKY2FsbChhY3Rpb25CLCBwcmludEZuKTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commentsFunction.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commentsFunction.d.ts.diff new file mode 100644 index 0000000000000..1934717035fde --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commentsFunction.d.ts.diff @@ -0,0 +1,22 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/commentsFunction.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,11 +9,11 @@ + b: number): void; + /** fooFunc + * comment + */ +-declare var fooFunc: (b: string) => string; +-declare var lambdaFoo: (a: number, b: number) => number; +-declare var lambddaNoVarComment: (a: number, b: number) => number; ++declare var fooFunc: (/** fooFunctionValue param */ b: string) => string; ++declare var lambdaFoo: (/**param a*/ a: number, /**param b*/ b: number) => number; ++declare var lambddaNoVarComment: (/**param a*/ a: number, /**param b*/ b: number) => number; + declare function blah(a: string): void; + declare function blah2(a: string): void; + declare function blah3(a: string): void; + declare function blah4(/*1*/ a: string, /*3*/ b: string): void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commentsVarDecl.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commentsVarDecl.d.ts.map.diff new file mode 100644 index 0000000000000..74f43b8874531 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commentsVarDecl.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/commentsVarDecl.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [commentsVarDecl.d.ts.map] +-{"version":3,"file":"commentsVarDecl.d.ts","sourceRoot":"","sources":["commentsVarDecl.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,QAAA,IAAI,UAAU,QAAK,CAAC;AAEpB,sCAAsC;AACtC,QAAA,IAAI,eAAe,QAAK,CAAC;AAGzB,QAAA,IAAI,IAAI,QAAK,CAAC;AAEd;6CAC6C;AAC7C,QAAA,IAAI,sBAAsB,QAAK,CAAC;AAEhC,oCAAo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ovKiogdmFyIGRlY2thcmF0aW9uIHdpdGggY29tbWVudCBvbiB0eXBlIGFzIHdlbGwqLwp2YXIgeSA9IC8qKiB2YWx1ZSBjb21tZW50ICovIDIwOwoKLy8vIHZhciBkZWNrYXJhdGlvbiB3aXRoIGNvbW1lbnQgb24gdHlwZSBhcyB3ZWxsCnZhciB5eSA9CiAgICAvLy8gdmFsdWUgY29tbWVudAogICAgMjA7CgovKiogY29tbWVudDIgKi8KdmFyIHogPSAvKiogbGFtYmRhIGNvbW1lbnQgKi8gKHg6IG51bWJlciwgeTogbnVtYmVyKTogbnVtYmVyID0+IHggKyB5OwoKdmFyIHoyOiAvKiogdHlwZSBjb21tZW50Ki8gKHg6IG51bWJlcikgPT4gc3RyaW5nOwoKdmFyIHgyOiAoeDogbnVtYmVyKSA9PiBzdHJpbmcgPSB6MjsKCnZhciBuNDogKHg6IG51bWJlcikgPT4gc3RyaW5nOwpuNCA9IHoyOw== ++//// https://sokra.github.io/source-map-visualization#base64,LyoqIFZhcmlhYmxlIGNvbW1lbnRzKi8NCmRlY2xhcmUgdmFyIG15VmFyaWFibGU6IG51bWJlcjsNCi8qKiBUaGlzIGlzIGFub3RoZXIgdmFyaWFibGUgY29tbWVudCovDQpkZWNsYXJlIHZhciBhbm90aGVyVmFyaWFibGU6IG51bWJlcjsNCmRlY2xhcmUgdmFyIGFWYXI6IHN0cmluZzsNCi8qKiB0aGlzIGlzIG11bHRpbGluZSBjb21tZW50DQogICogQWxsIHRoZXNlIHZhcmlhYmxlcyBhcmUgb2YgbnVtYmVyIHR5cGUgKi8NCmRlY2xhcmUgdmFyIGFub3RoZXJBbm90aGVyVmFyaWFibGU6IG51bWJlcjsNCi8qKiBUcmlwbGUgc2xhc2ggbXVsdGlsaW5lIGNvbW1lbnQqLw0KLyoqIGFub3RoZXIgbGluZSBpbiB0aGUgY29tbWVudCovDQovKiogY29tbWVudCBsaW5lIDIqLw0KZGVjbGFyZSB2YXIgeDogbnVtYmVyOw0KLyoqIHRy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iBhbm90aGVyIGxpbmUgaW4gdGhlIGNvbW1lbnQqLwovKiogY29tbWVudCBsaW5lIDIqLwp2YXIgeCA9IDcwOyAvKiBtdWx0aWxpbmUgdHJhaWxpbmcgY29tbWVudCAKdGhpcyBpcyBtdWx0aWxpbmUgdHJhaWxpbmcgY29tbWVudCAqLwovKiogVHJpcGxlIHNsYXNoIGNvbW1lbnQgb24gdGhlIGFzc2lnbm1lbnQgc2hvdWxkbnQgYmUgaW4gLmQudHMgZmlsZSovCnggPSBteVZhcmlhYmxlOwoKLyoqIHRyaXBsZSBzbGFzaCBjb21tZW50MSovCi8qKiBqc2RvY3N0eWxlIGNvbW1lbnQgLSBvbmx5IHRoaXMgY29tbWVudCBzaG91bGQgYmUgaW4gLmQudHMgZmlsZSovCnZhciBuID0gMzA7CgovKiogdmFyIGRlY2thcmF0aW9uIHdpdGggY29tbWVudCBvbiB0eXBlIGFzIHdlbGwqLwp2YXIgeSA9IC8qKiB2YWx1ZSBjb21tZW50ICovIDIwOwoKLy8vIHZhciBkZWNrYXJhdGlvbiB3aXRoIGNvbW1lbnQgb24gdHlwZSBhcyB3ZWxsCnZhciB5eSA9CiAgICAvLy8gdmFsdWUgY29tbWVudAogICAgMjA7CgovKiogY29tbWVudDIgKi8KdmFyIHogPSAvKiogbGFtYmRhIGNvbW1lbnQgKi8gKHg6IG51bWJlciwgeTogbnVtYmVyKTogbnVtYmVyID0+IHggKyB5OwoKdmFyIHoyOiAvKiogdHlwZSBjb21tZW50Ki8gKHg6IG51bWJlcikgPT4gc3RyaW5nOwoKdmFyIHgyOiAoeDogbnVtYmVyKSA9PiBzdHJpbmcgPSB6MjsKCnZhciBuNDogKHg6IG51bWJlcikgPT4gc3RyaW5nOwpuNCA9IHoyOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedEnumTypeWidening.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedEnumTypeWidening.d.ts.diff new file mode 100644 index 0000000000000..cdd718968de70 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedEnumTypeWidening.d.ts.diff @@ -0,0 +1,110 @@ +// [[Reason: Enums are not fixed]] //// + +//// [tests/cases/compiler/computedEnumTypeWidening.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -39,5 +39,99 @@ + B, + C + } + declare let val2: MyDeclaredEnum; +-//# sourceMappingURL=computedEnumTypeWidening.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=computedEnumTypeWidening.d.ts.map ++/// [Errors] //// ++ ++computedEnumTypeWidening.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++computedEnumTypeWidening.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++computedEnumTypeWidening.ts(6,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++computedEnumTypeWidening.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ++ ++==== computedEnumTypeWidening.ts (4 errors) ==== ++ declare function computed(x: number): number; ++ ++ enum E { ++ A = computed(0), ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ B = computed(1), ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ C = computed(2), ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ D = computed(3), ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ } ++ ++ function f1(): void { ++ const c1 = E.B; // Fresh E.B ++ let v1 = c1; // E ++ const c2 = c1; // Fresh E.B ++ let v2 = c2; // E ++ const c3: E.B = E.B; // E.B ++ let v3 = c3; // E.B ++ const c4: E.B = c1; // E.B ++ let v4 = c4; // E.B ++ } ++ ++ function f2(cond: boolean): void { ++ const c1 = cond ? E.A : E.B; // Fresh E.A | fresh E.B ++ const c2: E.A | E.B = c1; // E.A | E.B ++ const c3 = cond ? c1 : c2; // E.A | E.B ++ const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C ++ const c5: E.A | E.B | E.C = c4; // E.A | E.B | E.C ++ let v1 = c1; // E ++ let v2 = c2; // E.A | E.B ++ let v3 = c3; // E.A | E.B ++ let v4 = c4; // E ++ let v5 = c5; // E.A | E.B | E.C ++ } ++ ++ function f3(): void { ++ const c1 = E.B; ++ let v1 = c1; // E ++ const c2: E.B = E.B; ++ let v2 = c2; // E.B ++ const c3 = E.B as E.B; ++ let v3 = c3; // E.B ++ const c4 = E.B; ++ let v4 = c4; // E.B ++ const c5 = E.B as const; ++ let v5 = c5; // E.B ++ } ++ ++ declare enum E2 { A, B, C, D } ++ ++ function f4(): void { ++ const c1 = E2.B; // Fresh E2.B ++ let v1 = E.B; // E2 ++ } ++ ++ const c1: E.B = E.B; ++ const c2: E.B = E.B as const; ++ let v1: E = E.B; ++ let v2: E.B = E.B as const; ++ ++ class C { ++ p1: E = E.B; ++ p2: E.B = E.B as const; ++ readonly p3: E.B = E.B; ++ readonly p4: E.B = E.B as const; ++ } ++ ++ // Repro from #52531 ++ ++ enum MyEnum { A, B, C } ++ ++ let val1: MyEnum = MyEnum.A; ++ val1 = MyEnum.B; ++ ++ declare enum MyDeclaredEnum { A, B, C } ++ ++ let val2: MyDeclaredEnum = MyDeclaredEnum.A; ++ val2 = MyDeclaredEnum.B; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertiesNarrowed.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertiesNarrowed.d.ts.diff new file mode 100644 index 0000000000000..86fba318f5d7b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertiesNarrowed.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,10 +4,11 @@ + declare const x: 0 | 1; + export declare let o: { + [x]: number; + }; ++declare const y: 0; + export declare let o2: { +- 0: number; ++ [y]: number; + }; + export declare let o3: { + 1: number; + }; +@@ -29,10 +30,13 @@ + }; + export declare let o7: { + 1: number; + }; ++declare let E: { ++ readonly A: 1; ++}; + export declare const o8: { +- 1: number; ++ [E.A]: number; + }; + export declare const o9: { + 0: number; + }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/conditionalTypes1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/conditionalTypes1.d.ts.map.diff new file mode 100644 index 0000000000000..a44ef2150706f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/conditionalTypes1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/conditional/conditionalTypes1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [conditionalTypes1.d.ts.map] +-{"version":3,"file":"conditionalTypes1.d.ts","sourceRoot":"","sources":["conditionalTypes1.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;AAC3D,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;AAE3D,KAAK,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC7D,KAAK,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;AAE7D,KAAK,GAAG,GAAG,W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b3MgZnJvbSAjMjM4NDMKCnR5cGUgV2VpcmQxID0gKDxVIGV4dGVuZHMgYm9vbGVhbj4oYTogVSkgPT4gbmV2ZXIpIGV4dGVuZHMgCiAgICAoPFUgZXh0ZW5kcyB0cnVlPihhOiBVKSA9PiBuZXZlcikgPyBuZXZlciA6IG5ldmVyOwoKdHlwZSBXZWlyZDIgPSAoPFUgZXh0ZW5kcyBib29sZWFuPihhOiBVKSA9PiBVKSBleHRlbmRzIAogICAgKDxVIGV4dGVuZHMgdHJ1ZT4oYTogVSkgPT4gaW5mZXIgVCkgPyBUIDogbmV2ZXI7Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constAssertions.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constAssertions.d.ts.map.diff new file mode 100644 index 0000000000000..2a71e5e39a085 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constAssertions.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/expressions/typeAssertions/constAssertions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [constAssertions.d.ts.map] +-{"version":3,"file":"constAssertions.d.ts","sourceRoot":"","sources":["constAssertions.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,IAAc,CAAC;AACrB,QAAA,IAAI,EAAE,KAAe,CAAC;AACtB,QAAA,IAAI,EAAE,IAAe,CAAC;AACtB,QAAA,IAAI,EAAE,KAAe,CAAC;AACtB,QAAA,IAAI,EAAE,MAAgB,CAAC;AACvB,QAAA,IAAI,EAAE,MAAgB,CAAC;AACvB,QAAA,IAAI,EAAE,OAAiB,CAAC;AAExB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,OAAiB,CAAC;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7CiAgICByZXR1cm4gW2BnZXQtJHtwcm9wTmFtZX1gLCBgc2V0LSR7cHJvcE5hbWV9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff new file mode 100644 index 0000000000000..c128a5cb2f512 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff @@ -0,0 +1,47 @@ +// [[Reason: Fixing enum values is not supported]] //// + +//// [tests/cases/conformance/constEnums/constEnum2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,14 +10,17 @@ + } + //# sourceMappingURL=constEnum2.d.ts.map + /// [Errors] //// + ++constEnum2.ts(10,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. ++constEnum2.ts(11,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. ++constEnum2.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + constEnum2.ts(12,9): error TS2474: const enum member initializers must be constant expressions. + + +-==== constEnum2.ts (3 errors) ==== ++==== constEnum2.ts (6 errors) ==== + // An enum declaration that specifies a const modifier is a constant enum declaration. + // In a constant enum declaration, all members must have constant values and + // it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression. + +@@ -26,13 +29,19 @@ + const CONST: number = 9000 % 2; + const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + f = d - (100 * Math.floor(Math.random() % 8)), ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + g = CONST, ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map.diff new file mode 100644 index 0000000000000..b8249cc881dc9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map] +-{"version":3,"file":"contextuallyTypedStringLiteralsInJsxAttributes01.d.ts","sourceRoot":"","sources":["contextuallyTypedStringLiteralsInJsxAttributes01.tsx"],"names":[],"mappings":"AAAA,kBAAU,GAAG,CAAC;IACV,UAAiB,iBAAiB;QAC9B,IAAI,EAAE,EAAE,CAAC;KACZ;IACD,UAAiB,OAAO;QAC1B,SAAS,CAAC,EAAE,GAAG,CAAC;KACb;CACJ;AAED,QAAA,MAAM,YAAY,UAAW;IAAE,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;CAAE,KAAG,WAAuC,CAAC"} ++{"version":3,"file":"contextuallyTypedStringLiteralsInJsxAttributes01.d.ts","sourceRoot":"","sources":["contextuallyTypedStringLiteralsInJsxAttributes01.tsx"],"names":[],"mappings":"AAAA,kBAAU,GAAG,CAAC;IACV,UAAiB,iBAAiB;QAC9B,IAAI,EAAE,EAAE,CAAC;KACZ;IACD,UAAiB,OAAO;QAC1B,SAAS,CAAC,EAAE,GAAG,CAAC;KACb;CACJ;AAED,QAAA,MAAM,YAAY,GAAI,KAAK,EAAE;IAAE,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;CAAE,KAAG,GAAG,CAAC,OAAmC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsNCiAgICBpbnRlcmZhY2UgSW50cmluc2ljRWxlbWVudHMgew0KICAgICAgICBzcGFuOiB7fTsNCiAgICB9DQogICAgaW50ZXJmYWNlIEVsZW1lbnQgew0KICAgICAgICBzb21ldGhpbmc/OiBhbnk7DQogICAgfQ0KfQ0KZGVjbGFyZSBjb25zdCBGb29Db21wb25lbnQ6IChwcm9wczogew0KICAgIGZvbzogIkEiIHwgIkIiIHwgIkMiOw0KfSkgPT4gSlNYLkVsZW1lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1jb250ZXh0dWFsbHlUeXBlZFN0cmluZ0xpdGVyYWxzSW5Kc3hBdHRyaWJ1dGVzMDEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbGx5VHlwZWRTdHJpbmdMaXRlcmFsc0luSnN4QXR0cmlidXRlczAxLm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M6IHsgZm9vOiAiQSIgfCAiQiIgfCAiQyIgfSk6IEpTWC5FbGVtZW50ID0+IDxzcGFuPntwcm9wcy5mb299PC9zcGFuPjsKCjxGb29Db21wb25lbnQgZm9vPXsiQSJ9IC8+Owo8Rm9vQ29tcG9uZW50IGZvbz0iQSIgICAvPjsKCjxGb29Db21wb25lbnQgZm9vPXsiZiJ9IC8+Owo8Rm9vQ29tcG9uZW50IGZvbz0iZiIgICAvPjs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/correlatedUnions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/correlatedUnions.d.ts.diff new file mode 100644 index 0000000000000..d746747e23010 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/correlatedUnions.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/correlatedUnions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -166,9 +166,9 @@ + [K2 in keyof T[K]]: number; + }; + }; + type MappedFromOriginal = SameKeys; +-declare const getStringAndNumberFromOriginalAndMapped: (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]; ++declare const getStringAndNumberFromOriginalAndMapped: >(original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]; + interface Config { + string: string; + number: number; + } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEmitDeclarationOnly.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEmitDeclarationOnly.d.ts.map.diff new file mode 100644 index 0000000000000..616ed315d85e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEmitDeclarationOnly.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declFileEmitDeclarationOnly.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [helloworld.d.ts.map] +-{"version":3,"file":"helloworld.d.ts","sourceRoot":"","sources":["helloworld.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;cACG,MAAM,GAAG,IAAI;CACxB,CAAA;AAED,cAAM,UAAU;IACF,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,MAAM;IAGzB,KAAK,IAAI,IAAI;CAGrB"} ++{"version":3,"file":"helloworld.d.ts","sourceRoot":"","sources":["helloworld.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;SACF,GAAG,EAAE,MAAM,GAAG,IAAI;CACxB,CAAA;AAED,cAAM,UAAU;IACF,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,MAAM;IAGzB,KAAK,IAAI,IAAI;CAGrB"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBMb2c6IHsNCiAgICBpbmZvKG1zZzogc3RyaW5nKTogdm9pZDsNCn07DQpkZWNsYXJlIGNsYXNzIEhlbGxvV29ybGQgew0KICAgIHByaXZhdGUgbmFtZTsNCiAgICBjb25zdHJ1Y3RvcihuYW1lOiBzdHJpbmcpOw0KICAgIGhlbGxvKCk6IHZvaWQ7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1oZWxsb3dvcmxkLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsbG93b3JsZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaGVsbG93b3JsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLE1BQU0sR0FBRztjQUNHLE1BQU0sR0FBRyxJQUFJO0NBQ3hCLENBQUE7QUFFRCxjQUFNLFVBQVU7SUFDRixPQUFPLENBQUMsSUFBSTtnQkFBSixJQUFJLEVBQUUsTUFBTTtJQUd6QixLQUFLLElBQUksSUFBSTtDQUd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Ht0aGlzLm5hbWV9YCk7CiAgfQp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEnums.d.ts.diff new file mode 100644 index 0000000000000..8cd84d30f8620 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEnums.d.ts.diff @@ -0,0 +1,59 @@ +// [[Reason: Enums are not fixed]] //// + +//// [tests/cases/compiler/declFileEnums.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -28,5 +28,48 @@ + "Saturday" = 1, + "Sunday" = 2, + "Weekend days" = 3 + } +-//# sourceMappingURL=declFileEnums.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=declFileEnums.d.ts.map ++/// [Errors] //// ++ ++declFileEnums.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ++ ++==== declFileEnums.ts (1 errors) ==== ++ enum e1 { ++ a, ++ b, ++ c ++ } ++ ++ enum e2 { ++ a = 10, ++ b = a + 2, ++ c = 10, ++ } ++ ++ enum e3 { ++ a = 10, ++ b = Math.PI, ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ c = a + 3 ++ } ++ ++ enum e4 { ++ a, ++ b, ++ c, ++ d = 10, ++ e ++ } ++ ++ enum e5 { ++ "Friday", ++ "Saturday", ++ "Sunday", ++ "Weekend days" ++ } ++ ++ ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitAliasExportStar.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitAliasExportStar.d.ts.map.diff new file mode 100644 index 0000000000000..cb814476211cb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitAliasExportStar.d.ts.map.diff @@ -0,0 +1,19 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitAliasExportStar.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,9 @@ + + //// [index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,eAAO,MAAM,MAAM,UAAW,OAAO,MAAM,KAAG,GAAW,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,eAAO,MAAM,MAAM,GAAI,KAAK,EAAE,MAAM,CAAC,MAAM,KAAG,GAAW,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IHRoaW5nMjogKHBhcmFtOiB0aGluZ3MuVGhpbmdCKSA9PiBhbnk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE1BQU0sVUFBVSxDQUFDO0FBQ25DLGVBQU8sTUFBTSxNQUFNLFVBQVcsT0FBTyxNQUFNLEtBQUcsR0FBVyxDQUFDIn0=,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsKZXhwb3J0IGNvbnN0IHRoaW5nMiA9IChwYXJhbTogdGhpbmdzLlRoaW5nQik6IGFueSA9PiBudWxsOwo= ++//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IHRoaW5nMjogKHBhcmFtOiB0aGluZ3MuVGhpbmdCKSA9PiBhbnk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE1BQU0sVUFBVSxDQUFDO0FBQ25DLGVBQU8sTUFBTSxNQUFNLEdBQUksS0FBSyxFQUFFLE1BQU0sQ0FBQyxNQUFNLEtBQUcsR0FBVyxDQUFDIn0=,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsKZXhwb3J0IGNvbnN0IHRoaW5nMiA9IChwYXJhbTogdGhpbmdzLlRoaW5nQik6IGFueSA9PiBudWxsOwo= + + + //// [thingB.d.ts.map] + {"version":3,"file":"thingB.d.ts","sourceRoot":"","sources":["thingB.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;CAAI"} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.map.diff new file mode 100644 index 0000000000000..1102b77dc06dc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitBindingPatternWithReservedWord.d.ts.map] +-{"version":3,"file":"declarationEmitBindingPatternWithReservedWord.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatternWithReservedWord.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AACvC,KAAK,mBAAmB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,MAAM,CAClE,MAAM,EACN,CAAC,CACF,CAAC;AACF,KAAK,YAAY,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAElF,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,UAAU;IACnD,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,mGAKpB,kBAAkB,CAAC,CAAC,KAAG,oBAAoB,CAAC,CAE9C,CAAC"} ++{"version":3,"file":"declarationEmitBindingPatternWithReservedWord.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatternWithReservedWord.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AACvC,KAAK,mBAAmB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,MAAM,CAClE,MAAM,EACN,CAAC,CACF,CAAC;AACF,KAAK,YAAY,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAElF,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,UAAU;IACnD,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACrC,IAAI,CAAC,EAAE,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b2NhbGVDb25maWc8VD4gfCB1bmRlZmluZWQ7CiAgICBuYW1lPzogc3RyaW5nOwp9CgpleHBvcnQgY29uc3QgZ2V0TG9jYWxlcyA9IDxUIGV4dGVuZHMgTG9jYWxlRGF0YT4oewogICAgYXBwLAogICAgbmFtZSwKICAgIGRlZmF1bHQ6IGRlZmF1bHRMb2NhbGVzQ29uZmlnLAogICAgY29uZmlnOiB1c2VyTG9jYWxlc0NvbmZpZyA9IHt9LAp9OiBHZXRMb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.map.diff new file mode 100644 index 0000000000000..102ffda460902 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitBindingPatterns.d.ts.map] +-{"version":3,"file":"declarationEmitBindingPatterns.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatterns.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,aAAkB;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;CACd,KAAG,IAAW,CAAA;AAEnB,QAAA,IAAI,CAAC,EAAE,GAAG,CAAC;AACX,iBAAS,CAAC,CAAC,EAAE,GAAE,GAAO,EAAE,EAAE,GAAE,GAAO,EAAE,EAAE,CAAC,EAAE,EAAM,EAAC,GAAE,GAAO,GAAG,IAAI,CAChE"} ++{"version":3,"file":"declarationEmitBindingPatterns.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatterns.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAI,EAAC,CAAC,EAAE,CAAO,EAAC,EAAE;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;CACd,KAAG,IAAW,CAAA;AAEnB,QAAA,IAAI,CAAC,EAAE,GAAG,CAAC;AACX,iBAAS,CAAC,CAAC,EAAE,GAAE,GAAO,EAAE,EAAE,GAAE,GAAO,EAAE,EAAE,CAAC,EAAE,EAAM,EAAC,GAAE,GAAO,GAAG,IAAI,CAChE"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBrOiAoeyB4OiB6IH06IHsNCiAgICB4Pzogc3RyaW5nOw0KfSkgPT4gdm9pZDsNCmRlY2xhcmUgdmFyIGE6IGFueTsNCmRlY2xhcmUgZnVuY3Rpb24gZih7fT86IGFueSwgW10/OiBhbnksIHsgcDoge30gfT86IGFueSk6IHZvaWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0QmluZGluZ1BhdHRlcm5zLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsYUFBa0I7SUFDakIsQ0FBQyxDQUFDLEVBQUUsTUFBTSxDQUFDO0NBQ2QsS0FBRyxJQUFXLENBQUE7QUFFbkIsUUFBQSxJQUFJLENBQUMsRUFBRSxHQUFHLENBQUM7QUFDWCxpQkFBUyxDQUFDLENBQUMsRUFBRSxHQUFFLEdBQU8sRUFBRSxFQUFFLEdBQUUsR0FBTyxFQUFFLEVBQUUsQ0FBQyxFQUFFLEVBQU0sRUFBQyxHQ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==,Y29uc3QgayA9ICh7eDogeiA9ICd5J306IHsKICAgICAgICB4Pzogc3RyaW5nOwogICAgfSk6IHZvaWQgPT4geyB9Cgp2YXIgYTogYW55OwpmdW5jdGlvbiBmKHt9OiBhbnkgPSBhLCBbXTogYW55ID0gYSwgeyBwOiB7fSA9IGF9OiBhbnkgPSBhKTogdm9pZCB7Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternsFunctionExpr.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternsFunctionExpr.d.ts.map.diff new file mode 100644 index 0000000000000..2b23584057944 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternsFunctionExpr.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitBindingPatternsFunctionExpr.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitBindingPatternsFunctionExpr.d.ts.map] +-{"version":3,"file":"declarationEmitBindingPatternsFunctionExpr.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatternsFunctionExpr.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7B,QAAA,IAAI,aAAa,oBAAqB,KAAK,KAAG,IAAW,CAAA;AAKzD,QAAA,MAAM,oBAAoB,kCAAmC,KAAK,KAAG,IAAW,CAAA;AAChF,QAAA,MAAM,qBAAqB,SAAU,MAAM,mBAAmB,KAAK,KAAG,IAAW,CAAA;AACjF,QAAA,MAAM,qBAAqB,oBAAqB,KAAK,oBAAoB,KAAK,KAAG,IAAW,CAAA;AAE5F,QAAA,IAAI,KAAK,QAAK,CAAC;AAEf,QAAA,MAAM,gBAAgB,qBAAsB;IAAE,OAAO,MAAM,CAAA;CAAE,KAAG,YAAqB,CAAC"} ++{"version":3,"file":"declarationEmitBindingPatternsFunctionExpr.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatternsFunctionExpr.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7B,QAAA,IAAI,aAAa,GAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,KAAG,IAAW,CAAA;AAKzD,QAAA,MAAM,oBAAoB,GAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,KAAG,IAAW,CAAA;AAChF,QAAA,MAAM,qBAAqB,GAAI,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,KAAG,IAAW,CAAA;AACjF,QAAA,MAAM,qBAAqB,GAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,KAAG,IAAW,CAAA;AAE5F,QAAA,IAAI,KAAK,QAAK,CAAC;AAEf,QAAA,MAAM,gBAAgB,GAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,KAAG,OAAO,KAAc,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBOYW1lZCA9IHsNCiAgICBuYW1lOiBzdHJpbmc7DQp9Ow0KZGVjbGFyZSBsZXQgbm90UmVmZXJlbmNlZDogKHsgbmFtZTogYWxpYXMgfTogTmFtZWQpID0+IHZvaWQ7DQpkZWNsYXJlIGNvbnN0IGR1cGxpY2F0ZUluZGV0aWZpZXJzOiAoeyBuYW1lOiBhbGlhcywgbmFtZTogYWxpYXMyIH06IE5hbWVkKSA9PiB2b2lkOw0KZGVjbGFyZSBjb25zdCBkdXBsaWNhdGVJbmRldGlmaWVyczI6IChuYW1lOiBzdHJpbmcsIHsgbmFtZTogYWxpYXMgfT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lSW5kZXRpZmllcnMgPSAoeyBuYW1lOiBhbGlhcywgbmFtZTogYWxpYXMyIH06IE5hbWVkKTogdm9pZCA9PiB7IH0KY29uc3QgZHVwbGljYXRlSW5kZXRpZmllcnMyID0gKG5hbWU6IHN0cmluZywgeyBuYW1lOiBhbGlhcyB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CmNvbnN0IGR1cGxpY2F0ZUluZGV0aWZpZXJzMyA9ICh7IG5hbWU6IGFsaWFzIH06IE5hbWVkLCB7IG5hbWU6IGFsaWFzMiB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CgpsZXQgdmFsdWUgPSAiIjsKLy8gMi5DYW4gY2hhbmdlIGluIG1lYW5pbmcgZm9yIHR5cGVvZiB2YWx1ZSBpZiB3ZSByZW1vdmUgYWxpYXMKY29uc3Qgc2hhZG93ZWRWYXJpYWJsZSA9ICh7IHZhbHVlOiBhbGlhcyB9OiB7IHZhbHVlOiBzdHJpbmcgfSk6IHR5cGVvZiB2YWx1ZSA9PiB2YWx1ZTs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBundleWithAmbientReferences.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBundleWithAmbientReferences.d.ts.diff new file mode 100644 index 0000000000000..6f81f74cfb283 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBundleWithAmbientReferences.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,8 +4,7 @@ + import * as DatastoreResult from "src/datastore_result"; + export declare const build: () => DatastoreResult.T; + //# sourceMappingURL=conditional_directive_field.d.ts.map + //// [src/datastore_result.d.ts] +-/// + import { Result } from "lib/result"; + export type T = Result; + //# sourceMappingURL=datastore_result.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff new file mode 100644 index 0000000000000..1a9629c8b802d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff @@ -0,0 +1,41 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,15 @@ + ++ ++//// [r/entry.d.ts] ++import { RootProps } from "root"; ++export declare const x: invalid; ++export declare const y: RootProps; ++//# sourceMappingURL=entry.d.ts.map + /// [Errors] //// + + r/entry.ts(3,14): error TS2742: The inferred type of 'x' cannot be named without a reference to 'foo/node_modules/nested'. This is likely not portable. A type annotation is necessary. ++r/entry.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + + ==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== + export interface NestedProps {} +@@ -20,12 +27,15 @@ + ==== node_modules/root/index.d.ts (0 errors) ==== + export interface RootProps {} + + export function bar(): RootProps; +-==== r/entry.ts (1 errors) ==== ++==== r/entry.ts (2 errors) ==== + import { foo } from "foo"; + import { RootProps, bar } from "root"; + export const x = foo(); + ~ + !!! error TS2742: The inferred type of 'x' cannot be named without a reference to 'foo/node_modules/nested'. This is likely not portable. A type annotation is necessary. ++ ~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 r/entry.ts:3:14: Add a type annotation to the variable x. + export const y: RootProps = bar(); + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitComputedNameCausesImportToBePainted.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitComputedNameCausesImportToBePainted.d.ts.map.diff new file mode 100644 index 0000000000000..6c12b483678c7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitComputedNameCausesImportToBePainted.d.ts.map.diff @@ -0,0 +1,18 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,8 +5,8 @@ + //// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgS2V5OiB1bmlxdWUgc3ltYm9sOw0KZXhwb3J0IGludGVyZmFjZSBDb250ZXh0IHsNCiAgICBbS2V5XTogc3RyaW5nOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y29udGV4dC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29udGV4dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sR0FBRyxFQUFFLE9BQU8sTUFBaUIsQ0FBQztBQUMzQyxNQUFNLFdBQVcsT0FBTztJQUN0QixDQUFDLEdBQUcsQ0FBQyxFQUFFLE1BQU0sQ0FBQztDQUNmIn0=,ZXhwb3J0IGNvbnN0IEtleTogdW5pcXVlIHN5bWJvbCA9IFN5bWJvbCgpOwpleHBvcnQgaW50ZXJmYWNlIENvbnRleHQgewogIFtLZXldOiBzdHJpbmc7Cn0= + + + //// [index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,OAErB,CAAA;AAED,eAAO,MAAM,WAAW,qBAAsB,OAAO,KAAG,MAAe,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,OAErB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,KAAG,MAAe,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgS2V5LCBDb250ZXh0IH0gZnJvbSAiLi9jb250ZXh0IjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGNvbnRleHQ6IENvbnRleHQ7DQpleHBvcnQgZGVjbGFyZSBjb25zdCB3aXRoQ29udGV4dDogKHsgW0tleV06IHZhbHVlIH06IENvbnRleHQpID0+IHN0cmluZzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxHQUFHLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBRXpDLGVBQU8sTUFBTSxPQUFPLEVBQUUsT0FFckIsQ0FBQTtBQUVELGVBQU8sTUFBTSxXQUFXLHFCQUFzQixPQUFPLEtBQUcsTUFBZSxDQUFDIn0=,aW1wb3J0IHsgS2V5LCBDb250ZXh0IH0gZnJvbSAiLi9jb250ZXh0IjsKCmV4cG9ydCBjb25zdCBjb250ZXh0OiBDb250ZXh0ID0gewogIFtLZXldOiAnYmFyJywKfQoKZXhwb3J0IGNvbnN0IHdpdGhDb250ZXh0ID0gKHsgW0tleV06IHZhbHVlIH06IENvbnRleHQpOiBzdHJpbmcgPT4gdmFsdWU7 ++//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgS2V5LCBDb250ZXh0IH0gZnJvbSAiLi9jb250ZXh0IjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGNvbnRleHQ6IENvbnRleHQ7DQpleHBvcnQgZGVjbGFyZSBjb25zdCB3aXRoQ29udGV4dDogKHsgW0tleV06IHZhbHVlIH06IENvbnRleHQpID0+IHN0cmluZzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxHQUFHLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBRXpDLGVBQU8sTUFBTSxPQUFPLEVBQUUsT0FFckIsQ0FBQTtBQUVELGVBQU8sTUFBTSxXQUFXLEdBQUksRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLEtBQUssRUFBRSxFQUFFLE9BQU8sS0FBRyxNQUFlLENBQUMifQ==,aW1wb3J0IHsgS2V5LCBDb250ZXh0IH0gZnJvbSAiLi9jb250ZXh0IjsKCmV4cG9ydCBjb25zdCBjb250ZXh0OiBDb250ZXh0ID0gewogIFtLZXldOiAnYmFyJywKfQoKZXhwb3J0IGNvbnN0IHdpdGhDb250ZXh0ID0gKHsgW0tleV06IHZhbHVlIH06IENvbnRleHQpOiBzdHJpbmcgPT4gdmFsdWU7 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitComputedNameConstEnumAlias.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitComputedNameConstEnumAlias.d.ts.diff new file mode 100644 index 0000000000000..9c2d3d5aac717 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitComputedNameConstEnumAlias.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/declarationEmitComputedNameConstEnumAlias.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,10 @@ + } + export default EnumExample; + //# sourceMappingURL=EnumExample.d.ts.map + //// [index.d.ts] ++import EnumExample from './EnumExample'; + declare const _default: { +- TEST: {}; ++ [EnumExample.TEST]: {}; + }; + export default _default; + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts.diff new file mode 100644 index 0000000000000..6df19c7e0b2c1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,6 @@ + + + //// [packages/secondpackage/index.d.ts] +-/// + import { Foo } from "@namespace/component"; + export declare const reeexported: Foo; + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff new file mode 100644 index 0000000000000..95e0dfe8744be --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff @@ -0,0 +1,99 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,35 +4,69 @@ + export declare class Foo { + } + //# sourceMappingURL=foo.d.ts.map + //// [index1.d.ts] +-declare function Example(): void; +-declare namespace Example { +- var Foo: typeof import("./foo").Foo; +-} +-export default Example; ++export default function Example(): void; + //# sourceMappingURL=index1.d.ts.map + //// [index2.d.ts] + import { Foo } from './foo'; + export { Foo }; +-declare function Example(): void; +-declare namespace Example { +- var Foo: typeof import("./foo").Foo; +-} +-export default Example; ++export default function Example(): void; + //# sourceMappingURL=index2.d.ts.map + //// [index3.d.ts] + export declare class Bar { + } +-declare function Example(): void; +-declare namespace Example { +- var Bar: typeof import("./index3").Bar; +-} +-export default Example; ++export default function Example(): void; + //# sourceMappingURL=index3.d.ts.map + //// [index4.d.ts] + export declare function C(): any; +-export declare namespace C { +- var A: () => void; +\ No newline at end of file +- var B: () => void; +-} +-//# sourceMappingURL=index4.d.ts.map ++//# sourceMappingURL=index4.d.ts.map ++/// [Errors] //// ++ ++index1.ts(3,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++index2.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++index3.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++index4.ts(9,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++index4.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== foo.ts (0 errors) ==== ++ export class Foo {} ++ ++==== index1.ts (1 errors) ==== ++ import {Foo} from './foo'; ++ export default function Example(): void {} ++ Example.Foo = Foo ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++==== index2.ts (1 errors) ==== ++ import {Foo} from './foo'; ++ export {Foo}; ++ export default function Example(): void {} ++ Example.Foo = Foo ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++==== index3.ts (1 errors) ==== ++ export class Bar {} ++ export default function Example(): void {} ++ ++ Example.Bar = Bar ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++==== index4.ts (2 errors) ==== ++ function A() { } ++ ++ function B() { } ++ ++ export function C(): any { ++ return null; ++ } ++ ++ C.A = A; ++ ~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ C.B = B; ++ ~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringParameterProperties.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringParameterProperties.d.ts.diff new file mode 100644 index 0000000000000..a9b0d7daff4ab --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringParameterProperties.d.ts.diff @@ -0,0 +1,46 @@ +// [[Reason: Syntactically invalid.]] //// + +//// [tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,29 +1,29 @@ + + + //// [declarationEmitDestructuringParameterProperties.d.ts] + declare class C1 { +- x: string; +- y: string; +- z: string; ++ x: invalid; ++ y: invalid; ++ z: invalid; + constructor([x, y, z]: string[]); + } + type TupleType1 = [string, number, boolean]; + declare class C2 { +- x: string; +- y: number; +- z: boolean; ++ x: invalid; ++ y: invalid; ++ z: invalid; + constructor([x, y, z]: TupleType1); + } + type ObjType1 = { + x: number; + y: string; + z: boolean; + }; + declare class C3 { +- x: number; +- y: string; +- z: boolean; ++ x: invalid; ++ y: invalid; ++ z: invalid; + constructor({ x, y, z }: ObjType1); + } + //# sourceMappingURL=declarationEmitDestructuringParameterProperties.d.ts.map + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDistributiveConditionalWithInfer.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDistributiveConditionalWithInfer.d.ts.map.diff new file mode 100644 index 0000000000000..7a3d19f714321 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDistributiveConditionalWithInfer.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitDistributiveConditionalWithInfer.d.ts.map] +-{"version":3,"file":"declarationEmitDistributiveConditionalWithInfer.d.ts","sourceRoot":"","sources":["declarationEmitDistributiveConditionalWithInfer.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,GAAG,6DAEL,UAAU,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,KAAG,IAAW,CAAC"} ++{"version":3,"file":"declarationEmitDistributiveConditionalWithInfer.d.ts","sourceRoot":"","sources":["declarationEmitDistributiveConditionalWithInfer.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,GAAG,GACZ,MAAM,EAAE,CAAC,UAAU,EAAE,KAAK,SAAS,MAAM,UAAU,OAC5C,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,KAAG,IAAW,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZnVuOiAoc3ViRnVuOiA8Q29sbGVjdGlvbiwgRmllbGQgZXh0ZW5kcyBrZXlvZiBDb2xsZWN0aW9uPigpID0+IEZsYXRB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FsV2l0aEluZmVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0RGlzdHJpYnV0aXZlQ29uZGl0aW9uYWxXaXRoSW5mZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdERpc3RyaWJ1dGl2ZUNvbmRpdGlvbmFsV2l0aEluZmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLGVBQU8sTUFBTSxHQUFHLEdBQ1osTUFBTSxFQUFFLENBQUMsVUFBVSxFQUFFLEtBQUssU0FBUyxNQUFNLFVBQVUsT0FDNUMsU0FBUyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBRSxLQUFHLElBQVcsQ0FBQyJ9,Ly8gVGhpcyBmdW5jdGlvbidzIHR5cGUgaXMgY2hhbmdlZCBvbiBkZWNsYXJhdGlvbgpleHBvcnQgY29uc3QgZnVuID0gKAogICAgc3ViRnVuOiA8Q29sbGVjdGlvbiwgRmllbGQgZXh0ZW5kcyBrZXlvZiBDb2xsZWN0aW9uPigpCiAgICAgICAgPT4gRmxhdEFycmF5PENvbGxlY3Rpb25bRmllbGRdLCAwPltdKTogdm9pZCA9PiB7IH07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.map.diff new file mode 100644 index 0000000000000..89b878bb9f938 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitDuplicateParameterDestructuring.d.ts.map] +-{"version":3,"file":"declarationEmitDuplicateParameterDestructuring.d.ts","sourceRoot":"","sources":["declarationEmitDuplicateParameterDestructuring.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,yBAA0B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAAe,CAAC;AAE7E,eAAO,MAAM,GAAG,gBAAiB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,eAAe;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAAe,CAAC"} ++{"version":3,"file":"declarationEmitDuplicateParameterDestructuring.d.ts","sourceRoot":"","sources":["declarationEmitDuplicateParameterDestructuring.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAAe,CAAC;AAE7E,eAAO,MAAM,GAAG,GAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAAe,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm4xOiAoeyBwcm9wOiBhLCBwcm9wOiBiIH06IHsNCiAgICBwcm9wOiBudW1iZXI7DQp9KSA9PiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjI6ICh7IHByb3A6IGEgfTogew0KICAgIHByb3A6IG51bWJlcjsNCn0sIHsgcHJvcDogYiB9OiB7DQogICAgcHJvcDogbnVtYmVyOw0KfSkgPT4gbnVtYmVyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVy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cHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sR0FBRyxHQUFJLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLEVBQUU7SUFBRSxJQUFJLEVBQUUsTUFBTSxDQUFBO0NBQUUsS0FBRyxNQUFlLENBQUM7QUFFN0UsZUFBTyxNQUFNLEdBQUcsR0FBSSxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUUsRUFBRTtJQUFFLElBQUksRUFBRSxNQUFNLENBQUE7Q0FBRSxFQUFFLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRSxFQUFFO0lBQUUsSUFBSSxFQUFFLE1BQU0sQ0FBQTtDQUFFLEtBQUcsTUFBZSxDQUFDIn0=,ZXhwb3J0IGNvbnN0IGZuMSA9ICh7IHByb3A6IGEsIHByb3A6IGIgfTogeyBwcm9wOiBudW1iZXIgfSk6IG51bWJlciA9PiBhICsgYjsKCmV4cG9ydCBjb25zdCBmbjIgPSAoeyBwcm9wOiBhIH06IHsgcHJvcDogbnVtYmVyIH0sIHsgcHJvcDogYiB9OiB7IHByb3A6IG51bWJlciB9KTogbnVtYmVyID0+IGEgKyBiOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoPropertyPrivateName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoPropertyPrivateName.d.ts.diff new file mode 100644 index 0000000000000..0b666d90c4e84 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoPropertyPrivateName.d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,20 +5,26 @@ + } + export declare function f(): I; + export {}; + //# sourceMappingURL=a.d.ts.map ++//// [b.d.ts] ++export declare function q(): void; ++//# sourceMappingURL=b.d.ts.map + /// [Errors] //// + + b.ts(4,1): error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. ++b.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + + ==== a.ts (0 errors) ==== + interface I {} + export function f(): I { return null as I; } +-==== b.ts (1 errors) ==== ++==== b.ts (2 errors) ==== + import {f} from "./a"; + + export function q(): void {} + q.val = f(); + ~~~~~ + !!! error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. ++ ~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoWithGenericConstraint.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoWithGenericConstraint.d.ts.map.diff new file mode 100644 index 0000000000000..2889071b631f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoWithGenericConstraint.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitExpandoWithGenericConstraint.d.ts.map] +-{"version":3,"file":"declarationEmitExpandoWithGenericConstraint.d.ts","sourceRoot":"","sources":["declarationEmitExpandoWithGenericConstraint.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,IAAI,CAAC,CAAC,SAAS,KAAK;IACjC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;CACjB;AAED,eAAO,MAAM,KAAK,EAAE;IAChB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC9B,IAAI,IAAI,KAAK,CAAC;CAC6B,CAAC;AAChD,eAAO,MAAM,IAAI,uBAAwB,CAAC,KAAK,CAAC,KAAG,KAAK,CAAC,CAAe,CAAC"} ++{"version":3,"file":"declarationEmitExpandoWithGenericConstraint.d.ts","sourceRoot":"","sources":["declarationEmitExpandoWithGenericConstraint.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,IAAI,CAAC,CAAC,SAAS,KAAK;IACjC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;CACjB;AAED,eAAO,MAAM,KAAK,EAAE;IAChB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC9B,IAAI,IAAI,KAAK,CAAC;CAC6B,CAAC;AAChD,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAG,IAAI,CAAC,CAAC,CAAe,CA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QUFHLElBQUksQ0FBQyxDQUFDLENBQWUsQ0FBQyJ9,ZXhwb3J0IGludGVyZmFjZSBQb2ludCB7CiAgICByZWFkb25seSB4OiBudW1iZXI7CiAgICByZWFkb25seSB5OiBudW1iZXI7Cn0KCmV4cG9ydCBpbnRlcmZhY2UgUmVjdDxwIGV4dGVuZHMgUG9pbnQ+IHsKICAgIHJlYWRvbmx5IGE6IHA7CiAgICByZWFkb25seSBiOiBwOwp9CgpleHBvcnQgY29uc3QgUG9pbnQ6IHsKICAgICh4OiBudW1iZXIsIHk6IG51bWJlcik6IFBvaW50OwogICAgemVybygpOiBQb2ludDsKfSA9ICh4OiBudW1iZXIsIHk6IG51bWJlcik6IFBvaW50ID0+ICh7IHgsIHkgfSk7CmV4cG9ydCBjb25zdCBSZWN0ID0gPHAgZXh0ZW5kcyBQb2ludD4oYTogcCwgYjogcCk6IFJlY3Q8cD4gPT4gKHsgYSwgYiB9KTsKClBvaW50Lnplcm8gPSAoKTogUG9pbnQgPT4gUG9pbnQoMCwgMCk7 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExportAliasVisibiilityMarking.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExportAliasVisibiilityMarking.d.ts.map.diff new file mode 100644 index 0000000000000..6904f66884deb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExportAliasVisibiilityMarking.d.ts.map.diff @@ -0,0 +1,30 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,9 @@ + + //// [Card.d.ts.map] +-{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;+BACf,IAAI,QAAQ,IAAI;UAC5B,IAAI;UACJ,IAAI;;AAFd,wBAGoB"} ++{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;yBACrB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,KAAG;IACrC,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;CACd;AAHD,wBAGoB"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogKHN1aXQ6IFN1aXQsIHJhbms6IFJhbmspID0+IHsNCiAgICBzdWl0OiBTdWl0Ow0KICAgIHJhbms6IFJhbms7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1DYXJkLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FyZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiQ2FyZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxNQUFNLFNBQVMsQ0FBQzsrQkFDZixJQUFJLFFBQVEsSUFBSTtVQUM1QixJQUFJO1VBQ0osSUFBSTs7QUFGZCx3QkFHb0IifQ==,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwpleHBvcnQgZGVmYXVsdCAoc3VpdDogU3VpdCwgcmFuazogUmFuayk6IHsKICAgIHN1aXQ6IFN1aXQ7CiAgICByYW5rOiBSYW5rOwp9ID0+ICh7c3VpdCwgcmFua30pOwo= ++//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOw0KZGVjbGFyZS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"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,IAAI,QAAQ,uBAAsB,IAAI,QAAQ,IAAI;UAC/C,IAAI;UACJ,IAAI;EAC6B,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,IAAI,QAAQ,QAAO,OAAO,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK;IAC1D,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;CACd,CAA0C,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOw0KZXhwb3J0IGRlY2xhcmUgbGV0IGxhenlDYXJkOiAoKSA9PiBQcm9taXNlPChzdWl0OiBTdWl0LCByYW5rOiBSYW5rKSA9PiB7DQogICAgc3VpdDogU3VpdDsNCiAgICByYW5rOiBSYW5rOw0KfT47DQpleHBvcnQgeyBTdWl0LCBSYW5rIH0gZnJvbSAnLi9UeXBlcyc7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBRXJDLGV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VBQUUsSUFBSSxLQUFLO0lBQzFELElBQUksRUFBRSxJQUFJLENBQUM7SUFDWCxJQUFJLEVBQUUsSUFBSSxDQUFDO0NBQ2QsQ0FBMEMsQ0FBQztBQUM1QyxPQUFPLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxNQUFNLFNBQVMsQ0FBQyJ9,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwoKZXhwb3J0IGxldCBsYXp5Q2FyZCA9ICgpOiBQcm9taXNlPChzdWl0OiBTdWl0LCByYW5rOiBSYW5rKSA9PiB7CiAgICBzdWl0OiBTdWl0OwogICAgcmFuazogUmFuazsKfT4gPT4gaW1wb3J0KCcuL0NhcmQnKS50aGVuKGEgPT4gYS5kZWZhdWx0KTsKZXhwb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpressionInExtends4.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpressionInExtends4.d.ts.diff new file mode 100644 index 0000000000000..fa30c08eddab5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpressionInExtends4.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/declarationEmitExpressionInExtends4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,21 @@ + ++ ++//// [declarationEmitExpressionInExtends4.d.ts] ++declare function getSomething(): { ++ new (): {}; ++}; ++declare const CBase: { ++ new (): {}; ++}; ++declare class C extends CBase { ++} ++declare const C2Base: any; ++declare class C2 extends C2Base { ++} ++declare class C3 extends SomeUndefinedFunction { ++} ++//# sourceMappingURL=declarationEmitExpressionInExtends4.d.ts.map + /// [Errors] //// + + declarationEmitExpressionInExtends4.ts(14,21): error TS2304: Cannot find name 'SomeUndefinedFunction'. + declarationEmitExpressionInExtends4.ts(20,18): error TS2304: Cannot find name 'SomeUndefinedFunction'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpressionInExtends7.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpressionInExtends7.d.ts.diff new file mode 100644 index 0000000000000..5dcce6649efcb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpressionInExtends7.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/declarationEmitExpressionInExtends7.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,10 @@ + ++ ++//// [declarationEmitExpressionInExtends7.d.ts] ++export default class extends SomeUndefinedFunction { ++} ++//# sourceMappingURL=declarationEmitExpressionInExtends7.d.ts.map + /// [Errors] //// + + declarationEmitExpressionInExtends7.ts(1,30): error TS2304: Cannot find name 'SomeUndefinedFunction'. + declarationEmitExpressionInExtends7.ts(1,30): error TS4021: 'extends' clause of exported class has or is using private name 'SomeUndefinedFunction'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff new file mode 100644 index 0000000000000..1fc0d4dfeab21 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff @@ -0,0 +1,58 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,46 @@ + + + //// [/p1/index.d.ts] +-export declare const a: import("typescript-fsa").A; +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file ++export declare const a: invalid; ++//# sourceMappingURL=index.d.ts.map ++/// [Errors] //// ++ ++/p1/index.ts(4,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++ ++ ++==== /p1/node_modules/typescript-fsa/src/impl.d.ts (0 errors) ==== ++ export function getA(): A; ++ export enum A { ++ Val ++ } ++==== /p1/node_modules/typescript-fsa/index.d.ts (0 errors) ==== ++ export * from "./src/impl"; ++==== /p1/node_modules/typescript-fsa/package.json (0 errors) ==== ++ { ++ "name": "typescript-fsa", ++ "version": "1.0.0" ++ } ++==== /p2/node_modules/typescript-fsa/src/impl.d.ts (0 errors) ==== ++ export function getA(): A; ++ export enum A { ++ Val ++ } ++==== /p2/node_modules/typescript-fsa/index.d.ts (0 errors) ==== ++ export * from "./src/impl"; ++==== /p2/node_modules/typescript-fsa/package.json (0 errors) ==== ++ { ++ "name": "typescript-fsa", ++ "version": "1.0.0" ++ } ++==== /p1/index.ts (1 errors) ==== ++ import * as _whatever from "p2"; ++ import { getA } from "typescript-fsa"; ++ ++ export const a = getA(); ++ ~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 /p1/index.ts:4:14: Add a type annotation to the variable a. ++==== /p2/index.d.ts (0 errors) ==== ++ export const a: import("typescript-fsa").A; ++ ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff new file mode 100644 index 0000000000000..abafadc54762d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff @@ -0,0 +1,46 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,34 @@ + + + //// [/p1/index.d.ts] +-export declare const a: import("typescript-fsa").A; +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file ++export declare const a: invalid; ++//# sourceMappingURL=index.d.ts.map ++/// [Errors] //// ++ ++/p1/index.ts(4,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++ ++ ++==== /cache/typescript-fsa/src/impl.d.ts (0 errors) ==== ++ export function getA(): A; ++ export enum A { ++ Val ++ } ++==== /cache/typescript-fsa/index.d.ts (0 errors) ==== ++ export * from "./src/impl"; ++==== /cache/typescript-fsa/package.json (0 errors) ==== ++ { ++ "name": "typescript-fsa", ++ "version": "1.0.0" ++ } ++==== /p1/index.ts (1 errors) ==== ++ import * as _whatever from "p2"; ++ import { getA } from "typescript-fsa"; ++ ++ export const a = getA(); ++ ~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 /p1/index.ts:4:14: Add a type annotation to the variable a. ++==== /p2/index.d.ts (0 errors) ==== ++ export const a: import("typescript-fsa").A; ++ ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff new file mode 100644 index 0000000000000..38ab3a9f5cbee --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TSC adds import for augmentation, DTE can't know about the augmentation.]] //// + +//// [tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,8 +9,7 @@ + } + export declare function child1(prototype: ParentThing): void; + //# sourceMappingURL=child1.d.ts.map + //// [/.src/parent.d.ts] +-import './child1'; + export declare class ParentThing implements ParentThing { + } + //# sourceMappingURL=parent.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionDuplicateNamespace.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionDuplicateNamespace.d.ts.diff new file mode 100644 index 0000000000000..e9231345bb7ad --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionDuplicateNamespace.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,8 +2,21 @@ + + //// [declarationEmitFunctionDuplicateNamespace.d.ts] + declare function f(a: 0): 0; + declare function f(a: 1): 1; +-declare namespace f { +- var x: number; +-} +-//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map ++/// [Errors] //// ++ ++declarationEmitFunctionDuplicateNamespace.ts(7,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== declarationEmitFunctionDuplicateNamespace.ts (1 errors) ==== ++ function f(a: 0): 0; ++ function f(a: 1): 1; ++ function f(a: 0 | 1) { ++ return a; ++ } ++ ++ f.x = 2; ++ ~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionKeywordProp.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionKeywordProp.d.ts.diff new file mode 100644 index 0000000000000..c1dfe66bdfd7b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionKeywordProp.d.ts.diff @@ -0,0 +1,61 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/declarationEmitFunctionKeywordProp.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,20 +1,37 @@ + + + //// [declarationEmitFunctionKeywordProp.d.ts] + declare function foo(): void; +-declare namespace foo { +- var _a: boolean; +- export { _a as null }; +-} + declare function bar(): void; +-declare namespace bar { +- var async: boolean; +- var normal: boolean; +-} + declare function baz(): void; +-declare namespace baz { +- var _a: boolean; +- export var normal: boolean; +- export { _a as class }; +-} +-//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map ++/// [Errors] //// ++ ++declarationEmitFunctionKeywordProp.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitFunctionKeywordProp.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitFunctionKeywordProp.ts(6,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitFunctionKeywordProp.ts(9,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitFunctionKeywordProp.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== declarationEmitFunctionKeywordProp.ts (5 errors) ==== ++ function foo(): void {} ++ foo.null = true; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ function bar(): void {} ++ bar.async = true; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ bar.normal = false; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ function baz(): void {} ++ baz.class = true; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ baz.normal = false; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitGlobalThisPreserved.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitGlobalThisPreserved.d.ts.map.diff new file mode 100644 index 0000000000000..4436ffc2c675a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitGlobalThisPreserved.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitGlobalThisPreserved.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitGlobalThisPreserved.d.ts.map] +-{"version":3,"file":"declarationEmitGlobalThisPreserved.d.ts","sourceRoot":"","sources":["declarationEmitGlobalThisPreserved.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,EAAE,6DAAqE,CAAC;AACrF,eAAO,MAAM,EAAE,4FAA2G,CAAC;AAC3H,eAAO,MAAM,EAAE,UAAW,MAAM,0DAA+D,CAAC;AAChG,eAAO,MAAM,EAAE,UAAW,MAAM,4BAA8C,CAAC;AAE/E,eAAO,MAAM,IAAI;;;gBAGD,MAAM;gBACN,MAAM;CACrB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACzD,MAAM,MAAM,SAAS,GAAG,UA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IG51bWJlciwgYmFyOiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTik6ICgpID0+IHsKICAgIGJhcjogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU47Cn0gewogICAgcmV0dXJuIGZ1bmN0aW9uKCkgeyByZXR1cm4geyBiYXIgfSB9Owp9CgovLyBOb24taW5mZXJlbmNlIGNhc2VzLgoKZXhwb3J0IGNvbnN0IGV4cGxpY2l0bHlUeXBlZFZhcmlhYmxlOiAoaXNOYU46IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOKSA9PiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTiA9IChpc05hTikgPT4gaXNOYU47CgpleHBvcnQgZnVuY3Rpb24gZXhwbGljaXRseVR5cGVkRnVuY3Rpb24oaXNOYU46IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOKTogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4gewogICAgcmV0dXJuIGlzTmFOOwp9OwoKZXhwb3J0IHR5cGUgQXNPYmplY3RQcm9wZXJ0eSA9IHsKICAgIGlzTmFOOiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTjsKfQoKZXhwb3J0IGNsYXNzIEFzQ2xhc3NQcm9wZXJ0eSB7CiAgICBpc05hTj86IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwp9CgpleHBvcnQgdHlwZSBBc0Z1bmN0aW9uVHlwZSA9IChpc05hTjogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4pID0+IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwoK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitIndexTypeNotFound.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitIndexTypeNotFound.d.ts.diff new file mode 100644 index 0000000000000..eb2c246243821 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitIndexTypeNotFound.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/declarationEmitIndexTypeNotFound.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,11 @@ + ++ ++//// [declarationEmitIndexTypeNotFound.d.ts] ++export interface Test { ++ [index: TypeNotFound]: any; ++} ++//# sourceMappingURL=declarationEmitIndexTypeNotFound.d.ts.map + /// [Errors] //// + + declarationEmitIndexTypeNotFound.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. + declarationEmitIndexTypeNotFound.ts(2,13): error TS2304: Cannot find name 'TypeNotFound'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInlinedDistributiveConditional.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInlinedDistributiveConditional.d.ts.diff new file mode 100644 index 0000000000000..0ebeef6b5dd2e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInlinedDistributiveConditional.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/declarationEmitInlinedDistributiveConditional.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,10 +4,14 @@ + export {}; + //# sourceMappingURL=test.d.ts.map + //// [/.src/api.d.ts] + import { PublicKeys1 } from './internal'; +-export declare const dropPrivateProps1: (obj: Obj) => { [K in PublicKeys1]: Obj[K]; }; +-export declare const dropPrivateProps2: (obj: Obj) => { [K in keyof Obj extends infer T ? T extends keyof Obj ? T extends `_${string}` ? never : T : never : never]: Obj[K]; }; ++export declare const dropPrivateProps1: (obj: Obj) => { ++ [K in PublicKeys1]: Obj[K]; ++}; ++export declare const dropPrivateProps2: (obj: Obj) => { ++ [K in keyof Obj extends infer T ? T extends keyof Obj ? T extends `_${string}` ? never : T : never : never]: Obj[K]; ++}; + //# sourceMappingURL=api.d.ts.map + //// [/.src/internal.d.ts] + export declare function excludePrivateKeys1(obj: Obj): { + [K in PublicKeys1]: Obj[K]; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts.diff new file mode 100644 index 0000000000000..0973cfe92452c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/declarationEmitLambdaWithMissingTypeParameterNoCrash.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,12 @@ + ++ ++//// [declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts] ++export interface Foo { ++ preFetch: (c: T1) => void; ++ preFetcher: new (c: T1) => void; ++} ++//# sourceMappingURL=declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts.map + /// [Errors] //// + + declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(2,27): error TS2304: Cannot find name 'T2'. + declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(2,27): error TS4016: Type parameter 'T1' of exported function has or is using private name 'T2'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments.d.ts.diff new file mode 100644 index 0000000000000..17c4c3496516c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/declarationEmitLateBoundAssignments.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,40 @@ + + + //// [declarationEmitLateBoundAssignments.d.ts] + export declare function foo(): void; +-export declare namespace foo { +- var bar: number; +- var strMemName: string; +-} +-//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map ++/// [Errors] //// ++ ++declarationEmitLateBoundAssignments.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments.ts(6,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments.ts(8,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== declarationEmitLateBoundAssignments.ts (5 errors) ==== ++ export function foo(): void {} ++ foo.bar = 12; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ const _private = Symbol(); ++ foo[_private] = "ok"; ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ const strMem = "strMemName"; ++ foo[strMem] = "ok"; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ const dashStrMem = "dashed-str-mem"; ++ foo[dashStrMem] = "ok"; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ const numMem = 42; ++ foo[numMem] = "ok"; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ const x: string = foo[_private]; ++ const y: string = foo[strMem]; ++ const z: string = foo[numMem]; ++ const a: string = foo[dashStrMem]; +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments2.d.ts.diff new file mode 100644 index 0000000000000..32c47d935c1aa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments2.d.ts.diff @@ -0,0 +1,181 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/declarationEmitLateBoundAssignments2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,31 +1,17 @@ + + + //// [declarationEmitLateBoundAssignments2.d.ts] + export declare function decl(): void; +-export declare namespace decl { +- var B: string; +-} + export declare function decl2(): void; +-export declare namespace decl2 { +- var C: number; +-} + export declare function decl3(): void; +-export declare namespace decl3 { } + export declare function decl4(): void; +-export declare namespace decl4 { } + export declare function decl5(): void; +-export declare namespace decl5 { } + export declare function decl6(): void; +-export declare namespace decl6 { } + export declare function decl7(): void; +-export declare namespace decl7 { } + export declare function decl8(): void; +-export declare namespace decl8 { } + export declare function decl9(): void; +-export declare namespace decl9 { } + export declare function decl10(): void; +-export declare namespace decl10 { } + export declare const arrow: { + (): void; + B: string; + }; +@@ -64,5 +50,138 @@ + export declare const arrow10: { + (): void; + "🤷‍♂️": number; + }; +-//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map ++/// [Errors] //// ++ ++declarationEmitLateBoundAssignments2.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(13,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(16,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(19,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(22,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(25,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(28,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(31,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(34,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++declarationEmitLateBoundAssignments2.ts(37,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== declarationEmitLateBoundAssignments2.ts (10 errors) ==== ++ // https://github.com/microsoft/TypeScript/issues/54811 ++ ++ const c = "C" ++ const num = 1 ++ const numStr = "10" ++ const withWhitespace = "foo bar" ++ const emoji = "🤷‍♂️" ++ ++ export function decl(): void {} ++ decl["B"] = 'foo' ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl2(): void {} ++ decl2[c] = 0 ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl3(): void {} ++ decl3[77] = 0 ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl4(): void {} ++ decl4[num] = 0 ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl5(): void {} ++ decl5["101"] = 0 ++ ~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl6(): void {} ++ decl6[numStr] = 0 ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl7(): void {} ++ decl7["qwe rty"] = 0 ++ ~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl8(): void {} ++ decl8[withWhitespace] = 0 ++ ~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl9(): void {} ++ decl9["🤪"] = 0 ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export function decl10(): void {} ++ decl10[emoji] = 0 ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ export const arrow: { ++ (): void ++ B: string ++ } = (): void => {} ++ arrow["B"] = 'bar' ++ ++ export const arrow2: { ++ (): void ++ C: number ++ } = (): void => {} ++ arrow2[c] = 100 ++ ++ export const arrow3: { ++ (): void ++ 77: number ++ } = (): void => {} ++ arrow3[77] = 0 ++ ++ export const arrow4: { ++ (): void ++ 1: number ++ } = (): void => {} ++ arrow4[num] = 0 ++ ++ export const arrow5: { ++ (): void ++ "101": number ++ } = (): void => {} ++ arrow5["101"] = 0 ++ ++ export const arrow6: { ++ (): void ++ "10": number ++ } = (): void => {} ++ arrow6[numStr] = 0 ++ ++ export const arrow7: { ++ (): void ++ "qwe rty": number ++ } = (): void => {} ++ arrow7["qwe rty"] = 0 ++ ++ export const arrow8: { ++ (): void ++ "foo bar": number ++ } = (): void => {} ++ arrow8[withWhitespace] = 0 ++ ++ export const arrow9: { ++ (): void ++ "🤪": number ++ } = (): void => {} ++ arrow9["🤪"] = 0 ++ ++ export const arrow10: { ++ (): void ++ "🤷‍♂️": number ++ } = (): void => {} ++ arrow10[emoji] = 0 ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedPrivateTypeTypeParameter.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedPrivateTypeTypeParameter.d.ts.diff new file mode 100644 index 0000000000000..e39154f23f970 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedPrivateTypeTypeParameter.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,11 @@ + + ++//// [/FromFactor.d.ts] ++export type RowToColumns = { ++ [TName in StringKeyOf]: any; ++}; ++//# sourceMappingURL=FromFactor.d.ts.map + //// [/Helpers.d.ts] + export type StringKeyOf = Extract; + //# sourceMappingURL=Helpers.d.ts.map + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts.diff new file mode 100644 index 0000000000000..8e68160e714cc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: There will be separate TS error on 'timestamp', but fixer does not know about this so it'll try to fix the missing type.]] //// + +//// [tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,11 @@ + [x.timestampSymbol]: true; + }; + //# sourceMappingURL=b.d.ts.map + //// [c.d.ts] +-export declare const timestamp: {}; ++export declare const timestamp: { ++ [timestampSymbol]: true; ++}; + //# sourceMappingURL=c.d.ts.map + /// [Errors] //// + + c.ts(4,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitNameConflicts3.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitNameConflicts3.d.ts.map.diff new file mode 100644 index 0000000000000..2417912abf72e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitNameConflicts3.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitNameConflicts3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitNameConflicts3.d.ts.map] +-{"version":3,"file":"declarationEmitNameConflicts3.d.ts","sourceRoot":"","sources":["declarationEmitNameConflicts3.ts"],"names":[],"mappings":"AAAA,kBAAO,CAAC,CAAC;IACL,UAAiB,CAAC;KAAI;IACtB,UAAc,CAAC,CAAC;QACZ,SAAgB,CAAC,IAAI,IAAI,CAAI;KA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3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBDIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBFIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQp9Cgptb2R1bGUgTS5QIHsKICAgIGV4cG9ydCBjbGFzcyBDIHsKICAgICAgICBzdGF0aWMgZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IGNsYXNzIEUgZXh0ZW5kcyBDIHsgfQogICAgZXhwb3J0IGVudW0gRCB7CiAgICAgICAgZgogICAgfQogICAgZXhwb3J0IHZhciB2OiBNLkQ7IC8vIG9rCiAgICBleHBvcnQgdmFyIHc6IHR5cGVvZiBNLkQuZiA9IE0uRC5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkQuZgogICAgZXhwb3J0IHZhciB4OiB0eXBlb2YgTS5DLmYgPSBNLkMuZjsgLy8gZXJyb3IsIHNob3VsZCBiZSB0eXBlb2YgTS5DLmYKICAgIGV4cG9ydCB2YXIgeCA9IE0uRS5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkUuZgp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitNoNonRequiredParens.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitNoNonRequiredParens.d.ts.diff new file mode 100644 index 0000000000000..fee2257a7f193 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitNoNonRequiredParens.d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/declarationEmitNoNonRequiredParens.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,6 +6,6 @@ + B = 1, + C = 2 + } + export type TestType = typeof Test; +-export declare const bar: Test[]; ++export declare const bar: TestType[Extract][]; + //# sourceMappingURL=declarationEmitNoNonRequiredParens.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff new file mode 100644 index 0000000000000..95356d7d16706 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff @@ -0,0 +1,54 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,16 @@ + ++ ++//// [index.d.ts] ++import { DefaultTheme, StyledComponent } from "styled-components"; ++export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; ++declare const _default: invalid; ++export default _default; ++//# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + index.ts(7,1): error TS2742: The inferred type of 'default' cannot be named without a reference to 'styled-components/node_modules/hoist-non-react-statics'. This is likely not portable. A type annotation is necessary. ++index.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. + + + ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== + interface Statics { +@@ -30,21 +38,27 @@ + } + + declare const styled: StyledInterface; + export default styled; +-==== index.ts (1 errors) ==== ++==== index.ts (2 errors) ==== + import styled, { DefaultTheme, StyledComponent } from "styled-components"; + + const A = styled.div``; + const B = styled.div``; + export const C: StyledComponent<"div", DefaultTheme, {}, never> = styled.div``; + + export default Object.assign(A, { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ~~~~~~~~~~~~~~~~~~ + B, + ~~~~~~ ++ ~~~~~~ + C + ~~~~~ ++ ~~~~~ + }); + ~~~ + !!! error TS2742: The inferred type of 'default' cannot be named without a reference to 'styled-components/node_modules/hoist-non-react-statics'. This is likely not portable. A type annotation is necessary. ++ ~~ ++!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. ++!!! related TS9036 index.ts:7:1: Move the expression in default export to a variable and add a type annotation to it. + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff new file mode 100644 index 0000000000000..2555b455e8013 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// + +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,9 +2,11 @@ + + //// [declarationEmitObjectLiteralAccessors1.d.ts] + export declare const obj1: { + /** my awesome getter (first in source order) */ +- x: string; ++ get x(): string; ++ /** my awesome setter (second in source order) */ ++ set x(a: string); + }; + export declare const obj2: { + /** my awesome getter */ + get x(): string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitOptionalMethod.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitOptionalMethod.d.ts.map.diff new file mode 100644 index 0000000000000..bc37c0b537c6b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitOptionalMethod.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitOptionalMethod.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitOptionalMethod.d.ts.map] +-{"version":3,"file":"declarationEmitOptionalMethod.d.ts","sourceRoot":"","sources":["declarationEmitOptionalMethod.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,SAAU;IACtB,CAAC,CAAC,IAAI,IAAI,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,KAAG;IACA,CAAC,CAAC,IAAI,IAAI,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC;CACR,CAAC"} ++{"version":3,"file":"declarationEmitOptionalMethod.d.ts","sourceRoot":"","sources":["declarationEmitOptionalMethod.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,IAAI,EAAE;IACtB,CAAC,CAAC,IAAI,IAAI,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,KAAG;IACA,CAAC,CAAC,IAAI,IAAI,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC;CACR,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgRm9vOiAob3B0czogew0KICAgIGE/KCk6IHZvaWQ7DQogICAgYj86ICgpID0+IHZvaWQ7DQp9KSA9PiB7DQogICAgYz8oKTogdm9pZDsNCiAgICBkPzogKCkgPT4gdm9pZDsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRPcHRpb25hbE1ldGhvZC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0T3B0aW9uYWxNZXRob2QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdE9wdGlvbmFsTWV0aG9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSxHQUFHLFNBQVU7SUFDdEIsQ0FBQyxDQUFDLElBQUksSUFBSSxDQUFDO0lBQ1gsQ0FBQyxDQUFDLEVBQUUsTUFBTSxJQUFJLENBQUM7Q0FDbEIsS0FBRztJQUNBLENBQUMsQ0FBQyxJ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ICAgZD86ICgpID0+IHZvaWQsCn0gPT4gKHsgIH0pOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.map.diff new file mode 100644 index 0000000000000..d61d9d81f86ce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitParameterProperty.d.ts.map] +-{"version":3,"file":"declarationEmitParameterProperty.d.ts","sourceRoot":"","sources":["declarationEmitParameterProperty.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACK,GAAG,CAAC;gBAAJ,GAAG,CAAC,oBAAQ;CAEhC"} ++{"version":3,"file":"declarationEmitParameterProperty.d.ts","sourceRoot":"","sources":["declarationEmitParameterProperty.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACK,GAAG,CAAC,EAAE,MAAM;gBAAZ,GAAG,CAAC,EAAE,MAAM,YAAA;CAEhC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBiYXI/OiBzdHJpbmcgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoYmFyPzogc3RyaW5nIHwgdW5kZWZpbmVkKTsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UGFyYW1ldGVyUHJvcGVydHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHFCQUFhLEdBQUc7SUFDSyxHQUFHLENBQUM7Z0JBQUosR0FBRyxDQUFDLG9CQUFRO0NBRWhDIn0=,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgY29uc3RydWN0b3IocHVibGljIGJhcj86IHN0cmluZykgewogIH0KfQo= ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBiYXI/OiBzdHJpbmcgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoYmFyPzogc3RyaW5nIHwgdW5kZWZpbmVkKTsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UGFyYW1ldGVyUHJvcGVydHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHFCQUFhLEdBQUc7SUFDSyxHQUFHLENBQUMsRUFBRSxNQUFNO2dCQUFaLEdBQUcsQ0FBQyxFQUFFLE1BQU0sWUFBQTtDQUVoQyJ9,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgY29uc3RydWN0b3IocHVibGljIGJhcj86IHN0cmluZykgewogIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.diff new file mode 100644 index 0000000000000..0d09f59d5088c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.diff @@ -0,0 +1,15 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,6 +3,6 @@ + {"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["../../../src/lib/operators/scalar.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,IAAI,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5C"} + + + //// [/.src/dist/settings/spacing.d.ts.map] +-{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/settings/spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;;;AAEzD,wBAIE"} ++{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/settings/spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;aAGpD,EAAE,EAAI,MAAM;;AADjB,wBAIE"} + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map.diff new file mode 100644 index 0000000000000..af1b880cce162 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map.diff @@ -0,0 +1,18 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,8 +5,8 @@ + //// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBTY2FsYXIgew0KICAgICgpOiBzdHJpbmc7DQogICAgdmFsdWU6IG51bWJlcjsNCn0NCmV4cG9ydCBkZWNsYXJlIGZ1bmN0aW9uIHNjYWxhcih2YWx1ZTogc3RyaW5nKTogU2NhbGFyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c2NhbGFyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NhbGFyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY2FsYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxXQUFXLE1BQU07SUFDdEIsSUFBSSxNQUFNLENBQUM7SUFDWCxLQUFLLEVBQUUsTUFBTSxDQUFDO0NBQ2Q7QUFFRCx3QkFBZ0IsTUFBTSxDQUFDLEtBQUssRUFBRSxNQUFNLEdBQUcsTUFBTSxDQUU1QyJ9,ZXhwb3J0IGludGVyZmFjZSBTY2FsYXIgewoJKCk6IHN0cmluZzsKCXZhbHVlOiBudW1iZXI7Cn0KCmV4cG9ydCBmdW5jdGlvbiBzY2FsYXIodmFsdWU6IHN0cmluZyk6IFNjYWxhciB7CglyZXR1cm4gbnVsbCBhcyBhbnk7Cn0= + + + //// [src/settings/spacing.d.ts.map] +-{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;;;AAEzD,wBAIE"} ++{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;aAGpD,EAAE,EAAI,MAAM;;AADjB,wBAIE"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGV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0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPropertyNumericStringKey.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPropertyNumericStringKey.d.ts.diff new file mode 100644 index 0000000000000..d972a411b8012 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPropertyNumericStringKey.d.ts.diff @@ -0,0 +1,22 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,11 +5,11 @@ + readonly "404": "not found"; + }; + declare const hundredStr = "100"; + declare const obj: { +- "100": string; ++ [hundredStr]: string; + }; + declare const hundredNum = 100; + declare const obj2: { +- 100: string; ++ [hundredNum]: string; + }; + //# sourceMappingURL=declarationEmitPropertyNumericStringKey.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReadonlyComputedProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReadonlyComputedProperty.d.ts.diff new file mode 100644 index 0000000000000..b0903003ff21d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReadonlyComputedProperty.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: There will be separate TS error on 'spread', but fixer does not know about this so it'll try to fix the missing type.]] //// + +//// [tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,9 +7,11 @@ + } + export declare function createInstance(): Interface; + //# sourceMappingURL=bug.d.ts.map + //// [index.d.ts] +-export declare const spread: {}; ++export declare const spread: { ++ [SYMBOL]: string; ++}; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + index.ts(4,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map.diff new file mode 100644 index 0000000000000..4be4a0df5fd0a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [a.d.ts.map] +-{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,KAAK,oDACT,GAAG,WACC,OAAO,KACjB,MAAM,GAAG,EAAE,OAAO,CAA8B,CAAC"} ++{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,KAAK,GAAI,GAAG,SAAS,MAAM,EAAE,OAAO,SAAS,MAAM,EAC5D,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,KACjB,KAAK,CAAC,GAAG,EAAE,OAAO,CAA8B,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgUG93ZXIgfSBmcm9tICIuL2lucHV0IjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IHBvd2VyOiA8TnVtIGV4dGVuZHMgbnVtYmVyLCBQb3dlck9mIGV4dGVuZHMgbnVtYmVyPihudW06IE51bSwgcG93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VMsQ0FBQztBQUVoQyxlQUFPLE1BQU0sS0FBSyxHQUFJLEdBQUcsU0FBUyxNQUFNLEVBQUUsT0FBTyxTQUFTLE1BQU0sRUFDNUQsR0FBRyxFQUFFLEdBQUcsRUFDUixPQUFPLEVBQUUsT0FBTyxLQUNqQixLQUFLLENBQUMsR0FBRyxFQUFFLE9BQU8sQ0FBOEIsQ0FBQyJ9,aW1wb3J0IHsgUG93ZXIgfSBmcm9tICIuL2lucHV0IjsKCmV4cG9ydCBjb25zdCBwb3dlciA9IDxOdW0gZXh0ZW5kcyBudW1iZXIsIFBvd2VyT2YgZXh0ZW5kcyBudW1iZXI+KAogICAgbnVtOiBOdW0sCiAgICBwb3dlck9mOiBQb3dlck9mCik6IFBvd2VyPE51bSwgUG93ZXJPZj4gPT4gKG51bSAqKiBwb3dlck9mKSBhcyBuZXZlcjs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff new file mode 100644 index 0000000000000..db4154b598169 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff @@ -0,0 +1,69 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,56 @@ + //// [/.src/monorepo/pkg3/dist/index.d.ts] + export * from './keys'; + //# sourceMappingURL=index.d.ts.map + //// [/.src/monorepo/pkg3/dist/keys.d.ts] +-import { MetadataAccessor } from "@raymondfeng/pkg2"; +-export declare const ADMIN: MetadataAccessor; +-//# sourceMappingURL=keys.d.ts.map +\ No newline at end of file ++export declare const ADMIN: invalid; ++//# sourceMappingURL=keys.d.ts.map ++/// [Errors] //// ++ ++monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++ ++ ++==== monorepo/pkg3/src/index.ts (0 errors) ==== ++ export * from './keys'; ++==== monorepo/pkg3/src/keys.ts (1 errors) ==== ++ import {MetadataAccessor} from "@raymondfeng/pkg2"; ++ ++ export const ADMIN = MetadataAccessor.create('1'); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 monorepo/pkg3/src/keys.ts:3:14: Add a type annotation to the variable ADMIN. ++==== monorepo/pkg1/dist/index.d.ts (0 errors) ==== ++ export * from './types'; ++==== monorepo/pkg1/dist/types.d.ts (0 errors) ==== ++ export declare type A = { ++ id: string; ++ }; ++ export declare type B = { ++ id: number; ++ }; ++ export declare type IdType = A | B; ++ export declare class MetadataAccessor { ++ readonly key: string; ++ private constructor(); ++ toString(): string; ++ static create(key: string): MetadataAccessor; ++ } ++==== monorepo/pkg1/package.json (0 errors) ==== ++ { ++ "name": "@raymondfeng/pkg1", ++ "version": "1.0.0", ++ "description": "", ++ "main": "dist/index.js", ++ "typings": "dist/index.d.ts" ++ } ++==== monorepo/pkg2/dist/index.d.ts (0 errors) ==== ++ export * from './types'; ++==== monorepo/pkg2/dist/types.d.ts (0 errors) ==== ++ export * from '@raymondfeng/pkg1'; ++==== monorepo/pkg2/package.json (0 errors) ==== ++ { ++ "name": "@raymondfeng/pkg2", ++ "version": "1.0.0", ++ "description": "", ++ "main": "dist/index.js", ++ "typings": "dist/index.d.ts" ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff new file mode 100644 index 0000000000000..f1046297a27b3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff @@ -0,0 +1,72 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,59 @@ + //// [/.src/monorepo/pkg3/dist/index.d.ts] + export * from './keys'; + //# sourceMappingURL=index.d.ts.map + //// [/.src/monorepo/pkg3/dist/keys.d.ts] +-import { MetadataAccessor } from "@raymondfeng/pkg2"; +-export declare const ADMIN: MetadataAccessor; +-//# sourceMappingURL=keys.d.ts.map +\ No newline at end of file ++export declare const ADMIN: invalid; ++//# sourceMappingURL=keys.d.ts.map ++/// [Errors] //// ++ ++monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++ ++ ++==== monorepo/pkg3/src/index.ts (0 errors) ==== ++ export * from './keys'; ++==== monorepo/pkg3/src/keys.ts (1 errors) ==== ++ import {MetadataAccessor} from "@raymondfeng/pkg2"; ++ ++ export const ADMIN = MetadataAccessor.create('1'); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 monorepo/pkg3/src/keys.ts:3:14: Add a type annotation to the variable ADMIN. ++==== monorepo/pkg1/dist/index.d.ts (0 errors) ==== ++ export * from './types'; ++==== monorepo/pkg1/dist/types.d.ts (0 errors) ==== ++ export declare type A = { ++ id: string; ++ }; ++ export declare type B = { ++ id: number; ++ }; ++ export declare type IdType = A | B; ++ export declare class MetadataAccessor { ++ readonly key: string; ++ private constructor(); ++ toString(): string; ++ static create(key: string): MetadataAccessor; ++ } ++==== monorepo/pkg1/package.json (0 errors) ==== ++ { ++ "name": "@raymondfeng/pkg1", ++ "version": "1.0.0", ++ "description": "", ++ "main": "dist/index.js", ++ "typings": "dist/index.d.ts" ++ } ++==== monorepo/pkg2/dist/index.d.ts (0 errors) ==== ++ import "./secondary"; ++ export * from './types'; ++==== monorepo/pkg2/dist/types.d.ts (0 errors) ==== ++ export {MetadataAccessor} from '@raymondfeng/pkg1'; ++==== monorepo/pkg2/dist/secondary.d.ts (0 errors) ==== ++ export {IdType} from '@raymondfeng/pkg1'; ++==== monorepo/pkg2/package.json (0 errors) ==== ++ { ++ "name": "@raymondfeng/pkg2", ++ "version": "1.0.0", ++ "description": "", ++ "main": "dist/index.js", ++ "typings": "dist/index.d.ts" ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff new file mode 100644 index 0000000000000..b48ff132c57fa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff @@ -0,0 +1,37 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,21 +2,28 @@ + + //// [/.src/monorepo/pkg3/dist/index.d.ts] + export * from './keys'; + //# sourceMappingURL=index.d.ts.map ++//// [/.src/monorepo/pkg3/dist/keys.d.ts] ++export declare const ADMIN: invalid; ++//# sourceMappingURL=keys.d.ts.map + /// [Errors] //// + + monorepo/pkg3/src/keys.ts(3,14): error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary. ++monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + + ==== monorepo/pkg3/src/index.ts (0 errors) ==== + export * from './keys'; +-==== monorepo/pkg3/src/keys.ts (1 errors) ==== ++==== monorepo/pkg3/src/keys.ts (2 errors) ==== + import {MetadataAccessor} from "@raymondfeng/pkg2"; + + export const ADMIN = MetadataAccessor.create('1'); + ~~~~~ + !!! error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 monorepo/pkg3/src/keys.ts:3:14: Add a type annotation to the variable ADMIN. + ==== monorepo/pkg1/dist/index.d.ts (0 errors) ==== + export * from './types'; + ==== monorepo/pkg1/dist/types.d.ts (0 errors) ==== + export declare type A = { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRetainsJsdocyComments.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRetainsJsdocyComments.d.ts.map.diff new file mode 100644 index 0000000000000..4c308aa9ff517 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRetainsJsdocyComments.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitRetainsJsdocyComments.d.ts.map] +-{"version":3,"file":"declarationEmitRetainsJsdocyComments.d.ts","sourceRoot":"","sources":["declarationEmitRetainsJsdocyComments.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,GAAG,MAAO,MAAM;IACzB;;;OAGG;aACM,MAAM,KAAK,IAAI;IACxB;;;OAGG;YACK,MAAM,GAAG,IAAI;CAcxB,CAAA;AAED,qBAAa,GAAG;IACZ;;;OAGG;IACH,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;CAEvB;AAGD,eAAO;AACH;;EAEE;AACF,UAAU,EAAE,GAAqB,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO;QACb;;UAEE;QACF,UAAU,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;KAC1C;CACJ"} ++{"version":3,"file":"declarationEmitRetainsJsdocyComments.d.ts","sourceRoot":"","sources":["declarationEmitRetainsJsdocyComments.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,GAAG,GAAI,CAAC,EAAE,MAAM,KAAG;IAC5B;;;OAGG;IACH,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAczB,CAAA;AAED,qBAAa,GAAG;IACZ;;;OAGG;IACH,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;CAEvB;AAGD,eAAO;AACH;;EAEE;AACF,UAAU,EAAE,GAAqB,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO;QACb;;UAEE;QACF,UAAU,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;KAC1C;CACJ"} + +-//// https://sokra.github.io/source-map-visualization#base64,LyoqDQogKiBjb21tZW50MQ0KICogQHBhcmFtIHANCiAqLw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiAocDogc3RyaW5nKSA9PiB7DQogICAgLyoqDQogICAgICogY29tbWVudDINCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcjogKHM6IG51bWJlcikgPT4gdm9pZDsNCiAgICAvKioNCiAgICAgKiBjb21tZW50Mw0KICAgICAqIEBwYXJhbSBzDQogICAgICovDQogICAgYmFyMihzOiBudW1iZXIpOiB2b2lkOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIEZvbyB7DQogICAgLyoqDQogICAgICogY29tbWVudDQNCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcihzOiBudW1iZXIpOiB2b2lkOw0KfQ0KZXhwb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qIEBwYXJhbSBwIAogKi8KZXhwb3J0IGNvbnN0IGZvbyA9IChwOiBzdHJpbmcpOiB7CiAgICAvKioKICAgICAqIGNvbW1lbnQyCiAgICAgKiBAcGFyYW0gcwogICAgICovCiAgICBiYXI6IChzOiBudW1iZXIpID0+IHZvaWQ7CiAgICAvKioKICAgICAqIGNvbW1lbnQzCiAgICAgKiBAcGFyYW0gcwogICAgICovCiAgICBiYXIyKHM6IG51bWJlcik6IHZvaWQ7Cn0gPT4gewogICAgcmV0dXJuIHsKICAgICAgICAvKioKICAgICAgICAgKiBjb21tZW50MgogICAgICAgICAqIEBwYXJhbSBzIAogICAgICAgICAqLwogICAgICAgIGJhcjogKHM6IG51bWJlcikgPT4ge30sCiAgICAgICAgLyoqCiAgICAgICAgICogY29tbWVudDMKICAgICAgICAgKiBAcGFyYW0gcyAKICAgICAgICAgKi8KICAgICAgICBiYXIyKHM6IG51bWJlcikge30sCiAgICB9Cn0KCmV4cG9ydCBjbGFzcyBGb28gewogICAgLyoqCiAgICAgKiBjb21tZW50NAogICAgICogQHBhcmFtIHMgIAogICAgICovCiAgICBiYXIoczogbnVtYmVyKTogdm9pZCB7CiAgICB9Cn0KCmNvbnN0IGRlc3QgPSBudWxsIGFzIGFueTsKZXhwb3J0IGNvbnN0CiAgICAvKioKICAgICogY29tbWVudDUKICAgICovCiAgICBzb21lTWV0aG9kOiBhbnkgPSBkZXN0LnNvbWVNZXRob2Q7CgpkZWNsYXJlIGdsb2JhbCB7CiAgICBpbnRlcmZhY2UgRXh0RnVuYyB7CiAgICAgICAgLyoqCiAgICAgICAgKiBjb21tZW50NgogICAgICAgICovCiAgICAgICAgc29tZU1ldGhvZChjb2xsZWN0aW9uOiBhbnlbXSk6IGJvb2xlYW47CiAgICB9Cn0K ++//// https://sokra.github.io/source-map-visualization#base64,LyoqDQogKiBjb21tZW50MQ0KICogQHBhcmFtIHANCiAqLw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiAocDogc3RyaW5n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AgICB9Cn0KCmNvbnN0IGRlc3QgPSBudWxsIGFzIGFueTsKZXhwb3J0IGNvbnN0CiAgICAvKioKICAgICogY29tbWVudDUKICAgICovCiAgICBzb21lTWV0aG9kOiBhbnkgPSBkZXN0LnNvbWVNZXRob2Q7CgpkZWNsYXJlIGdsb2JhbCB7CiAgICBpbnRlcmZhY2UgRXh0RnVuYyB7CiAgICAgICAgLyoqCiAgICAgICAgKiBjb21tZW50NgogICAgICAgICovCiAgICAgICAgc29tZU1ldGhvZChjb2xsZWN0aW9uOiBhbnlbXSk6IGJvb2xlYW47CiAgICB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReusesLambdaParameterNodes.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReusesLambdaParameterNodes.d.ts.map.diff new file mode 100644 index 0000000000000..874b507c990b5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReusesLambdaParameterNodes.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,eAAO,MAAM,aAAa,cAAgB,MAAM,MAAM,CAAC,GAAG,EAAE,KAAG,IAAU,CAAA;AACzE,wBAAgB,aAAa,CAAC,MAAM,EAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAG"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,eAAO,MAAM,aAAa,GAAI,MAA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+ICYge30pOiB2b2lkIHt9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitShadowingInferNotRenamed.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitShadowingInferNotRenamed.d.ts.diff new file mode 100644 index 0000000000000..96bdf51c5262e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitShadowingInferNotRenamed.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,7 +4,9 @@ + type Client = string; + type UpdatedClient = C & { + foo: number; + }; +-export declare const createClient: Client> | (new (...args: any[]) => Client)>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { [K in keyof D]: D[K] extends new (...args: any[]) => infer C_1 ? UpdatedClient : never; }; ++export declare const createClient: Client) | Record Client>>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { ++ [K in keyof D]: D[K] extends new (...args: any[]) => infer C ? UpdatedClient : never; ++}; + export {}; + //# sourceMappingURL=declarationEmitShadowingInferNotRenamed.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitThisPredicates02.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitThisPredicates02.d.ts.map.diff new file mode 100644 index 0000000000000..36b84f6391b4c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitThisPredicates02.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates02.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitThisPredicates02.d.ts.map] +-{"version":3,"file":"declarationEmitThisPredicates02.d.ts","sourceRoot":"","sources":["declarationEmitThisPredicates02.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,OAAO,CAAC;CACd;AAED,eAAO,MAAM,GAAG;;CAKf,CAAA"} ++{"version":3,"file":"declarationEmitThisPredicates02.d.ts","sourceRoot":"","sources":["declarationEmitThisPredicates02.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,OAAO,CAAC;CACd;AAED,eAAO,MAAM,GAAG;SACP,IAAI,IAAI,GAAG;CAInB,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBGb28gew0KICAgIGE6IHN0cmluZzsNCiAgICBiOiBudW1iZXI7DQogICAgYzogYm9vbGVhbjsNCn0NCmV4cG9ydCBkZWNsYXJlIGNvbnN0IG9iajogew0KICAgIG0oKTogdGhpcyBpcyBGb287DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFdBQVcsR0FBRztJQUNoQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHOztDQUtmLENBQUE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KfQoKZXhwb3J0IGNvbnN0IG9iaiA9IHsKICAgIG0oKTogdGhpcyBpcyBGb28gewogICAgICAgIGxldCBkaXMgPSB0aGlzIGFzIHt9IGFzIEZvbzsKICAgICAgICByZXR1cm4gZGlzLmEgIT0gbnVsbCAmJiBkaXMuYiAhPSBudWxsICYmIGRpcy5jICE9IG51bGw7CiAgICB9Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitThisPredicatesWithPrivateName02.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitThisPredicatesWithPrivateName02.d.ts.map.diff new file mode 100644 index 0000000000000..0e683cb37b1c5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitThisPredicatesWithPrivateName02.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName02.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitThisPredicatesWithPrivateName02.d.ts.map] +-{"version":3,"file":"declarationEmitThisPredicatesWithPrivateName02.d.ts","sourceRoot":"","sources":["declarationEmitThisPredicatesWithPrivateName02.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,OAAO,CAAC;CACd;AAED,eAAO,MAAM,GAAG;;CAKf,CAAA"} ++{"version":3,"file":"declarationEmitThisPredicatesWithPrivateName02.d.ts","sourceRoot":"","sources":["declarationEmitThisPredicatesWithPrivateName02.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,OAAO,CAAC;CACd;AAED,eAAO,MAAM,GAAG;SACP,IAAI,IAAI,GAAG;CAInB,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogc3RyaW5nOw0KICAgIGI6IG51bWJlcjsNCiAgICBjOiBib29sZWFuOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqOiB7DQogICAgbSgpOiB0aGlzIGlzIEZvbzsNCn07DQpleHBvcnQge307DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRUaGlzUHJlZGljYXRlc1dpdGhQcml2YXRlTmFtZTAyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxVQUFVLEdBQUc7SUFDVCxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHOztDQUtmLENBQUEifQ==,aW50ZXJmYWNlIEZvbyB7CiAgICBhOiBzdHJpbmc7CiAgICBiOiBudW1iZXI7CiAgICBjOiBib29sZWFuOwp9CgpleHBvcnQgY29uc3Qgb2JqID0gewogICAgbSgpOiB0aGlzIGlzIEZvbyB7CiAgICAgICAgbGV0IGRpcyA9IHRoaXMgYXMge30gYXMgRm9vOwogICAgICAgIHJldHVybiBkaXMuYSAhPSBudWxsICYmIGRpcy5iICE9IG51bGwgJiYgZGlzLmMgIT0gbnVsbDsKICAgIH0KfQ== ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogc3RyaW5nOw0KICAgIGI6IG51bWJlcjsNCiAgICBjOiBib29sZWFuOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqOiB7DQogICAgbSgpOiB0aGlzIGlzIEZvbzsNCn07DQpleHBvcnQge307DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRUaGlzUHJlZGljYXRlc1dpdGhQcml2YXRlTmFtZTAyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxVQUFVLEdBQUc7SUFDVCxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHO1NBQ1AsSUFBSSxJQUFJLEdBQUc7Q0FJbkIsQ0FBQSJ9,aW50ZXJmYWNlIEZvbyB7CiAgICBhOiBzdHJpbmc7CiAgICBiOiBudW1iZXI7CiAgICBjOiBib29sZWFuOwp9CgpleHBvcnQgY29uc3Qgb2JqID0gewogICAgbSgpOiB0aGlzIGlzIEZvbyB7CiAgICAgICAgbGV0IGRpcyA9IHRoaXMgYXMge30gYXMgRm9vOwogICAgICAgIHJldHVybiBkaXMuYSAhPSBudWxsICYmIGRpcy5iICE9IG51bGwgJiYgZGlzLmMgIT0gbnVsbDsKICAgIH0KfQ== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTupleRestSignatureLeadingVariadic.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTupleRestSignatureLeadingVariadic.d.ts.map.diff new file mode 100644 index 0000000000000..adba76ca03190 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTupleRestSignatureLeadingVariadic.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitTupleRestSignatureLeadingVariadic.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitTupleRestSignatureLeadingVariadic.d.ts.map] +-{"version":3,"file":"declarationEmitTupleRestSignatureLeadingVariadic.d.ts","sourceRoot":"","sources":["declarationEmitTupleRestSignatureLeadingVariadic.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,gDAAiD,CAAC,GAAG,UAAU,EAAE,QAAQ,CAAC,KAAG,IAAU,CAAC"} ++{"version":3,"file":"declarationEmitTupleRestSignatureLeadingVariadic.d.ts","sourceRoot":"","sources":["declarationEmitTupleRestSignatureLeadingVariadic.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAI,UAAU,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,UAAU,EAAE,QAAQ,CAAC,KAAG,IAAU,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmOiA8VEZpcnN0QXJncyBleHRlbmRzIGFueVtdLCBUTGFzdEFyZz4oLi4uYXJnczogWy4uLlRGaXJzdEFyZ3MsIFRMYXN0QXJnXSkgPT4gdm9pZDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFR1cGxlUmVzdFNpZ25hdHVyZUxlYWRpbmdWYXJpYWRpYy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VHVwbGVSZXN0U2lnbmF0dXJlTGVhZGluZ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29uc3QgZiA9IDxURmlyc3RBcmdzIGV4dGVuZHMgYW55W10sIFRMYXN0QXJnPiguLi5hcmdzOiBbLi4uVEZpcnN0QXJncywgVExhc3RBcmddKTogdm9pZCA9PiB7fTs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.d.ts.diff new file mode 100644 index 0000000000000..8bfee91953191 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,9 @@ + ++ ++//// [declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.d.ts] ++type A = {}; ++//# sourceMappingURL=declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.d.ts.map + /// [Errors] //// + + declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.ts(1,18): error TS2304: Cannot find name 'Unknown'. + declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.ts(1,18): error TS4083: Type parameter 'T' of exported type alias has or is using private name 'Unknown'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters1.d.ts.map.diff new file mode 100644 index 0000000000000..83d6263c2bf2b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitTypeAliasWithTypeParameters1.d.ts.map] +-{"version":3,"file":"declarationEmitTypeAliasWithTypeParameters1.d.ts","sourceRoot":"","sources":["declarationEmitTypeAliasWithTypeParameters1.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACjC,eAAO,MAAM,CAAC,MAAO,IAAI,MAAM,CAAC,KAAG,MAAW,CAAA"} ++{"version":3,"file":"declarationEmitTypeAliasWithTypeParameters1.d.ts","sourceRoot":"","sources":["declarationEmitTypeAliasWithTypeParameters1.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACjC,eAAO,MAAM,CAAC,GAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,KAAG,MAAW,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgQmFyPFgsIFk+ID0gKCkgPT4gW1gsIFldOw0KZXhwb3J0IHR5cGUgRm9vPFk+ID0gQmFyPGFueSwgWT47DQpleHBvcnQgZGVjbGFyZSBjb25zdCB5OiAoeDogRm9vPHN0cmluZz4pID0+IG51bWJlcjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFR5cGVBbGlhc1dpdGhUeXBlUGFyYW1ldGVyczEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlI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XJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VHlwZUFsaWFzV2l0aFR5cGVQYXJhbWV0ZXJzMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLE1BQU0sR0FBRyxDQUFDLENBQUMsRUFBRSxDQUFDLElBQUksTUFBTSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNyQyxNQUFNLE1BQU0sR0FBRyxDQUFDLENBQUMsSUFBSSxHQUFHLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ2pDLGVBQU8sTUFBTSxDQUFDLEdBQUksQ0FBQyxFQUFFLEdBQUcsQ0FBQyxNQUFNLENBQUMsS0FBRyxNQUFXLENBQUEifQ==,ZXhwb3J0IHR5cGUgQmFyPFgsIFk+ID0gKCkgPT4gW1gsIFldOwpleHBvcnQgdHlwZSBGb288WT4gPSBCYXI8YW55LCBZPjsKZXhwb3J0IGNvbnN0IHkgPSAoeDogRm9vPHN0cmluZz4pOiBudW1iZXIgPT4gMQ== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters2.d.ts.map.diff new file mode 100644 index 0000000000000..a5af7f3bf4b03 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitTypeAliasWithTypeParameters2.d.ts.map] +-{"version":3,"file":"declarationEmitTypeAliasWithTypeParameters2.d.ts","sourceRoot":"","sources":["declarationEmitTypeAliasWithTypeParameters2.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3C,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC1C,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACrC,eAAO,MAAM,CAAC,MAAO,IAAI,MAAM,CAAC,KAAG,MAAW,CAAA"} ++{"version":3,"file":"declarationEmitTypeAliasWithTypeParameters2.d.ts","sourceRoot":"","sources":["declarationEmitTypeAliasWithTypeParameters2.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3C,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC1C,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACrC,eAAO,MAAM,CAAC,GAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,KAAG,MAAW,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgQmFyPFgsIFksIFo+ID0gKCkgPT4gW1gsIFksIFpdOw0KZXhwb3J0IHR5cGUgQmF6PE0sIE4+ID0gQmFyPE0sIHN0cmluZywgTj47DQpleHBvcnQgdHlwZSBCYWE8WT4gPSBCYXo8Ym9vbGVhbiwgWT47DQpleHBvcnQgZGVjbGFyZSBjb25zdCB5OiAoeDogQmFhPG51bWJlcj4pID0+IG51bWJlcjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJM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PSBCYXI8TSwgc3RyaW5nLCBOPjsKZXhwb3J0IHR5cGUgQmFhPFk+ID0gQmF6PGJvb2xlYW4sIFk+OwpleHBvcnQgY29uc3QgeSA9ICh4OiBCYWE8bnVtYmVyPik6IG51bWJlciA9PiAx + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameInOuterScope.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameInOuterScope.d.ts.map.diff new file mode 100644 index 0000000000000..b7046aeb0880e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameInOuterScope.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitTypeParameterNameInOuterScope.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitTypeParameterNameInOuterScope.d.ts.map] +-{"version":3,"file":"declarationEmitTypeParameterNameInOuterScope.d.ts","sourceRoot":"","sources":["declarationEmitTypeParameterNameInOuterScope.ts"],"names":[],"mappings":"AAAA,cAAM,CAAC;CAAI;AAEX,QAAA,IAAI,CAAC,SAAW,CAAC,KAAG,CAAM,CAAC;AAC3B,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAa;AAErC,QAAA,IAAI,EAAE,SAAW,CAAC,KAAG,YAAuB,CAAC;AAC7C,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAmB;AAGtD,UAAU,CAAC;CAAI;AAEf,QAAA,IAAI,CAAC,SAAW,CAAC,KAAG,CAAM,CAAC;AAC3B,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAa"} ++{"version":3,"file":"declarationEmitTypeParameterNameInOuterScope.d.ts","sourceRoot":"","sources":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HLFVBQVUsQ0FBQyxDQUFDLENBQW1CO0FBR3RELFVBQVUsQ0FBQztDQUFJO0FBRWYsUUFBQSxJQUFJLENBQUMsR0FBSSxDQUFDLEVBQUcsQ0FBQyxFQUFFLENBQUMsS0FBRyxDQUFNLENBQUM7QUFDM0IsaUJBQVMsRUFBRSxDQUFDLENBQUMsRUFBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLENBQUMsQ0FBYSJ9,Y2xhc3MgQSB7IH0KCnZhciBhID0gPEEsPih4OiBBKTogQSA9PiB4OwpmdW5jdGlvbiBhMjxBLD4oeDogQSk6IEEgeyByZXR1cm4geCB9Cgp2YXIgYTMgPSA8QSw+KHg6IEEpOiBnbG9iYWxUaGlzLkEgPT4gbmV3IEEoKTsKZnVuY3Rpb24gYTQ8QSw+KHg6IEEpOiBnbG9iYWxUaGlzLkEgeyByZXR1cm4gbmV3IEEoKSB9CgoKaW50ZXJmYWNlIEIgeyB9Cgp2YXIgYiA9IDxCLD4oeDogQik6IEIgPT4geDsKZnVuY3Rpb24gYjI8Qiw+KHg6IEIpOiBCIHsgcmV0dXJuIHggfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameShadowedInternally.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameShadowedInternally.d.ts.map.diff new file mode 100644 index 0000000000000..23f5d18d812c5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameShadowedInternally.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitTypeParameterNameShadowedInternally.d.ts.map] +-{"version":3,"file":"declarationEmitTypeParameterNameShadowedInternally.d.ts","sourceRoot":"","sources":["declarationEmitTypeParameterNameShadowedInternally.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,SAAW,CAAC,uCAG3B,CAAA"} ++{"version":3,"file":"declarationEmitTypeParameterNameShadowedInternally.d.ts","sourceRoot":"","sources":["declarationEmitTypeParameterNameShadowedInternally.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,CAAC,EAAG,CAAC,EAAE,CAAC,KAAG,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,SAAS,CAAC,CAAC,EAAE,GAAG,CAG/D,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiA8VD4oeDogVCkgPT4gPFRfMT4oeTogVF8xKSA9PiByZWFkb25seSBbVCwgVF8xXTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFR5cGVQYXJhbWV0ZXJOYW1lU2hhZG93ZWRJbnRlcm5hbGx5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VHlwZVBhcmFtZXRlck5hbWVTaGFkb3dlZEludGVybmFsbHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFR5cGVQYXJhbWV0ZXJOYW1lU2hhZG93ZWRJbnRlcm5hbGx5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSxHQUFHLFNBQVcsQ0FBQyx1Q0FHM0IsQ0FBQSJ9,ZXhwb3J0IGNvbnN0IGZvbyA9IDxULD4oeDogVCk6IDxUXzE+KHk6IFRfMSkgPT4gcmVhZG9ubHkgW1QsIFRfMV0gPT4gewoJY29uc3QgaW5uZXIgPSA8VCw+KHk6IFQpID0+IFt4LCB5XSBhcyBjb25zdDsKCXJldHVybiBpbm5lcjsKfQo= ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiA8VD4oeDogVCkgPT4gPFRfMT4oeTogVF8xKSA9PiByZWFkb25seSBbVCwgVF8xXTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFR5cGVQYXJhbWV0ZXJOYW1lU2hhZG93ZWRJbnRlcm5hbGx5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VHlwZVBhcmFtZXRlck5hbWVTaGFkb3dlZEludGVybmFsbHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFR5cGVQYXJhbWV0ZXJOYW1lU2hhZG93ZWRJbnRlcm5hbGx5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSxHQUFHLEdBQUksQ0FBQyxFQUFHLENBQUMsRUFBRSxDQUFDLEtBQUcsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxFQUFFLEdBQUcsS0FBSyxTQUFTLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FHL0QsQ0FBQSJ9,ZXhwb3J0IGNvbnN0IGZvbyA9IDxULD4oeDogVCk6IDxUXzE+KHk6IFRfMSkgPT4gcmVhZG9ubHkgW1QsIFRfMV0gPT4gewoJY29uc3QgaW5uZXIgPSA8VCw+KHk6IFQpID0+IFt4LCB5XSBhcyBjb25zdDsKCXJldHVybiBpbm5lcjsKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUnknownImport.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUnknownImport.d.ts.diff new file mode 100644 index 0000000000000..c0310a56c2c65 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUnknownImport.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/declarationEmitUnknownImport.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,10 @@ + ++ ++//// [declarationEmitUnknownImport.d.ts] ++import Foo = SomeNonExistingName; ++export { Foo }; ++//# sourceMappingURL=declarationEmitUnknownImport.d.ts.map + /// [Errors] //// + + declarationEmitUnknownImport.ts(1,1): error TS2303: Circular definition of import alias 'Foo'. + declarationEmitUnknownImport.ts(1,14): error TS2304: Cannot find name 'SomeNonExistingName'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules1.d.ts.map.diff new file mode 100644 index 0000000000000..fa1b0cb05fda6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitUsingAlternativeContainingModules1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [src/index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAgBD,eAAO,MAAM,UAAU,2CAMtB,CAAA"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAA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m9tICdAdGFuc3RhY2svdnVlLXF1ZXJ5JwoKY29uc3QgYmFzZVVybCA9ICdodHRwczovL2FwaS5wdWJsaWNhcGlzLm9yZy8nCgppbnRlcmZhY2UgSUVudHJ5IHsKICBBUEk6IHN0cmluZwogIERlc2NyaXB0aW9uOiBzdHJpbmcKICBBdXRoOiBzdHJpbmcKICBIVFRQUzogYm9vbGVhbgogIENvcnM6IHN0cmluZwogIExpbms6IHN0cmluZwogIENhdGVnb3J5OiBzdHJpbmcKfQoKY29uc3QgdGVzdEFwaSA9IHsKICBnZXRFbnRyaWVzOiAoKTogUHJvbWlzZTxJRW50cnlbXT4gPT4gewogICAgcmV0dXJuIGZldGNoKGJhc2VVcmwgKyAnZW50cmllcycpCiAgICAgIC50aGVuKChyZXMpID0+IHJlcy5qc29uKCkpCiAgICAgIC50aGVuKChkYXRhKSA9PiBkYXRhLmVudHJpZXMpCiAgICAgIC5jYXRjaCgoZXJyKSA9PiBjb25zb2xlLmxvZyhlcnIpKQogIH0KfQoKY29uc3QgZW50cnlLZXlzID0gewogIGFsbDogWydlbnRyaWVzJ10gYXMgY29uc3QsCiAgbGlzdDogKCkgPT4gWy4uLmVudHJ5S2V5cy5hbGwsICdsaXN0J10gYXMgY29uc3QKfQoKZXhwb3J0IGNvbnN0IHVzZUVudHJpZXMgPSAoKTogVXNlUXVlcnlSZXR1cm5UeXBlPElFbnRyeVtdLCBFcnJvcj4gPT4gewogIHJldHVybiB1c2VRdWVyeSh7CiAgICBxdWVyeUtleTogZW50cnlLZXlzLmxpc3QoKSwKICAgIHF1ZXJ5Rm46IHRlc3RBcGkuZ2V0RW50cmllcywKICAgIHNlbGVjdDogKGRhdGEpID0+IGRhdGEuc2xpY2UoMCwgMTApCiAgfSkKfQo= ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIElFbnRyeSB7DQogICAgQVBJOiBzdHJpbmc7DQogICAgRGVzY3JpcHRpb246IHN0cmluZzsNCiAgICBBdXRoOiBzdHJpbm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fQoKY29uc3QgdGVzdEFwaSA9IHsKICBnZXRFbnRyaWVzOiAoKTogUHJvbWlzZTxJRW50cnlbXT4gPT4gewogICAgcmV0dXJuIGZldGNoKGJhc2VVcmwgKyAnZW50cmllcycpCiAgICAgIC50aGVuKChyZXMpID0+IHJlcy5qc29uKCkpCiAgICAgIC50aGVuKChkYXRhKSA9PiBkYXRhLmVudHJpZXMpCiAgICAgIC5jYXRjaCgoZXJyKSA9PiBjb25zb2xlLmxvZyhlcnIpKQogIH0KfQoKY29uc3QgZW50cnlLZXlzID0gewogIGFsbDogWydlbnRyaWVzJ10gYXMgY29uc3QsCiAgbGlzdDogKCkgPT4gWy4uLmVudHJ5S2V5cy5hbGwsICdsaXN0J10gYXMgY29uc3QKfQoKZXhwb3J0IGNvbnN0IHVzZUVudHJpZXMgPSAoKTogVXNlUXVlcnlSZXR1cm5UeXBlPElFbnRyeVtdLCBFcnJvcj4gPT4gewogIHJldHVybiB1c2VRdWVyeSh7CiAgICBxdWVyeUtleTogZW50cnlLZXlzLmxpc3QoKSwKICAgIHF1ZXJ5Rm46IHRlc3RBcGkuZ2V0RW50cmllcywKICAgIHNlbGVjdDogKGRhdGEpID0+IGRhdGEuc2xpY2UoMCwgMTApCiAgfSkKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules2.d.ts.map.diff new file mode 100644 index 0000000000000..f682af2ead87d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitUsingAlternativeContainingModules2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [src/index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAgBD,eAAO,MAAM,UAAU,0BAMtB,CAAA"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAgBD,eAAO,MAAM,UAAU,QAAO,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,CAM9C,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIElFbnRyeSB7DQogICAgQVBJOiBzdHJpbmc7DQogICAgRGVzY3JpcHRpb246IHN0cmluZzsNCiAgICBBdXRoOiBzdHJpbmc7DQogICAgSFRUUFM6IGJvb2xlYW47DQogICAgQ29yczogc3RyaW5nOw0KICAgIExpbms6IHN0cmluZzsNCiAgICBDYXRlZ29yeTogc3RyaW5nOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3QgdXNlRW50cmllczogKCkgPT4gYjxJRW50cnlbXSwgRXJyb3I+Ow0KZXhwb3J0IHt9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMi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TUFBTSxFQUFFLEVBQUUsS0FBSyxDQU05QyxDQUFBIn0=,aW1wb3J0IHsgdXNlUXVlcnkgfSBmcm9tICdAdGFuc3RhY2svdnVlLXF1ZXJ5JwoKY29uc3QgYmFzZVVybCA9ICdodHRwczovL2FwaS5wdWJsaWNhcGlzLm9yZy8nCgppbnRlcmZhY2UgSUVudHJ5IHsKICBBUEk6IHN0cmluZwogIERlc2NyaXB0aW9uOiBzdHJpbmcKICBBdXRoOiBzdHJpbmcKICBIVFRQUzogYm9vbGVhbgogIENvcnM6IHN0cmluZwogIExpbms6IHN0cmluZwogIENhdGVnb3J5OiBzdHJpbmcKfQoKY29uc3QgdGVzdEFwaSA9IHsKICBnZXRFbnRyaWVzOiAoKTogUHJvbWlzZTxJRW50cnlbXT4gPT4gewogICAgcmV0dXJuIGZldGNoKGJhc2VVcmwgKyAnZW50cmllcycpCiAgICAgIC50aGVuKChyZXMpID0+IHJlcy5qc29uKCkpCiAgICAgIC50aGVuKChkYXRhKSA9PiBkYXRhLmVudHJpZXMpCiAgICAgIC5jYXRjaCgoZXJyKSA9PiBjb25zb2xlLmxvZyhlcnIpKQogIH0KfQoKY29uc3QgZW50cnlLZXlzID0gewogIGFsbDogWydlbnRyaWVzJ10gYXMgY29uc3QsCiAgbGlzdDogKCkgPT4gWy4uLmVudHJ5S2V5cy5hbGwsICdsaXN0J10gYXMgY29uc3QKfQoKZXhwb3J0IGNvbnN0IHVzZUVudHJpZXMgPSAoKTogYjxJRW50cnlbXSwgRXJyb3I+ID0+IHsKICByZXR1cm4gdXNlUXVlcnkoewogICAgcXVlcnlLZXk6IGVudHJ5S2V5cy5saXN0KCksCiAgICBxdWVyeUZuOiB0ZXN0QXBpLmdldEVudHJpZXMsCiAgICBzZWxlY3Q6IChkYXRhKSA9PiBkYXRhLnNsaWNlKDAsIDEwKQogIH0pCn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingTypeAlias1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingTypeAlias1.d.ts.map.diff new file mode 100644 index 0000000000000..c0254e46c1f1e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingTypeAlias1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitUsingTypeAlias1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [src/index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,eAAO,MAAM,GAAG,UAAW,QAAQ,KAAG,QAErC,CAAC;AAEF,eAAO,MAAM,GAAG,UAAW,QAAQ,UAElC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,eAAO,MAAM,GAAG,GAAI,KAAK,EAAE,QAAQ,KAAG,QAErC,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,KAAK,EAAE,QAAQ,KAAG,KAErC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU29tZVR5cGUgfSBmcm9tICJzb21lLWRlcCI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmb286ICh0aGluZzogU29tZVR5cGUpID0+IFNvbWVUeXBlOw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgYmFyOiAodGhpbmc6IFNvbWVUeXBlKSA9PiBPdGhlcjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwib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9tICJzb21lLWRlcCI7CgpleHBvcnQgY29uc3QgZm9vID0gKHRoaW5nOiBTb21lVHlwZSk6IFNvbWVUeXBlID0+IHsKICByZXR1cm4gdGhpbmc7Cn07CgpleHBvcnQgY29uc3QgYmFyID0gKHRoaW5nOiBTb21lVHlwZSk6IE90aGVyID0+IHsKICByZXR1cm4gdGhpbmcuYXJnOwp9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithDefaultAsComputedName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithDefaultAsComputedName.d.ts.diff new file mode 100644 index 0000000000000..f3cde12e40742 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithDefaultAsComputedName.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,10 @@ + + + //// [main.d.ts] ++import other from "./other"; + export declare const obj: { +- foo: number; ++ [other.name]: number; + }; + //# sourceMappingURL=main.d.ts.map + //// [other.d.ts] + type Experiment = { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithDefaultAsComputedName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithDefaultAsComputedName2.d.ts.diff new file mode 100644 index 0000000000000..7c23186d3eb7f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithDefaultAsComputedName2.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,10 @@ + + + //// [main.d.ts] ++import * as other2 from "./other"; + export declare const obj: { +- foo: number; ++ [other2.default.name]: number; + }; + //# sourceMappingURL=main.d.ts.map + //// [other.d.ts] + type Experiment = { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff new file mode 100644 index 0000000000000..c89380bb2a510 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff @@ -0,0 +1,51 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,6 +4,39 @@ + export interface MutableRefObject { + current: T; + } + export declare function useRef(current: T): MutableRefObject; +-export declare const useCsvParser: () => MutableRefObject; +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file ++export declare const useCsvParser: () => invalid; ++//# sourceMappingURL=index.d.ts.map ++/// [Errors] //// ++ ++/p1/index.ts(7,29): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ++ ++ ++==== /p1/node_modules/csv-parse/lib/index.d.ts (0 errors) ==== ++ export function bar(): number; ++==== /p1/node_modules/csv-parse/package.json (0 errors) ==== ++ { ++ "main": "./lib", ++ "name": "csv-parse", ++ "types": [ ++ "./lib/index.d.ts", ++ "./lib/sync.d.ts" ++ ], ++ "version": "4.8.2" ++ } ++==== /p1/index.ts (1 errors) ==== ++ export interface MutableRefObject { ++ current: T; ++ } ++ export function useRef(current: T): MutableRefObject { ++ return { current }; ++ } ++ export const useCsvParser = () => { ++ ~~~~~~~ ++!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9027 /p1/index.ts:7:14: Add a type annotation to the variable useCsvParser. ++!!! related TS9030 /p1/index.ts:7:29: Add a return type to the function expression. ++ const parserRef = useRef(null); ++ return parserRef; ++ }; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFileOverwriteError.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFileOverwriteError.d.ts.diff new file mode 100644 index 0000000000000..5eb2b7f94924a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFileOverwriteError.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/declarationFileOverwriteError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,10 @@ + ++ ++//// [a.d.ts] ++declare class d { ++} ++//# sourceMappingURL=a.d.ts.map + /// [Errors] //// + + error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsForFileShadowingGlobalNoError.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsForFileShadowingGlobalNoError.d.ts.diff new file mode 100644 index 0000000000000..a35979b0f0ca7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsForFileShadowingGlobalNoError.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,10 +8,12 @@ + //# sourceMappingURL=dom.d.ts.map + //// [index.d.ts] + import { DOMNode } from './dom'; + type Constructor = new (...args: any[]) => any; +-export declare const mixin: (Base: Constructor) => new (...args: any[]) => { +- [x: string]: any; +- get(domNode: DOMNode): void; ++export declare const mixin: (Base: Constructor) => { ++ new (...args: any[]): { ++ [x: string]: any; ++ get(domNode: DOMNode): void; ++ }; + }; + export {}; + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts.diff new file mode 100644 index 0000000000000..a3539dafc0348 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: Type expansion of infinite type becomes different, but both are technically the same type]] //// + +//// [tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,9 +2,12 @@ + + //// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts] + export type Key = keyof U; + export type Value, U> = U[K]; +-export declare const updateIfChanged: (t: T) => ((key: K) => (>(key: K_1) => (>>(key: K_2) => (>>>(key: K_3) => (>>>>(key: K_4) => (>>>>>(key: K_5) => (>>>>>>(key: K_6) => (>>>>>>>(key: K_7) => (>>>>>>>>(key: K_8) => (>>>>>>>>>(key: K_9) => (>>>>>>>>>>(key: K_10) => any) & { ++export declare const updateIfChanged: (t: T) => ((key: K) => (>(key: K_1) => (>>(key: K_2) => (>>>(key: K_3) => (>>>>(key: K_4) => (>>>>>(key: K_5) => (>>>>>>(key: K_6) => (>>>>>>>(key: K_7) => (>>>>>>>>(key: K_8) => (>>>>>>>>>(key: K_9) => (>>>>>>>>>>(key: K_10) => any & { ++ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; ++ set: (newU: Value>>>>>>>>>>) => T; ++}) & { + map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; + set: (newU: Value>>>>>>>>>) => T; + }) & { + map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map.diff new file mode 100644 index 0000000000000..f572823ac73a0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map] +-{"version":3,"file":"defaultParameterAddsUndefinedWithStrictNullChecks.d.ts","sourceRoot":"","sources":["defaultParameterAddsUndefinedWithStrictNullChecks.ts"],"names":[],"mappings":"AAAA,iBAAS,CAAC,CAAC,aAAa,GAAE,MAAY,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtE;AACD,iBAAS,CAAC,CAAC,YAAY,oBAAc,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjE;AACD,QAAA,IAAI,KAAK,EAAE,MAAmD,CAAC;AAG/D,iBAAS,IAAI,CAAC,CAAC,oBAAmB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,iBAAS,IAAI,CAAC,CAAC,oBAAmB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,iBAAS,IAAI,CAAC,CAAC,oBAA+B,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAG/D;AAED,iBAAS,IAAI,CAAC,CAAC,oBAAgC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAGhE;AAED,KAAK,sBAAsB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AACxD,iBAAS,UAAU,CAAC,GAAG,GAAE,sBAA2B,GAAG,IAAI,CAG1D;AAYD,iBAAS,0BAA0B,CAAC,CAAC,GAAE,OAAc,GAAG,KAAK,GAAG,SAAS,CAIxE;AAED,OAAO,CAAC,MAAM,IAAI,EAAE,OAAO,CAAC;AAC5B,iBAAS,aAAa,CAAC,CAAC,GAAE,OAAO,GAAG,SAAmC,GAAG,OAAO,CAOhF"} ++{"version":3,"file":"defaultParameterAddsUndefinedWithStrictNullChecks.d.ts","sourceRoot":"","sources":["defaultParameterAddsUndefinedWithStrictNullChecks.ts"],"names":[],"mappings":"AAAA,iBAAS,CAAC,CAAC,aAAa,GAAE,MAAY,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtE;AACD,iBAAS,CAAC,CAAC,YAAY,EAAE,MAAM,YAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjE;AACD,QAAA,IAAI,KAAK,EAAE,MAAmD,CAAC;AAG/D,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,YAAW,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,YAAW,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,SAAoB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAG/D;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,SAAqB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAGhE;AAED,KAAK,sBAAsB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AACxD,iBAAS,UAAU,CAAC,GAAG,GAAE,sBAA2B,GAAG,IAAI,CAG1D;AAYD,iBAAS,0BAA0B,CAAC,CAAC,GAAE,OAAc,GAAG,KAAK,GAAG,SAAS,CAIxE;AAED,OAAO,CAAC,MAAM,IAAI,EAAE,OAAO,CAAC;AAC5B,iBAAS,aAAa,CAAC,CAAC,GAAE,OAAO,GAAG,SAAmC,GAAG,OAAO,CAOhF"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBmdW5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dW5kZWZpbmVkID0gY29uZCA/IHRydWUgOiB1bmRlZmluZWQpOiBib29sZWFuIHsKICAgIGlmICh5ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICBpZiAoeSA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuIHk7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/definiteAssignmentAssertionsWithObjectShortHand.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/definiteAssignmentAssertionsWithObjectShortHand.d.ts.diff new file mode 100644 index 0000000000000..3fb3295f75c1f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/definiteAssignmentAssertionsWithObjectShortHand.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Syntactically invalid.]] //// + +//// [tests/cases/conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,9 +5,9 @@ + declare const foo: { + a: string; + }; + declare const bar: { +- a?(): void; ++ a(): void; + }; + //# sourceMappingURL=definiteAssignmentAssertionsWithObjectShortHand.d.ts.map + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.map.diff new file mode 100644 index 0000000000000..83aee29c75108 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [destructuringInFunctionType.d.ts.map] +-{"version":3,"file":"destructuringInFunctionType.d.ts","sourceRoot":"","sources":["destructuringInFunctionType.ts"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dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYSwgYiwgY10pOw0KdHlwZSBGMSA9IChbYSwgYiwgY106IFsNCiAgICBhbnksDQogICAgYW55LA0KICAgIGFueQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDIgPSAoew0KICAgIGE6IGFueTsNCn0pOw0KdHlwZSBGMiA9ICh7IGEgfTogew0KICAgIGE6IGFueTsNCn0pID0+IHZvaWQ7DQp0eXBlIFQzID0gKFt7DQogICAgYTogYjsNCn0sIHsNCiAgICBiOiBhOw0KfV0pOw0KdHlwZSBGMyA9IChbeyBhOiBiIH0sIHsgYjogYSB9XTogWw0KICAgIHsNCiAgICAgICAgYTogYW55Ow0KICAgIH0sDQogICAgew0KICAgICAgICBiOiBhbnk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CiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicatePropertiesInTypeAssertions01.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicatePropertiesInTypeAssertions01.d.ts.diff new file mode 100644 index 0000000000000..70d0e7e8e8dd1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicatePropertiesInTypeAssertions01.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: Syntactically invalid. Duplicate property]] //// + +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,8 +2,9 @@ + + //// [duplicatePropertiesInTypeAssertions01.d.ts] + declare let x: { + a: number; ++ a: number; + }; + //# sourceMappingURL=duplicatePropertiesInTypeAssertions01.d.ts.map + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicatePropertiesInTypeAssertions02.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicatePropertiesInTypeAssertions02.d.ts.diff new file mode 100644 index 0000000000000..c1f1329d390a2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicatePropertiesInTypeAssertions02.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: Syntactically invalid. Duplicate property]] //// + +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,8 +2,9 @@ + + //// [duplicatePropertiesInTypeAssertions02.d.ts] + declare let x: { + a: number; ++ a: number; + }; + //# sourceMappingURL=duplicatePropertiesInTypeAssertions02.d.ts.map + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dynamicNames.d.ts.diff new file mode 100644 index 0000000000000..17cd00e8c3d9f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dynamicNames.d.ts.diff @@ -0,0 +1,22 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/dynamicNames.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,11 +5,11 @@ + export declare const c4 = "a"; + export declare const c5 = 1; + export declare const s2: typeof s0; + export declare const o1: { +- a: number; +- 1: string; +- [s0]: boolean; ++ [c4]: number; ++ [c5]: string; ++ [s2]: boolean; + }; + export declare const o1_c4: number; + export declare const o1_c5: string; + export declare const o1_s2: boolean; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dynamicNamesErrors.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dynamicNamesErrors.d.ts.map.diff new file mode 100644 index 0000000000000..f93c3e05ceca3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dynamicNamesErrors.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/dynamicNamesErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [dynamicNamesErrors.d.ts.map] +-{"version":3,"file":"dynamicNamesErrors.d.ts","sourceRoot":"","sources":["dynamicNamesErrors.ts"],"names":[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dXJuIDA7IH0KICAgIHN0YXRpYyBnZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9CiAgICBzdGF0aWMgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0KCiAgICBbeF06IG51bWJlcjsKICAgIFt5XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgZ2V0IFt6XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0KfQoKZXhwb3J0IHR5cGUgT2JqZWN0VHlwZVZpc2liaWxpdHkgPSB7CiAgICBbeF06IG51bWJlcjsKICAgIFt5XSgpOiBudW1iZXI7Cn07CgpleHBvcnQgY29uc3QgT2JqZWN0TGl0ZXJhbFZpc2liaWxpdHkgPSB7CiAgICBbeF06IDAsCiAgICBbeV0oKTogbnVtYmVyIHsgcmV0dXJuIDA7IH0sCiAgICBnZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9LAogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0sCn07 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitClassExpressionInDeclarationFile.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitClassExpressionInDeclarationFile.d.ts.diff new file mode 100644 index 0000000000000..02c1a767267f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitClassExpressionInDeclarationFile.d.ts.diff @@ -0,0 +1,98 @@ +// [[Reason: Can't fix class expressions]] //// + +//// [tests/cases/compiler/emitClassExpressionInDeclarationFile.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,9 @@ + + + //// [emitClassExpressionInDeclarationFile.d.ts] +-export declare var simpleExample: { +- new (): { +- tags(): void; +- }; +- getTags(): void; +-}; +-export declare var circularReference: { +- new (): { +- tags(c: any): any; +- }; +- getTags(c: { +- tags(c: any): any; +- }): { +- tags(c: any): any; +- }; +-}; ++export declare var simpleExample: invalid; ++export declare var circularReference: invalid; + export declare class FooItem { + foo(): void; + name?: string; + } +@@ -40,5 +26,61 @@ + } & typeof FooItem; + export declare class Test extends TestBase { + } + export {}; +-//# sourceMappingURL=emitClassExpressionInDeclarationFile.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=emitClassExpressionInDeclarationFile.d.ts.map ++/// [Errors] //// ++ ++emitClassExpressionInDeclarationFile.ts(1,28): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. ++emitClassExpressionInDeclarationFile.ts(5,38): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. ++ ++ ++==== emitClassExpressionInDeclarationFile.ts (2 errors) ==== ++ export var simpleExample = class { ++ ~~~~~ ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. ++ static getTags() { } ++ tags() { } ++ } ++ export var circularReference = class C { ++ ~ ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. ++ static getTags(c: C): C { return c } ++ tags(c: C): C { return c } ++ } ++ ++ // repro from #15066 ++ export class FooItem { ++ foo(): void { } ++ name?: string; ++ } ++ ++ export type Constructor = new(...args: any[]) => T; ++ export function WithTags>(Base: T): { ++ new(...args: any[]): { ++ tags(): void; ++ foo(): void; ++ name?: string; ++ }; ++ getTags(): void; ++ } & T { ++ return class extends Base { ++ static getTags(): void { } ++ tags(): void { } ++ } ++ } ++ ++ const TestBase: { ++ new(...args: any[]): { ++ tags(): void; ++ foo(): void; ++ name?: string; ++ }; ++ getTags(): void; ++ } & typeof FooItem = WithTags(FooItem); ++ export class Test extends TestBase {} ++ ++ const test = new Test(); ++ ++ Test.getTags() ++ test.tags(); ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitClassExpressionInDeclarationFile2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitClassExpressionInDeclarationFile2.d.ts.diff new file mode 100644 index 0000000000000..f52e3b41e2884 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitClassExpressionInDeclarationFile2.d.ts.diff @@ -0,0 +1,67 @@ +// [[Reason: Can't fix class expressions]] //// + +//// [tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,41 @@ + ++ ++//// [emitClassExpressionInDeclarationFile2.d.ts] ++export declare var noPrivates: invalid; ++export declare class FooItem { ++ foo(): void; ++ name?: string; ++ private property; ++} ++export type Constructor = new (...args: any[]) => T; ++export declare function WithTags>(Base: T): { ++ new (...args: any[]): { ++ tags(): void; ++ foo(): void; ++ name?: string; ++ property: string; ++ }; ++ getTags(): void; ++} & T; ++declare const TestBase: { ++ new (...args: any[]): { ++ tags(): void; ++ foo(): void; ++ name?: string; ++ property: string; ++ }; ++ getTags(): void; ++} & typeof FooItem; ++export declare class Test extends TestBase { ++} ++export {}; ++//# sourceMappingURL=emitClassExpressionInDeclarationFile2.d.ts.map + /// [Errors] //// + + emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'p' of exported class expression may not be private or protected. + emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'ps' of exported class expression may not be private or protected. ++emitClassExpressionInDeclarationFile2.ts(1,25): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + emitClassExpressionInDeclarationFile2.ts(25,5): error TS2322: Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; } & T'. + Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; }'. + Type '(Anonymous class) & FooItem' is not assignable to type '{ tags(): void; foo(): void; name?: string; property: string; }'. + Property 'property' is private in type '(Anonymous class) & FooItem' but not in type '{ tags(): void; foo(): void; name?: string; property: string; }'. +@@ -11,14 +43,16 @@ + The intersection '{ tags(): void; foo(): void; name?: string; property: string; } & FooItem' was reduced to 'never' because property 'property' exists in multiple constituents and is private in some. + emitClassExpressionInDeclarationFile2.ts(45,6): error TS2339: Property 'tags' does not exist on type 'Test'. + + +-==== emitClassExpressionInDeclarationFile2.ts (5 errors) ==== ++==== emitClassExpressionInDeclarationFile2.ts (6 errors) ==== + export var noPrivates = class { + ~~~~~~~~~~ + !!! error TS4094: Property 'p' of exported class expression may not be private or protected. + ~~~~~~~~~~ + !!! error TS4094: Property 'ps' of exported class expression may not be private or protected. ++ ~~~~~ ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + static getTags() { } + tags() { } + private static ps = -1 + private p = 12 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.map.diff new file mode 100644 index 0000000000000..9bf5f5969f869 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Source maps difference.]] //// + +//// [tests/cases/compiler/emitMethodCalledNew.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [emitMethodCalledNew.d.ts.map] +-{"version":3,"file":"emitMethodCalledNew.d.ts","sourceRoot":"","sources":["emitMethodCalledNew.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;aACL,MAAM,GAAG,MAAM;CACvB,CAAA;AACD,eAAO,MAAM,CAAC;aACH,MAAM,GAAG,MAAM;CACzB,CAAA;AACD,eAAO,MAAM,CAAC;aACD,MAAM,GAAG,MAAM;CAC3B,CAAA"} ++{"version":3,"file":"emitMethodCalledNew.d.ts","sourceRoot":"","sources":["emitMethodCalledNew.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;UACR,CAAC,EAAE,MAAM,GAAG,M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yIoeDogbnVtYmVyKTogbnVtYmVyIHsgcmV0dXJuIHggKyAxIH0KfQpleHBvcnQgY29uc3QgYyA9IHsKICBbIm5ldyJdKHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion01.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion01.d.ts.map.diff new file mode 100644 index 0000000000000..809178e506466 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion01.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [emptyTuplesTypeAssertion01.d.ts.map] +-{"version":3,"file":"emptyTuplesTypeAssertion01.d.ts","sourceRoot":"","sources":["emptyTuplesTypeAssertion01.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,IAAS,CAAC;AACf,QAAA,IAAI,CAAC,EAAE,SAAgB,CAAC"} ++{"version":3,"file":"emptyTuplesTypeAssertion01.d.ts","sourceRoot":"","sources":["emptyTuplesTypeAssertion01.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,EAAI,EAAK,CAAC;AACf,QAAA,IAAI,CAAC,EAAE,SAAgB,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgeDogW107DQpkZWNsYXJlIGxldCB5OiB1bmRlZmluZWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1lbXB0eVR1cGxlc1R5cGVBc3NlcnRpb24wMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlUdXBsZXNUeXBlQXNzZXJ0aW9uMDEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVtcHR5VHVwbGVzVHlwZUFzc2VydGlvbjAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxDQUFDLElBQVMsQ0FBQztBQUNmLFFBQUEsSUFBSSxDQUFDLEVBQUUsU0FBZ0IsQ0FBQyJ9,bGV0IHggPSA8W10+W107CmxldCB5OiB1bmRlZmluZWQgPSB4WzBdOw== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgeDogW107DQpkZWNsYXJlIGxldCB5OiB1bmRlZmluZWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1lbXB0eVR1cGxlc1R5cGVBc3NlcnRpb24wMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlUdXBsZXNUeXBlQXNzZXJ0aW9uMDEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVtcHR5VHVwbGVzVHlwZUFzc2VydGlvbjAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxDQUFDLEVBQUksRUFBSyxDQUFDO0FBQ2YsUUFBQSxJQUFJLENBQUMsRUFBRSxTQUFnQixDQUFDIn0=,bGV0IHggPSA8W10+W107CmxldCB5OiB1bmRlZmluZWQgPSB4WzBdOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion02.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion02.d.ts.map.diff new file mode 100644 index 0000000000000..e565d1337d874 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion02.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [emptyTuplesTypeAssertion02.d.ts.map] +-{"version":3,"file":"emptyTuplesTypeAssertion02.d.ts","sourceRoot":"","sources":["emptyTuplesTypeAssertion02.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,IAAW,CAAC;AACjB,QAAA,IAAI,CAAC,EAAE,SAAgB,CAAC"} ++{"version":3,"file":"emptyTuplesTypeAssertion02.d.ts","sourceRoot":"","sources":["emptyTuplesTypeAssertion02.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,EAAS,EAAE,CAAC;AACjB,QAAA,IAAI,CAAC,EAAE,SAAgB,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgeDogW107DQpkZWNsYXJlIGxldCB5OiB1bmRlZmluZWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1lbXB0eVR1cGxlc1R5cGVBc3NlcnRpb24wMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlUdXBsZXNUeXBlQXNzZXJ0aW9uMDIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVtcHR5VHVwbGVzVHlwZUFzc2VydGlvbjAyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxDQUFDLElBQVcsQ0FBQztBQUNqQixRQUFBLElBQUksQ0FBQyxFQUFFLFNBQWdCLENBQUMifQ==,bGV0IHggPSBbXSBhcyBbXTsKbGV0IHk6IHVuZGVmaW5lZCA9IHhbMF07 ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgeDogW107DQpkZWNsYXJlIGxldCB5OiB1bmRlZmluZWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1lbXB0eVR1cGxlc1R5cGVBc3NlcnRpb24wMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlUdXBsZXNUeXBlQXNzZXJ0aW9uMDIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVtcHR5VHVwbGVzVHlwZUFzc2VydGlvbjAyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxDQUFDLEVBQVMsRUFBRSxDQUFDO0FBQ2pCLFFBQUEsSUFBSSxDQUFDLEVBQUUsU0FBZ0IsQ0FBQyJ9,bGV0IHggPSBbXSBhcyBbXTsKbGV0IHk6IHVuZGVmaW5lZCA9IHhbMF07 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumClassification.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumClassification.d.ts.diff new file mode 100644 index 0000000000000..1feef596f12d3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumClassification.d.ts.diff @@ -0,0 +1,112 @@ +// [[Reason: Fixing enum values is not supported]] //// + +//// [tests/cases/conformance/enums/enumClassification.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -57,5 +57,101 @@ + B, + C, + D + } +-//# sourceMappingURL=enumClassification.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=enumClassification.d.ts.map ++/// [Errors] //// ++ ++enumClassification.ts(74,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++enumClassification.ts(75,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++enumClassification.ts(76,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++enumClassification.ts(77,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ++ ++==== enumClassification.ts (4 errors) ==== ++ // An enum type where each member has no initializer or an initializer that specififes ++ // a numeric literal, a string literal, or a single identifier naming another member in ++ // the enum type is classified as a literal enum type. An enum type that doesn't adhere ++ // to this pattern is classified as a numeric enum type. ++ ++ // Examples of literal enum types ++ ++ enum E01 { ++ A ++ } ++ ++ enum E02 { ++ A = 123 ++ } ++ ++ enum E03 { ++ A = "hello" ++ } ++ ++ enum E04 { ++ A, ++ B, ++ C ++ } ++ ++ enum E05 { ++ A, ++ B = 10, ++ C ++ } ++ ++ enum E06 { ++ A = "one", ++ B = "two", ++ C = "three" ++ } ++ ++ enum E07 { ++ A, ++ B, ++ C = "hi", ++ D = 10, ++ E, ++ F = "bye" ++ } ++ ++ enum E08 { ++ A = 10, ++ B = "hello", ++ C = A, ++ D = B, ++ E = C, ++ } ++ ++ // Examples of numeric enum types with only constant members ++ ++ enum E10 {} ++ ++ enum E11 { ++ A = +0, ++ B, ++ C ++ } ++ ++ enum E12 { ++ A = 1 << 0, ++ B = 1 << 1, ++ C = 1 << 2 ++ } ++ ++ // Examples of numeric enum types with constant and computed members ++ ++ enum E20 { ++ A = "foo".length, ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ B = A + 1, ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ C = +"123", ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ D = Math.sin(1) ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.diff new file mode 100644 index 0000000000000..a17510963a5f1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.diff @@ -0,0 +1,64 @@ +// [[Reason: Fixing enum values is not supported]] //// + +//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -33,5 +33,53 @@ + a = "1", + b = "11", + c = "21" + } +-//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map ++/// [Errors] //// ++ ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ++ ++==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (1 errors) ==== ++ enum T1 { ++ a = `1` ++ } ++ ++ enum T2 { ++ a = `1`, ++ b = "2", ++ c = 3 ++ } ++ ++ enum T3 { ++ a = `1` + `1` ++ } ++ ++ enum T4 { ++ a = `1`, ++ b = `1` + `1`, ++ c = `1` + "2", ++ d = "2" + `1`, ++ e = "2" + `1` + `1` ++ } ++ ++ enum T5 { ++ a = `1`, ++ b = `1` + `2`, ++ c = `1` + `2` + `3`, ++ d = 1 ++ } ++ ++ enum T6 { ++ a = 1, ++ b = `12`.length ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ } ++ ++ declare enum T7 { ++ a = `1`, ++ b = `1` + `1`, ++ c = "2" + `1` ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/es6ImportNamedImportWithExport.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/es6ImportNamedImportWithExport.d.ts.map.diff new file mode 100644 index 0000000000000..836330c804acd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/es6ImportNamedImportWithExport.d.ts.map.diff @@ -0,0 +1,19 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/es6ImportNamedImportWithExport.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,9 @@ + + //// [client.d.ts.map] +-{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["client.ts"],"names":[],"mappings":"AAEA,eAAO,IAAI,IAAI,EAAE,MAAU,CAAC;AAE5B,eAAO,IAAI,IAAI,QAAI,CAAC;AAEpB,eAAO,IAAI,IAAI,QAAI,CAAC;AACpB,eAAO,IAAI,IAAI,QAAI,CAAC;AAEpB,eAAO,IAAI,IAAI,QAAI,CAAC;AAEpB,eAAO,IAAI,IAAI,QAAI,CAAC;AAEpB,eAAO,IAAI,IAAI,QAAK,CAAC;AACrB,eAAO,IAAI,IAAI,QAAK,CAAC;AAErB,eAAO,IAAI,IAAI,QAAM,CAAC;AACtB,eAAO,IAAI,IAAI,QAAM,CAAC;AAEtB,eAAO,IAAI,IAAI,EAAE,MAAW,CAAC;AAE7B,eAAO,IAAI,EAAE,EAAE,MAAW,CAAC"} ++{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["client.ts"],"names":[],"mappings":"AAEA,eAAO,IAAI,IAAI,EAAE,MAAU,CAAC;AAE5B,eAAO,IAAI,IAAI,EAFE,MAEE,CAAC;AAEpB,eAAO,IAAI,IAAI,EAJE,MAIE,CAAC;AACpB,eAAO,IAAI,IAAI,EALE,MAKE,CAAC;AAEpB,eAAO,IAAI,IAAI,EAPE,MAOE,CAAC;AAEpB,eAAO,IAAI,IAAI,EATE,MASE,CAAC;AAEpB,eAAO,IAAI,IAAI,EAXE,MAWG,CAAC;AACrB,eAAO,IAAI,IAAI,EAZE,MAYG,CAAC;AAErB,eAAO,IAAI,IAAI,EAdE,MAcI,CAAC;AACtB,eAAO,IAAI,IAAI,EAfE,MAeI,CAAC;AAEtB,eAAO,IAAI,IAAI,EAAE,MAAW,CAAC;AAE7B,eAAO,IAAI,EAAE,EAAE,MAAW,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIge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wpleHBvcnQgdmFyIHh4eHggPSBhMTE7CmV4cG9ydCB2YXIgeHh4eCA9IHgxMTsKZXhwb3J0IGltcG9ydCB7IHoxIH0gZnJvbSAiLi9zZXJ2ZXIiOwpleHBvcnQgdmFyIHoxMTE6IG51bWJlciA9IHoxOwpleHBvcnQgaW1wb3J0IHsgejIgYXMgejMgfSBmcm9tICIuL3NlcnZlciI7CmV4cG9ydCB2YXIgejI6IG51bWJlciA9IHozOyAvLyB6MiBzaG91bGRuJ3QgZ2l2ZSByZWRlY2xhcmUgZXJyb3IKCi8vIE5vbiByZWZlcmVuY2VkIGltcG9ydHMKZXhwb3J0IGltcG9ydCB7IGFhYWEgfSBmcm9tICIuL3NlcnZlciI7CmV4cG9ydCBpbXBvcnQgeyBhYWFhIGFzIGJiYmIgfSBmcm9tICIuL3NlcnZlciI7Cg== + + + //// [server.d.ts.map] + {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["server.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,CAAC,QAAK,CAAC;AAClB,eAAO,IAAI,CAAC,EAAE,MAAU,CAAC;AACzB,eAAO,IAAI,CAAC,EAAE,MAAU,CAAC;AACzB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,IAAI,QAAK,CAAC"} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exhaustiveSwitchStatements1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exhaustiveSwitchStatements1.d.ts.map.diff new file mode 100644 index 0000000000000..7128e8438e56f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exhaustiveSwitchStatements1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [exhaustiveSwitchStatements1.d.ts.map] +-{"version":3,"file":"exhaustiveSwitchStatements1.d.ts","sourceRoot":"","sources":["exhaustiveSwitchStatements1.ts"],"names":[],"mappings":"AAAA,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CAW5B;AAED,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAO1B;AAED,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAO7B;AAID,aAAK,CAAC;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;AAEf,iBAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAKvB;AAED,iBAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAQvB;AAID,UAAU,MAAM;IAAG,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE;AAElD,UAAU,SAAS;IAAG,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAAE;AAEzE,UAAU,MAAM;IAAG,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAAE;AAEpD,UAAU,QAAQ;IAAG,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE;AAEtD,KAAK,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpD,iBAAS,IAAI,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAS9B;AAED,iBAAS,WAAW,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAWrC;AAID,aAAK,MAAM;IACV,CAAC,IAAA;IACD,CAAC,IAAA;CACD;AAED,i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AgICAgICAgY2FzZSAic3F1YXJlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjIiOwogICAgICAgICAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjMiOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIm5ldmVyIjsKICAgICAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiB3aXRob3V0RGVmYXVsdChzMTogU2hhcGUyLCBzMjogU2hhcGUyKTogc3RyaW5nIHsKICAgIHN3aXRjaCAoczEua2luZCkgewogICAgICAgIGNhc2UgInNxdWFyZSI6CiAgICAgICAgICAgIHJldHVybiAiMSI7CiAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgc3dpdGNoIChzMi5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMiI7CiAgICAgICAgICAgICAgICBjYXNlICJjaXJjbGUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMyI7CiAgICAgICAgICAgIH0KICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMjA4MjMKCmZ1bmN0aW9uIHRlc3Q0KHZhbHVlOiAxIHwgMik6IHN0cmluZyB7CiAgICBsZXQgeDogc3RyaW5nOwogICAgc3dpdGNoICh2YWx1ZSkgewogICAgICAgIGNhc2UgMTogeCA9ICJvbmUiOyBicmVhazsKICAgICAgICBjYXNlIDI6IHggPSAidHdvIjsgYnJlYWs7CiAgICB9CiAgICByZXR1cm4geDsKfQoKLy8gUmVwcm8gZnJvbSAjMzQ2NjEKCmVudW0gQW5pbWFsIHsgRE9HLCBDQVQgfQoKZGVjbGFyZSBjb25zdCB6b286IHsgYW5pbWFsOiBBbmltYWwgfSB8IHVuZGVmaW5lZDsKCmZ1bmN0aW9uIGV4cHJlc3Npb24oKTogQW5pbWFsIHsKICAgIHN3aXRjaCAoem9vPy5hbmltYWwgPz8gQW5pbWFsLkRPRykgewogICAgICAgIGNhc2UgQW5pbWFsLkRPRzogcmV0dXJuIEFuaW1hbC5ET0cKICAgICAgICBjYXNlIEFuaW1hbC5DQVQ6IHJldHVybiBBbmltYWwuQ0FUCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzM0ODQwCgpmdW5jdGlvbiBmb28oKTogdm9pZCB7CiAgICBjb25zdCBmb286IG51bWJlciB8IHVuZGVmaW5lZCA9IDA7CiAgICB3aGlsZSAodHJ1ZSkgewogICAgICAgIGNvbnN0IHN0YXRzID0gZm9vOwogICAgICAgIHN3aXRjaCAoc3RhdHMpIHsKICAgICAgICAgICAgY2FzZSAxOiBicmVhazsKICAgICAgICAgICAgY2FzZSAyOiBicmVhazsKICAgICAgICB9CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzM1MDcwCgp0eXBlIE8gPSB7CiAgICBhOiBudW1iZXIsCiAgICBiOiBudW1iZXIKfTsKdHlwZSBLID0ga2V5b2YgTyB8ICdjJzsKZnVuY3Rpb24gZmYobzogTywgazogSyk6IG51bWJlciB7CiAgICBzd2l0Y2goaykgewogICAgICAgIGNhc2UgJ2MnOgogICAgICAgICAgICBrID0gJ2EnOwogICAgfQogICAgayA9PT0gJ2MnOyAgLy8gRXJyb3IKICAgIHJldHVybiBvW2tdOwp9CgovLyBSZXBybyBmcm9tICMzNTQzMQp0eXBlIEEgPSB7IGtpbmQ6ICJhYmMiIH0gfCB7IGtpbmQ6ICJkZWYiIH07CgpmdW5jdGlvbiBmMzU0MzEoYTogQSk6IHZvaWQgewogIHN3aXRjaCAoYS5raW5kKSB7CiAgICBjYXNlICJhYmMiOgogICAgY2FzZSAiZGVmIjogcmV0dXJuOwogICAgZGVmYXVsdDoKICAgICAgYSEua2luZDsgLy8gRXJyb3IgZXhwZWN0ZWQKICB9Cn0= ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBmdW5jdGlvbiBmMSh4OiAxIH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gKCEhdHJ1ZSkgewogICAgICAgIHN3aXRjaCAoeCkgewogICAgICAgICAgICBjYXNlIDE6IHJldHVybiAnYSc7CiAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuICdiJzsKICAgICAgICB9CiAgICAgICAgeDsgIC8vIFVucmVhY2hhYmxlCiAgICB9CiAgICBlbHNlIHsKICAgICAgICB0aHJvdyAwOwogICAgfQp9CgpmdW5jdGlvbiBmMih4OiAxIHwgMik6IHZvaWQgewogICAgbGV0IHo6IG51bWJlcjsKICAgIHN3aXRjaCAoeCkgewogICAgICAgIGNhc2UgMTogeiA9IDEwOyBicmVhazsKICAgICAgICBjYXNlIDI6IHogPSAyMDsgYnJlYWs7CiAgICB9CiAgICB6OyAgLy8gRGVmaW5pdGVseSBhc3NpZ25lZAp9CgpmdW5jdGlvbiBmMyh4OiAxIHwgMik6IDEwIHwgMjAgewogICAgc3dpdGNoICh4KSB7CiAgICAgICAgY2FzZSAxOiByZXR1cm4gMTA7CiAgICAgICAgY2FzZSAyOiByZXR1cm4gMjA7CiAgICAgICAgLy8gRGVmYXVsdCBjb25zaWRlcmVkIHJlYWNoYWJsZSB0byBhbGxvdyBkZWZlbnNpdmUgY29kaW5nCiAgICAgICAgZGVmYXVsdDogdGhyb3cgbmV3IEVycm9yKCJCYWQgaW5wdXQiKTsKICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMTE1NzIKCmVudW0gRSB7IEEsIEIgfQoKZnVuY3Rpb24gZihlOiBFKTogbnVtYmVyIHsKICAgIHN3aXRjaCAoZSkgewogICAgICAgIGNhc2UgRS5BOiByZXR1cm4gMAogICAgICAgIGNhc2UgRS5COiByZXR1cm4gMQogICAgfQp9CgpmdW5jdGlvbiBnKGU6IEUpOiBudW1iZXIgewogICAgaWYgKCF0cnVlKQogICAgICAgIHJldHVybiAtMQogICAgZWxzZQogICAgICAgIHN3aXRjaCAoZSkgewogICAgICAgICAgICBjYXNlIEUuQTogcmV0dXJuIDAKICAgICAgICAgICAgY2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9CgovLyBSZXBybyBmcm9tICMxODM2MgoKZW51bSBMZXZlbCB7CiAgT25lLAogIFR3bywKfQoKY29uc3QgZG9Tb21ldGhpbmdXaXRoTGV2ZWwgPSAobGV2ZWw6IExldmVsKTogTGV2ZWwgPT4gewogIGxldCBuZXh0OiBMZXZlbDsKICBzd2l0Y2ggKGxldmVsKSB7CiAgICBjYXNlIExldmVsLk9uZToKICAgICAgbmV4dCA9IExldmVsLlR3bzsKICAgICAgYnJlYWs7CiAgICBjYXNlIExldmVsLlR3bzoKICAgICAgbmV4dCA9IExldmVsLk9uZTsKICAgICAgYnJlYWs7CiAgfQogIHJldHVybiBuZXh0Owp9OwoKLy8gUmVwcm8gZnJvbSAjMjA0MDkKCmludGVyZmFjZSBTcXVhcmUyIHsKICAgIGtpbmQ6ICJzcXVhcmUiOwogICAgc2l6ZTogbnVtYmVyOwp9CgppbnRlcmZhY2UgQ2lyY2xlMiB7CiAgICBraW5kOiAiY2lyY2xlIjsKICAgIHJhZGl1czogbnVtYmVyOwp9Cgp0eXBlIFNoYXBlMiA9IFNxdWFyZTIgfCBDaXJjbGUyOwoKZnVuY3Rpb24gd2l0aERlZmF1bHQoczE6IFNoYXBlMiwgczI6IFNoYXBlMik6IHN0cmluZyB7CiAgICBzd2l0Y2ggKHMxLmtpbmQpIHsKICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICByZXR1cm4gIjEiOwogICAgICAgIGNhc2UgImNpcmNsZSI6CiAgICAgICAgICAgIHN3aXRjaCAoczIua2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAic3F1YXJlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjIiOwogICAgICAgICAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjMiOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIm5ldmVyIjsKICAgICAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiB3aXRob3V0RGVmYXVsdChzMTogU2hhcGUyLCBzMjogU2hhcGUyKTogc3RyaW5nIHsKICAgIHN3aXRjaCAoczEua2luZCkgewogICAgICAgIGNhc2UgInNxdWFyZSI6CiAgICAgICAgICAgIHJldHVybiAiMSI7CiAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgc3dpdGNoIChzMi5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMiI7CiAgICAgICAgICAgICAgICBjYXNlICJjaXJjbGUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMyI7CiAgICAgICAgICAgIH0KICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMjA4MjMKCmZ1bmN0aW9uIHRlc3Q0KHZhbHVlOiAxIHwgMik6IHN0cmluZyB7CiAgICBsZXQgeDogc3RyaW5nOwogICAgc3dpdGNoICh2YWx1ZSkgewogICAgICAgIGNhc2UgMTogeCA9ICJvbmUiOyBicmVhazsKICAgICAgICBjYXNlIDI6IHggPSAidHdvIjsgYnJlYWs7CiAgICB9CiAgICByZXR1cm4geDsKfQoKLy8gUmVwcm8gZnJvbSAjMzQ2NjEKCmVudW0gQW5pbWFsIHsgRE9HLCBDQVQgfQoKZGVjbGFyZSBjb25zdCB6b286IHsgYW5pbWFsOiBBbmltYWwgfSB8IHVuZGVmaW5lZDsKCmZ1bmN0aW9uIGV4cHJlc3Npb24oKTogQW5pbWFsIHsKICAgIHN3aXRjaCAoem9vPy5hbmltYWwgPz8gQW5pbWFsLkRPRykgewogICAgICAgIGNhc2UgQW5pbWFsLkRPRzogcmV0dXJuIEFuaW1hbC5ET0cKICAgICAgICBjYXNlIEFuaW1hbC5DQVQ6IHJldHVybiBBbmltYWwuQ0FUCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzM0ODQwCgpmdW5jdGlvbiBmb28oKTogdm9pZCB7CiAgICBjb25zdCBmb286IG51bWJlciB8IHVuZGVmaW5lZCA9IDA7CiAgICB3aGlsZSAodHJ1ZSkgewogICAgICAgIGNvbnN0IHN0YXRzID0gZm9vOwogICAgICAgIHN3aXRjaCAoc3RhdHMpIHsKICAgICAgICAgICAgY2FzZSAxOiBicmVhazsKICAgICAgICAgICAgY2FzZSAyOiBicmVhazsKICAgICAgICB9CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzM1MDcwCgp0eXBlIE8gPSB7CiAgICBhOiBudW1iZXIsCiAgICBiOiBudW1iZXIKfTsKdHlwZSBLID0ga2V5b2YgTyB8ICdjJzsKZnVuY3Rpb24gZmYobzogTywgazogSyk6IG51bWJlciB7CiAgICBzd2l0Y2goaykgewogICAgICAgIGNhc2UgJ2MnOgogICAgICAgICAgICBrID0gJ2EnOwogICAgfQogICAgayA9PT0gJ2MnOyAgLy8gRXJyb3IKICAgIHJldHVybiBvW2tdOwp9CgovLyBSZXBybyBmcm9tICMzNTQzMQp0eXBlIEEgPSB7IGtpbmQ6ICJhYmMiIH0gfCB7IGtpbmQ6ICJkZWYiIH07CgpmdW5jdGlvbiBmMzU0MzEoYTogQSk6IHZvaWQgewogIHN3aXRjaCAoYS5raW5kKSB7CiAgICBjYXNlICJhYmMiOgogICAgY2FzZSAiZGVmIjogcmV0dXJuOwogICAgZGVmYXVsdDoKICAgICAgYSEua2luZDsgLy8gRXJyb3IgZXhwZWN0ZWQKICB9Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionBlockShadowing.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionBlockShadowing.d.ts.diff new file mode 100644 index 0000000000000..09225101948fc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionBlockShadowing.d.ts.diff @@ -0,0 +1,45 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/expandoFunctionBlockShadowing.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,8 +2,31 @@ + + //// [expandoFunctionBlockShadowing.d.ts] + export declare function X(): void; + export declare function Y(): void; +-export declare namespace Y { +- var test: string; +-} +-//# sourceMappingURL=expandoFunctionBlockShadowing.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=expandoFunctionBlockShadowing.d.ts.map ++/// [Errors] //// ++ ++expandoFunctionBlockShadowing.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== expandoFunctionBlockShadowing.ts (1 errors) ==== ++ // https://github.com/microsoft/TypeScript/issues/56538 ++ ++ export function X(): void {} ++ if (Math.random()) { ++ const X: { test?: any } = {}; ++ X.test = 1; ++ } ++ ++ export function Y(): void {} ++ Y.test = "foo"; ++ ~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ const aliasTopY = Y; ++ if (Math.random()) { ++ const Y = function Y() {} ++ Y.test = 42; ++ ++ const topYcheck: { (): void; test: string } = aliasTopY; ++ const blockYcheck: { (): void; test: number } = Y; ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionNestedAssigments.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionNestedAssigments.d.ts.diff new file mode 100644 index 0000000000000..cc5eb27b612a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionNestedAssigments.d.ts.diff @@ -0,0 +1,172 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,48 +1,46 @@ + + + //// [expandoFunctionNestedAssigments.d.ts] + declare function Foo(): void; +-declare namespace Foo { +- var inVariableInit: number; +- var bla: { +- foo: number; +- }; +- var baz: number; +- var bar: number; +- var fromIf: number; +- var inIf: number; +- var fromWhileCondition: number; +- var fromWhileBody: number; +- var fromWhileBodyNested: number; +- var fromDoBody: number; +- var fromDoBodyNested: number; +- var fromDoCondition: number; +- var forInit: number; +- var forCond: number; +- var fromForBody: number; +- var fromForBodyNested: number; +- var forIncr: number; +- var forOf: any[]; +- var fromForOfBody: number; +- var fromForOfBodyNested: number; +- var forIn: any[]; +- var fromForInBody: number; +- var fromForInBodyNested: number; +-} + declare let d: number; + declare function bar(p?: number): void; + //# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map + /// [Errors] //// + ++expandoFunctionNestedAssigments.ts(4,18): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expandoFunctionNestedAssigments.ts(7,31): error TS2339: Property 'inNestedFunction' does not exist on type 'typeof Foo'. ++expandoFunctionNestedAssigments.ts(11,2): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(11,30): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(11,46): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(13,4): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(14,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(17,7): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(18,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(20,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(25,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(27,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(29,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(31,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(31,23): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(31,45): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(32,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(34,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(38,15): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(39,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(41,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(46,15): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(47,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionNestedAssigments.ts(49,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +-==== expandoFunctionNestedAssigments.ts (1 errors) ==== ++==== expandoFunctionNestedAssigments.ts (24 errors) ==== + function Foo(): void { + + } + let d: number = (Foo.inVariableInit = 1); ++ ~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + + function bar(p: number = (Foo.inNestedFunction = 1)): void { + ~~~~~~~~~~~~~~~~ +@@ -50,44 +48,88 @@ + + } + + (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + if(Foo.fromIf = 1) { ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.inIf = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + + while(Foo.fromWhileCondition = 1) { ++ ~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.fromWhileBody = 1; ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromWhileBodyNested = 1; ++ ~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } + + do { + Foo.fromDoBody = 1; ++ ~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromDoBodyNested = 1; ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } while(Foo.fromDoCondition = 1); ++ ~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.fromForBody = 1; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromForBodyNested = 1; ++ ~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } + + for(let f of (Foo.forOf = []) ){ ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.fromForOfBody = 1; ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromForOfBodyNested = 1; ++ ~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } + + + for(let f in (Foo.forIn = []) ){ ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.fromForInBody = 1; ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromForInBodyNested = 1; ++ ~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentMembersVisibleInAugmentation.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentMembersVisibleInAugmentation.d.ts.diff new file mode 100644 index 0000000000000..60ca0ba2365de --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentMembersVisibleInAugmentation.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,12 @@ + + ++//// [/a.d.ts] ++declare module "foo" { ++ function f(): T; ++} ++export {}; ++//# sourceMappingURL=a.d.ts.map + //// [/b.d.ts] + import * as foo from "foo"; + declare module "foo" { + function g(): foo.T; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportDefaultNamespace.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportDefaultNamespace.d.ts.diff new file mode 100644 index 0000000000000..b66499fe60bfc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportDefaultNamespace.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,19 @@ + + + //// [exportDefaultNamespace.d.ts] +-declare function someFunc(): string; +-declare namespace someFunc { +- var someProp: string; +-} +-export default someFunc; +-//# sourceMappingURL=exportDefaultNamespace.d.ts.map +\ No newline at end of file ++export default function someFunc(): string; ++//# sourceMappingURL=exportDefaultNamespace.d.ts.map ++/// [Errors] //// ++ ++exportDefaultNamespace.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== exportDefaultNamespace.ts (1 errors) ==== ++ export default function someFunc(): string { ++ return 'hello!'; ++ } ++ ++ someFunc.someProp = 'yo'; ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/fakeInfinity2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/fakeInfinity2.d.ts.diff new file mode 100644 index 0000000000000..d5ffbc5a940e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/fakeInfinity2.d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/fakeInfinity2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,13 @@ + ++ ++//// [fakeInfinity2.d.ts] ++export declare enum Foo { ++ A = Infinity, ++ B = -Infinity ++} ++export declare const m: Infinity; ++//# sourceMappingURL=fakeInfinity2.d.ts.map + /// [Errors] //// + + fakeInfinity2.ts(15,17): error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? + fakeInfinity2.ts(15,17): error TS4025: Exported variable 'm' has or is using private name 'Infinity'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/fakeInfinity3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/fakeInfinity3.d.ts.diff new file mode 100644 index 0000000000000..cb7a5ad2b84ca --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/fakeInfinity3.d.ts.diff @@ -0,0 +1,22 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/fakeInfinity3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,14 @@ + ++ ++//// [fakeInfinity3.d.ts] ++export declare enum Foo { ++ A = Infinity, ++ B = -Infinity ++} ++export declare const m: Infinity; ++export declare const Infinity = "oops"; ++//# sourceMappingURL=fakeInfinity3.d.ts.map + /// [Errors] //// + + fakeInfinity3.ts(15,17): error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? + fakeInfinity3.ts(15,17): error TS4025: Exported variable 'm' has or is using private name 'Infinity'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/flatArrayNoExcessiveStackDepth.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/flatArrayNoExcessiveStackDepth.d.ts.map.diff new file mode 100644 index 0000000000000..84ef81e135aa8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/flatArrayNoExcessiveStackDepth.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [flatArrayNoExcessiveStackDepth.d.ts.map] +-{"version":3,"file":"flatArrayNoExcessiveStackDepth.d.ts","sourceRoot":"","sources":["flatArrayNoExcessiveStackDepth.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,MAAM,EAAmC,CAAC;AAErD,UAAU,GAAI,SAAQ,KAAK,CAAC,MAAM,CAAC;CAAG;AAItC,QAAA,MAAM,WAAW,UAAW,OAAO,KAAG,IAMrC,CAAC;AAEF,iBAAS,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,CAGpF"} ++{"version":3,"file":"flatArrayNoExcessiveStackDepth.d.ts","sourceRoot":"","sources":["flatArrayNoExcessiveStackDepth.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,MAAM,EAAmC,CAAC;AAErD,UAAU,GAAI,SAAQ,KAAK,CAAC,MAAM,CAAC;CAAG;AAItC,QAAA,MAAM,WAAW,GAAI,KAAK,EAAE,OAAO,KAAG,IAMrC,CAAC;AAEF,iBAAS,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,CAGpF"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmb286IHVua25vd25bXTsNCmRlY2xhcmUgY29uc3QgYmFyOiBzdHJpbmdbXTsNCmludGVyZmFjZSBGb28gZXh0ZW5kcyBBcnJheTxzdHJpbmc+IHsNCn0NCm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ywgZXh0cmFjdGVkXSA9IG1hdGNoOwp9OwoKZnVuY3Rpb24gZjxBcnIsIEQgZXh0ZW5kcyBudW1iZXI+KHg6IEZsYXRBcnJheTxBcnIsIGFueT4sIHk6IEZsYXRBcnJheTxBcnIsIEQ+KTogdm9pZCB7CiAgICB4ID0geTsKICAgIHkgPSB4OyAgLy8gRXJyb3IKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericContextualTypes1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericContextualTypes1.d.ts.map.diff new file mode 100644 index 0000000000000..944038cd7953b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericContextualTypes1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [genericContextualTypes1.d.ts.map] +-{"version":3,"file":"genericContextualTypes1.d.ts","sourceRoot":"","sources":["genericContextualTypes1.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAE3B,OAAO,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEzD,OAAO,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAE/E,OAAO,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,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8QT5bXSA9IGFycmF5TWFwKHZhbHVlID0+ICh7IHZhbHVlIH0pKTsKCmNvbnN0IGYzMDogKGE6IHN0cmluZ1tdKSA9PiBzdHJpbmdbXSA9IGFycmF5RmlsdGVyKHggPT4geC5sZW5ndGggPiAxMCk7CmNvbnN0IGYzMTogPFQgZXh0ZW5kcyBCb3g8bnVtYmVyPj4oYTogVFtdKSA9PiBUW10gPSBhcnJheUZpbHRlcih4ID0+IHgudmFsdWUgPiAxMCk7Cgpjb25zdCBmNDA6IDxBLCBCPihiOiBCLCBhOiBBKSA9PiBbQSwgQl0gPSBmbGlwKHppcCk7CgovLyBSZXBybyBmcm9tICMxNjI5MwoKdHlwZSBmbiA9IDxBPihhOiBBKSA9PiBBOwpjb25zdCBmbjogZm4gPSBhID0+IGE7Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericDefaultsErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericDefaultsErrors.d.ts.diff new file mode 100644 index 0000000000000..d8644a2f93ac7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericDefaultsErrors.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/genericDefaultsErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,47 @@ + ++ ++//// [genericDefaultsErrors.d.ts] ++declare const x: any; ++declare function f03(): void; ++declare function f04(): void; ++declare function f05(): void; ++declare function f06(): void; ++declare function f11(): void; ++declare function f12(a?: U): void; ++interface i00 { ++} ++interface i00 { ++} ++interface i01 { ++} ++interface i01 { ++} ++interface i04 { ++} ++interface i05 { ++} ++interface i06 { ++} ++interface i07 { ++} ++interface i08 { ++} ++interface i09 { ++} ++type i09t00 = i09; ++type i09t01 = i09<1>; ++type i09t02 = i09<1, 2>; ++type i09t03 = i09<1, 2, 3>; ++type i09t04 = i09<1, 2, 3, 4>; ++interface i10 { ++ x: T; ++} ++interface i10 { ++} ++interface SelfReference { ++} ++//# sourceMappingURL=genericDefaultsErrors.d.ts.map + /// [Errors] //// + + genericDefaultsErrors.ts(3,41): error TS2344: Type 'number' does not satisfy the constraint 'string'. + genericDefaultsErrors.ts(4,59): error TS2344: Type 'T' does not satisfy the constraint 'number'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/giant.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/giant.d.ts.diff new file mode 100644 index 0000000000000..b3fa1636976a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/giant.d.ts.diff @@ -0,0 +1,47 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/giant.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -39,8 +39,9 @@ + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; ++ [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; +@@ -91,8 +92,9 @@ + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; ++ [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; +@@ -206,8 +208,9 @@ + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; ++ [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; +@@ -265,8 +268,9 @@ + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; ++ [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/hugeDeclarationOutputGetsTruncatedWithError.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/hugeDeclarationOutputGetsTruncatedWithError.d.ts.diff new file mode 100644 index 0000000000000..8a787d6d70133 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/hugeDeclarationOutputGetsTruncatedWithError.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,16 @@ + ++ ++//// [hugeDeclarationOutputGetsTruncatedWithError.d.ts] ++type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; ++type manyprops = `${props}${props}`; ++export declare const c: { ++ [K in manyprops]: { ++ [K2 in manyprops]: `${K}.${K2}`; ++ }; ++}; ++export {}; ++//# sourceMappingURL=hugeDeclarationOutputGetsTruncatedWithError.d.ts.map + /// [Errors] //// + + hugeDeclarationOutputGetsTruncatedWithError.ts(5,14): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/importTypeGenericArrowTypeParenthesized.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/importTypeGenericArrowTypeParenthesized.d.ts.diff new file mode 100644 index 0000000000000..32600a3a94807 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/importTypeGenericArrowTypeParenthesized.d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/compiler/importTypeGenericArrowTypeParenthesized.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,7 @@ + + + //// [index.d.ts] +-/// + import { Modifier } from "module"; + export declare const fail1: Modifier<((x: T) => T)>; + export declare const fail2: Modifier<((x: T) => T)>; + export declare const works1: Modifier<(x: number) => number>; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/indexSignatures1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/indexSignatures1.d.ts.map.diff new file mode 100644 index 0000000000000..677c86e478ec1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/indexSignatures1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/members/indexSignatures1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [indexSignatures1.d.ts.map] +-{"version":3,"file":"indexSignatures1.d.ts","sourceRoot":"","sources":["indexSignatures1.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG,EAAE,OAAO,MAAiB,CAAC;AAEpC,iBAAS,GAAG,CAAC,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAGnG;AAID,iBAAS,GAAG,CAAC,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,IAAI,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAGvH;AAED,UAAU,EAAE;IAAG,CAAC,GAAG,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE;AACzE,UAAU,EAAE;IAAG,CAAC,GAAG,EAAE,IAAI,MAAM,GAAG,GAA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c3Qgb2JqMzogeyBba2V5OiBudW1iZXJdOiBzdHJpbmcgfSA9IHsgW3N5bV06ICdoZWxsbyAnfTsgIC8vIEVycm9yCgovLyBSZXBybyBmcm9tICM0NTc3MgoKdHlwZSBJZCA9IHN0cmluZyAmIHsgX190YWc6ICdpZCAnfTsKdHlwZSBSZWMxID0geyBba2V5OiBJZF06IG51bWJlciB9Owp0eXBlIFJlYzIgPSBSZWNvcmQ8SWQsIG51bWJlcj47Cgp0eXBlIEsxID0ga2V5b2YgUmVjMTsgIC8vIElkCnR5cGUgSzIgPSBrZXlvZiBSZWMyOyAgLy8gSWQK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/inferTypes1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/inferTypes1.d.ts.diff new file mode 100644 index 0000000000000..0122e978ddd67 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/inferTypes1.d.ts.diff @@ -0,0 +1,207 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/conformance/types/conditional/inferTypes1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,199 @@ + ++ ++//// [inferTypes1.d.ts] ++type Unpacked = T extends (infer U)[] ? U : T extends (...args: any[]) => infer U ? U : T extends Promise ? U : T; ++type T00 = Unpacked; ++type T01 = Unpacked; ++type T02 = Unpacked<() => string>; ++type T03 = Unpacked>; ++type T04 = Unpacked[]>>; ++type T05 = Unpacked; ++type T06 = Unpacked; ++declare function f1(s: string): { ++ a: number; ++ b: string; ++}; ++declare class C { ++ x: number; ++ y: number; ++} ++declare abstract class Abstract { ++ x: number; ++ y: number; ++} ++type T10 = ReturnType<() => string>; ++type T11 = ReturnType<(s: string) => void>; ++type T12 = ReturnType<(() => T)>; ++type T13 = ReturnType<(() => T)>; ++type T14 = ReturnType; ++type T15 = ReturnType; ++type T16 = ReturnType; ++type T17 = ReturnType; ++type T18 = ReturnType; ++type T19 = ReturnType<(x: string, ...args: T) => T[]>; ++type U10 = InstanceType; ++type U11 = InstanceType; ++type U12 = InstanceType; ++type U13 = InstanceType; ++type U14 = InstanceType; ++type U15 = InstanceType; ++type U16 = InstanceType T[]>; ++type U17 = InstanceType T[]>; ++type ArgumentType any> = T extends (a: infer A) => any ? A : any; ++type T20 = ArgumentType<() => void>; ++type T21 = ArgumentType<(x: string) => number>; ++type T22 = ArgumentType<(x?: string) => number>; ++type T23 = ArgumentType<(...args: string[]) => number>; ++type T24 = ArgumentType<(x: string, y: string) => number>; ++type T25 = ArgumentType; ++type T26 = ArgumentType; ++type T27 = ArgumentType; ++type X1 = T extends { ++ x: infer X; ++ y: infer Y; ++} ? [X, Y] : any; ++type T30 = X1<{ ++ x: any; ++ y: any; ++}>; ++type T31 = X1<{ ++ x: number; ++ y: string; ++}>; ++type T32 = X1<{ ++ x: number; ++ y: string; ++ z: boolean; ++}>; ++type X2 = T extends { ++ a: infer U; ++ b: infer U; ++} ? U : never; ++type T40 = X2<{}>; ++type T41 = X2<{ ++ a: string; ++}>; ++type T42 = X2<{ ++ a: string; ++ b: string; ++}>; ++type T43 = X2<{ ++ a: number; ++ b: string; ++}>; ++type T44 = X2<{ ++ a: number; ++ b: string; ++ c: boolean; ++}>; ++type X3 = T extends { ++ a: (x: infer U) => void; ++ b: (x: infer U) => void; ++} ? U : never; ++type T50 = X3<{}>; ++type T51 = X3<{ ++ a: (x: string) => void; ++}>; ++type T52 = X3<{ ++ a: (x: string) => void; ++ b: (x: string) => void; ++}>; ++type T53 = X3<{ ++ a: (x: number) => void; ++ b: (x: string) => void; ++}>; ++type T54 = X3<{ ++ a: (x: number) => void; ++ b: () => void; ++}>; ++type T60 = infer U; ++type T61 = (infer A) extends infer B ? infer C : infer D; ++type T62 = U extends (infer U)[] ? U : U; ++type T63 = T extends ((infer A) extends infer B ? infer C : infer D) ? string : number; ++type T70 = { ++ x: T; ++}; ++type T71 = T extends T70 ? T70 : never; ++type T72 = { ++ y: T; ++}; ++type T73 = T extends T72 ? T70 : never; ++type T74 = { ++ x: T; ++ y: U; ++}; ++type T75 = T extends T74 ? T70 | T72 | T74 : never; ++type T76 = { ++ x: T; ++}; ++type T77 = T extends T76 ? T76 : never; ++type T78 = T extends T76 ? T76 : never; ++type Foo = [T, U]; ++type Bar = T extends Foo ? Foo : never; ++type T90 = Bar<[string, string]>; ++type T91 = Bar<[string, "a"]>; ++type T92 = Bar<[string, "a"] & { ++ x: string; ++}>; ++type T93 = Bar<["a", string]>; ++type T94 = Bar<[number, number]>; ++type JsonifiedObject = { ++ [K in keyof T]: Jsonified; ++}; ++type Jsonified = T extends string | number | boolean | null ? T : T extends undefined | Function ? never : T extends { ++ toJSON(): infer R; ++} ? R : T extends object ? JsonifiedObject : "what is this"; ++type Example = { ++ str: "literalstring"; ++ fn: () => void; ++ date: Date; ++ customClass: MyClass; ++ obj: { ++ prop: "property"; ++ clz: MyClass; ++ nested: { ++ attr: Date; ++ }; ++ }; ++}; ++declare class MyClass { ++ toJSON(): "correct"; ++} ++type JsonifiedExample = Jsonified; ++declare let ex: JsonifiedExample; ++declare const z1: "correct"; ++declare const z2: string; ++type A1> = [T, U]; ++type B1 = S extends A1 ? [T, U] : never; ++type A2 = [T, U]; ++type B2 = S extends A2 ? [T, U] : never; ++type C2 = S extends A2 ? [T, U] : never; ++type A = T extends string ? { ++ [P in T]: void; ++} : T; ++type B = string extends T ? { ++ [P in T]: void; ++} : T; ++type MatchingKeys = K extends keyof T ? T[K] extends U ? K : never : never; ++type VoidKeys = MatchingKeys; ++interface test { ++ a: 1; ++ b: void; ++} ++type T80 = MatchingKeys; ++type T81 = VoidKeys; ++type MustBeString = T; ++type EnsureIsString = T extends MustBeString ? U : never; ++type Test1 = EnsureIsString<"hello">; ++type Test2 = EnsureIsString<42>; ++declare function invoker(key: K, ...args: A): any>>(obj: T) => ReturnType; ++declare const result: number; ++type Foo2 = ReturnType<(...args: A) => string>; ++//# sourceMappingURL=inferTypes1.d.ts.map + /// [Errors] //// + + inferTypes1.ts(39,23): error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'. + inferTypes1.ts(40,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/inferTypesInvalidExtendsDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/inferTypesInvalidExtendsDeclaration.d.ts.diff new file mode 100644 index 0000000000000..b65c5268ff07d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/inferTypesInvalidExtendsDeclaration.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/conformance/types/conditional/inferTypesInvalidExtendsDeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,9 @@ + ++ ++//// [inferTypesInvalidExtendsDeclaration.d.ts] ++type Test = T extends infer A extends B ? number : string; ++//# sourceMappingURL=inferTypesInvalidExtendsDeclaration.d.ts.map + /// [Errors] //// + + inferTypesInvalidExtendsDeclaration.ts(1,42): error TS2304: Cannot find name 'B'. + inferTypesInvalidExtendsDeclaration.ts(1,42): error TS4085: Extends clause for inferred type 'A' has or is using private name 'B'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/intraExpressionInferences.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/intraExpressionInferences.d.ts.map.diff new file mode 100644 index 0000000000000..fae43914f44c1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/intraExpressionInferences.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [intraExpressionInferences.d.ts.map] +-{"version":3,"file":"intraExpressionInferences.d.ts","sourceRoot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IFQpID0+IFQyOwogICAgYzogKGFyZzM6IFQpID0+IFQzOwogICAgbmVzdGVkMjogewogICAgICBkOiAoYXJnNDogVDMpID0+IFQ0OwogICAgfTsKICB9Owp9KTogW1QsIFQyLCBUMywgVDRdOwoKY29uc3QgcmVzT25pb24yOiBbCiAgICBzdHJpbmdbXSwKICAgIHN0cmluZywKICAgIG51bWJlciwKICAgIGJvb2xlYW4KXSA9IG9uaW9uMih7CiAgYTogKGFyZykgPT4gW2FyZ10sCiAgbmVzdGVkOiB7CiAgICBiOiAoYXJnKSA9PiBhcmcuam9pbigiLCIpLAogICAgYzogKGFyZykgPT4gTnVtYmVyKGFyZyksCiAgICBuZXN0ZWQyOiB7CiAgICAgIGQ6IChhcmcpID0+IEJvb2xlYW4oYXJnKSwKICAgIH0sCiAgfSwKfSk7CgpkZWNsYXJlIGZ1bmN0aW9uIGRpc3RhbnQ8VD4oYXJnczogewogIGZvbzogewogICAgYmFyOiB7CiAgICAgIGJhejogewogICAgICAgIHByb2R1Y2VyOiAoYXJnOiBzdHJpbmcpID0+IFQ7CiAgICAgIH07CiAgICB9OwogIH07CiAgY29uc3VtZXI6ICh2YWw6IFQpID0+IHVua25vd247Cn0pOiBUOwoKY29uc3QgZGlzdGFudFJlczogbnVtYmVyID0gZGlzdGFudCh7CiAgZm9vOiB7CiAgICBiYXI6IHsKICAgICAgYmF6OiB7CiAgICAgICAgcHJvZHVjZXI6IChhcmcpID0+IDEsCiAgICAgIH0sCiAgICB9LAogIH0sCiAgY29uc3VtZXI6ICh2YWwpID0+IHt9LAp9KTsK ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBmdW5jdGlvbiBjYWxsSXQ8VD4ob2JqOiB7DQogICAgcHJvZHVjZTogKG46IG51bWJlcikgPT4gVDsNCiAgICBjb25zdW1lOiAoeDogVCkgPT4gdm9pZDsNCn0pOiB2b2lkOw0KZGVjbGFyZSBmdW5jdGlvbiBjYWxsSXRUPFQ+KG9iajogWyhuOiBudW1i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ICh2YWwpID0+IHt9LAp9KTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/intrinsics.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/intrinsics.d.ts.diff new file mode 100644 index 0000000000000..7ae080a28bdc8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/intrinsics.d.ts.diff @@ -0,0 +1,23 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/intrinsics.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,15 @@ + ++ ++//// [intrinsics.d.ts] ++declare var hasOwnProperty: hasOwnProperty; ++declare namespace m1 { ++ var __proto__: any; ++} ++declare class Foo<__proto__> { ++} ++declare var foo: (__proto__: number) => void; ++//# sourceMappingURL=intrinsics.d.ts.map + /// [Errors] //// + + intrinsics.ts(1,21): error TS2749: 'hasOwnProperty' refers to a value, but is being used as a type here. Did you mean 'typeof hasOwnProperty'? + intrinsics.ts(1,21): error TS4025: Exported variable 'hasOwnProperty' has or is using private name 'hasOwnProperty'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationBinderSignatures.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationBinderSignatures.d.ts.map.diff new file mode 100644 index 0000000000000..9f296139464d0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationBinderSignatures.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/isolatedDeclarationBinderSignatures.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [isolatedDeclarationBinderSignatures.d.ts.map] +-{"version":3,"file":"isolatedDeclarationBinderSignatures.d.ts","sourceRoot":"","sources":["isolatedDeclarationBinderSignatures.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,CAA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,CAAC,KAAK,CAAC,CAAA;IACZ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;CACb;AAGD,MAAM,WAAW,CAAC,CAAC,CAAC;IAChB,IAAI,CAAC,CAAC;IACN,QAAQ,CAAC,CAAA;IACT,CAAC,IAAI,CAAC,CAAC;CACV;AAED,qBAAa,CAAC,CAAC,CAAC;gBACA,CAAC,EAAE,CAAC;IAGhB,CAAC,IAAI,CAAC;IAGN,IAAI,CAAC,IAAI,CAAC,CAAiB;IAC3B,IAAI,CAAC,CAAC,KAAK,EADF,CACE,EAAK;CACnB;AAED,qBAAa,EAAE;IACX,CAAC,CAAC,CAAC,KAAK,CAAC;CAGZ"} ++{"version":3,"file":"isolatedDeclarationBinderSignatures.d.ts","sourceRoot":"","sources":["isolatedDeclarationBinderSignatures.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;AAE3B,eAAO,MAAM,EAAE,GAAI,CAAC,OAAK,CAExB,CAAA;AACD,eAAO,MAAM,GAAG,GAAI,CAAC,EAAE,CAAC,EAAG,CAAC,KAAG,IAE9B,CAAA;AAGD,yBAAc,EAAE,CAAC;IACb,KAAY,CAAC,CAAC,CAAC,IAAK,CAAC,SAAS,CAAC,GAAE,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC9C,SAAgB,CAAC,IAAI,OAAO,CAAC,CAE5B;CACJ;AAED,yBAAc,EAAE,CAAC;IACb,UAAiB,CAAC;QACd,KAAK,EAAE,CAAC,CAAA;QACR,CAAC,IAAI,CAAC,CAAC;QACP,IAAI,CAAC,IAAI,CAAC,CAAA;QACV,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE;KACnB;CACJ;AAED,yBAAc,EAAE,CAAC;IACb,UAAiB,CAAC;QACd,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAA;KACjB;CACJ;AACD,yBAAc,EAAE,CAAC;IACb,MAAa,CAAC;QAAG,KA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tj4oKTogTiB7CiAgICAgICAgcmV0dXJuIG51bGwhOwogICAgfQp9Cgo= ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgRiA9IDxOPigpID0+IE47DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjogPE4+KCkgPT4gTjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGZuMjogPE4+KHA6IE4pID0+IHZvaWQ7DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTEgew0KICAgIHR5cGUgTjxUPiA9IFQgZXh0ZW5kcyBUID8gTjxUPiA6IG5ldmVyOw0KICAgIGZ1bmN0aW9uIE4oKTogdHlwZW9mIE47DQp9DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTIgew0KICAgIGludGVyZmFjZSBOIHsNCiAgICAgICAgY2hpbGQ6IE47DQogICAgICAgIG0oKTogTjsNCiAgICAgICAgZ2V0IFgoKTogTjsNCiAgICAgICAgc2V0IFgodmFsdWU6IE4pOw0KICAgIH0NCn0NCmV4cG9ydCBkZWNsYXJlIG5hbWVzcGFjZSBNMyB7DQogICAgaW50ZXJmYWNlIE4gew0KICAgICAgICBbbjogc3RyaW5nXTogTjsNCiAgICB9DQp9DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTMgew0KICAgIGNsYXNzIE4gew0KICAgICAgICBjaGlsZDogTjsNCiAgICB9DQogICAgZnVuY3Rpb24gZm4oKTogTjsNCn0NCmV4cG9ydCBkZWNsYXJlIG5hbWVzcGFjZSBNNCB7DQogICAgbmFtZXNwYWNlIE4gew0KICAgICAgICBmdW5jdGlvbiBmbigpOiB0eXBlb2YgTjsNCiAgICB9DQp9DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjM6IDxOPihwOiBOKSA9PiB2b2lkOw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm40OiA8Tj4oKSA9PiB7DQogICAgbmFtZTogTjsNCn07DQpleHBvcnQgaW50ZXJmYWNlIE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cG9ydCBpbnRlcmZhY2UgSTxOPiB7CiAgICAoKTogTjsKICAgIG5ldyAoKTogTgogICAgbSgpOiBOOwp9CgpleHBvcnQgY2xhc3MgQzxOPiB7CiAgICBjb25zdHJ1Y3RvcihuOiBOKSB7CgogICAgfQogICAgbSgpOiBOIHsKICAgICAgICByZXR1cm4gbnVsbCE7CiAgICB9CiAgICBnZXQgTigpOiBOIHsgcmV0dXJuIG51bGwhIH0KICAgIHNldCBOKHZhbHVlKSB7IH0KfQoKZXhwb3J0IGNsYXNzIEMyIHsKICAgIG08Tj4oKTogTiB7CiAgICAgICAgcmV0dXJuIG51bGwhOwogICAgfQp9Cgo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrors.d.ts.diff new file mode 100644 index 0000000000000..d7be9ded15eeb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrors.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: Can't auto-fix expando functions.]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,16 +1,36 @@ + + + //// [isolatedDeclarationErrors.d.ts] + declare function errorOnAssignmentBelowDecl(): void; +-declare namespace errorOnAssignmentBelowDecl { +- var a: string; +-} + declare const errorOnAssignmentBelow: { + (): void; + a: string; + }; + declare const errorOnMissingReturn: { + (): void; + a: string; + }; +-//# sourceMappingURL=isolatedDeclarationErrors.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=isolatedDeclarationErrors.d.ts.map ++/// [Errors] //// ++ ++isolatedDeclarationErrors.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== isolatedDeclarationErrors.ts (1 errors) ==== ++ function errorOnAssignmentBelowDecl(): void {} ++ errorOnAssignmentBelowDecl.a = ""; ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ const errorOnAssignmentBelow: { ++ (): void; ++ a: string; ++ } = (): void => {} ++ errorOnAssignmentBelow.a = ""; ++ ++ const errorOnMissingReturn: { ++ (): void; ++ a: string; ++ } = (): void => {} ++ errorOnMissingReturn.a = ""; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsClasses.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsClasses.d.ts.diff new file mode 100644 index 0000000000000..a1ba1c9c32509 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsClasses.d.ts.diff @@ -0,0 +1,58 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -17,15 +17,21 @@ + set getSetOk2(value: number); + get getSetOk3(): number; + set getSetOk3(value: number); + } ++declare let noAnnotationStringName: string; ++declare let noParamAnnotationStringName: string; + declare const noAnnotationLiteralName = "noAnnotationLiteralName"; + declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + export declare class C { ++ [missing]: number; + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; ++ get [noAnnotationStringName](): number; ++ set [noParamAnnotationStringName](value: invalid); + } + export interface I { ++ [noAnnotationStringName]: 10; + [noAnnotationLiteralName](): any; + } + export {}; + +@@ -35,14 +41,15 @@ + isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. + isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. + isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. ++isolatedDeclarationErrorsClasses.ts(48,39): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + + +-==== isolatedDeclarationErrorsClasses.ts (8 errors) ==== ++==== isolatedDeclarationErrorsClasses.ts (9 errors) ==== + export class Cls { + + field: number = 1 + 1; + method(): void {} +@@ -99,8 +106,11 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ + !!! error TS7006: Parameter 'value' implicitly has an 'any' type. ++ ~~~~~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9033 isolatedDeclarationErrorsClasses.ts:48:9: Add a type to parameter of the set accessor declaration. + + [("A" + "B") as "AB"] = 1; + ~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsExpandoFunctions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsExpandoFunctions.d.ts.diff new file mode 100644 index 0000000000000..f677c51d38b54 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsExpandoFunctions.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: Expando function declarations are not fixed.]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,38 @@ + + + //// [isolatedDeclarationErrorsExpandoFunctions.d.ts] + export declare function foo(): void; +-export declare namespace foo { +- var apply: () => void; +- var call: () => void; +- var bind: () => void; +- var caller: () => void; +- var toString: () => void; +- var length: number; +-} ++ ++/// [Errors] //// ++ ++isolatedDeclarationErrorsExpandoFunctions.ts(3,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++isolatedDeclarationErrorsExpandoFunctions.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++isolatedDeclarationErrorsExpandoFunctions.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++isolatedDeclarationErrorsExpandoFunctions.ts(6,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++isolatedDeclarationErrorsExpandoFunctions.ts(7,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++isolatedDeclarationErrorsExpandoFunctions.ts(8,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== isolatedDeclarationErrorsExpandoFunctions.ts (6 errors) ==== ++ export function foo(): void {} ++ ++ foo.apply = () => {} ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.call = ()=> {} ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.bind = ()=> {} ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.caller = ()=> {} ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.toString = ()=> {} ++ ~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.length = 10 ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.length = 10 ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsObjects.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsObjects.d.ts.diff new file mode 100644 index 0000000000000..708d9b1eb5250 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsObjects.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Accessors are not unified in DTE]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -38,9 +38,10 @@ + singleSetterBad: any; + getSetBad: number; + getSetOk: number; + getSetOk2: number; +- getSetOk3: number; ++ get getSetOk3(): number; ++ set getSetOk3(value: number); + }; + declare const s: unique symbol; + declare enum E { + V = 10 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationLazySymbols.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationLazySymbols.d.ts.diff new file mode 100644 index 0000000000000..8a06b4b452bc8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationLazySymbols.d.ts.diff @@ -0,0 +1,45 @@ +// [[Reason: Expando function declarations are not fixed.]] //// + +//// [tests/cases/compiler/isolatedDeclarationLazySymbols.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,11 +1,8 @@ + + + //// [isolatedDeclarationLazySymbols.d.ts] + export declare function foo(): void; +-export declare namespace foo { +- var b: string; +-} + declare const o: { + readonly "prop.inner": "a"; + readonly prop: { + readonly inner: "b"; +@@ -20,12 +17,13 @@ + export {}; + //# sourceMappingURL=isolatedDeclarationLazySymbols.d.ts.map + /// [Errors] //// + ++isolatedDeclarationLazySymbols.ts(13,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + isolatedDeclarationLazySymbols.ts(16,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +-==== isolatedDeclarationLazySymbols.ts (1 errors) ==== ++==== isolatedDeclarationLazySymbols.ts (2 errors) ==== + export function foo(): void { + + } + +@@ -37,8 +35,10 @@ + } as const + + foo[o["prop.inner"]] ="A"; + foo[o.prop.inner] = "B"; ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export class Foo { + [o["prop.inner"]] ="A" + ~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isomorphicMappedTypeInference.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isomorphicMappedTypeInference.d.ts.map.diff new file mode 100644 index 0000000000000..cba579f5a1c28 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isomorphicMappedTypeInference.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [isomorphicMappedTypeInference.d.ts.map] +-{"version":3,"file":"isomorphicMappedTypeInference.d.ts","sourceRoot":"","sources":["isom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CgpmdW5jdGlvbiBmMSgpOiB2b2lkIHsKICAgIGxldCB2ID0gewogICAgICAgIGE6IDQyLAogICAgICAgIGI6ICJoZWxsbyIsCiAgICAgICAgYzogdHJ1ZQogICAgfTsKICAgIGxldCBiID0gYm94aWZ5KHYpOwogICAgbGV0IHg6IG51bWJlciA9IGIuYS52YWx1ZTsKfQoKZnVuY3Rpb24gZjIoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBsZXQgdiA9IHVuYm94aWZ5KGIpOwogICAgbGV0IHg6IG51bWJlciA9IHYuYTsKfQoKZnVuY3Rpb24gZjMoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBhc3NpZ25Cb3hpZmllZChiLCB7IGM6IGZhbHNlIH0pOwp9CgpmdW5jdGlvbiBmNCgpOiB2b2lkIHsKICAgIGxldCBiID0gewogICAgICAgIGE6IGJveCg0MiksCiAgICAgICAgYjogYm94KCJoZWxsbyIpLAogICAgICAgIGM6IGJveCh0cnVlKQogICAgfTsKICAgIGIgPSBib3hpZnkodW5ib3hpZnkoYikpOwogICAgYiA9IHVuYm94aWZ5KGJveGlmeShiKSk7Cn0KCmZ1bmN0aW9uIG1ha2VSZWNvcmQ8VCwgSyBleHRlbmRzIHN0cmluZz4ob2JqOiB7IFtQIGluIEtdOiBUIH0pOiB7CiAgICBbUCBpbiBLXTogVDsKfSB7CiAgICByZXR1cm4gb2JqOwp9CgpmdW5jdGlvbiBmNShzOiBzdHJpbmcpOiB2b2lkIHsKICAgIGxldCBiID0gbWFrZVJlY29yZCh7CiAgICAgICAgYTogYm94KDQyKSwKICAgICAgICBiOiBib3goImhlbGxvIiksCiAgICAgICAgY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iBVOwoKbGV0IHgwOiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ID0gZjIwKHsgZm9vOiA0MiwgYmFyOiAiaGVsbG8iIH0pOwpsZXQgeDE6ICJmb28iIHwgImJhciIgPSBmMjEoeyBmb286IDQyLCBiYXI6ICJoZWxsbyIgfSk7CmxldCB4MjogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMih7IGZvbzogeyB2YWx1ZTogNDJ9ICwgYmFyOiB7IHZhbHVlOiAiaGVsbG8iIH0gfSk7CmxldCB4MzogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMyh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKbGV0IHg0OiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ICYgewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyNCh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKCi8vIFJlcHJvIGZyb20gIzI5NzY1CgpmdW5jdGlvbiBnZXRQcm9wczxULCBLIGV4dGVuZHMga2V5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+IHsKICAgIHJldHVybiB7fSBhcyBhbnk7Cn0KCmNvbnN0IG15QW55OiBhbnkgPSB7fTsKCmNvbnN0IG8xOiBQaWNrPGFueSwgImZvbyIgfCAiYmFyIj4gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwoKY29uc3QgbzI6IHsgZm9vOiBhbnk7IGJhcjogYW55IH0gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwo= ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBCb3g8VD4gPSB7DQogICAgdmFsdWU6IFQ7DQp9Ow0KdHlwZSBCb3hpZmllZDxUPiA9IHsNCiAgICBbUCBpbiBrZXlvZiB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gVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+IHsKICAgIHJldHVybiB7fSBhcyBhbnk7Cn0KCmNvbnN0IG15QW55OiBhbnkgPSB7fTsKCmNvbnN0IG8xOiBQaWNrPGFueSwgImZvbyIgfCAiYmFyIj4gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwoKY29uc3QgbzI6IHsgZm9vOiBhbnk7IGJhcjogYW55IH0gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts.diff new file mode 100644 index 0000000000000..b31b3bf9e52f2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,10 @@ + ++ ++//// [a.d.ts] ++declare class c { ++} ++//# sourceMappingURL=a.d.ts.map + /// [Errors] //// + + error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/keyofAndIndexedAccess.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/keyofAndIndexedAccess.d.ts.diff new file mode 100644 index 0000000000000..ab6f5ec452df3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/keyofAndIndexedAccess.d.ts.diff @@ -0,0 +1,26 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -330,12 +330,16 @@ + [key in V]: Dict; + }; + declare function ff1(dd: DictDict, k1: V, k2: T): number; + declare function ff2(dd: DictDict, k1: V, k2: T): number; +-declare const cf1: (t: T, k: K) => void; +-declare const cf2: (t: T, k: K) => void; ++declare const cf2: (t: T, k: K) => void; + //# sourceMappingURL=keyofAndIndexedAccess.d.ts.map + /// [Errors] //// + + keyofAndIndexedAccess.ts(205,24): error TS2322: Type 'T[keyof T]' is not assignable to type 'object'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff new file mode 100644 index 0000000000000..1605f392a7e9b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff @@ -0,0 +1,37 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,23 @@ + + + //// [index.d.ts] + export declare function foo(): void; +-export declare namespace foo { +- var bar: number; +-} +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=index.d.ts.map ++/// [Errors] //// ++ ++index.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++index.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== index.ts (2 errors) ==== ++ export function foo(): void {} ++ foo.bar = 12; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ const _private = Symbol(); ++ foo[_private] = "ok"; ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ const x: string = foo[_private]; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/leaveOptionalParameterAsWritten.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/leaveOptionalParameterAsWritten.d.ts.map.diff new file mode 100644 index 0000000000000..2568d9b44bc49 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/leaveOptionalParameterAsWritten.d.ts.map.diff @@ -0,0 +1,15 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,6 +7,6 @@ + {"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../b.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,UAAiB,OAAO,CAAC;YACvB,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;SAC3B;KACF;CACF"} + + + //// [/.src/dist/c.d.ts.map] +-{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../c.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAC7B,eAAO,MAAM,GAAG,OAAQ,GAAG,KAAG,IAAU,CAAA"} ++{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../c.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAC7B,eAAO,MAAM,GAAG,GAAI,CAAC,CAAC,EAAE,GAAG,KAAG,IAAU,CAAA"} + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff new file mode 100644 index 0000000000000..999a59d05192e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff @@ -0,0 +1,56 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,44 @@ + + + //// [index.d.ts] +-export declare const a: () => Promise; +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file ++export declare const a: () => invalid; ++//# sourceMappingURL=index.d.ts.map ++/// [Errors] //// ++ ++index.ts(1,18): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ++ ++ ++==== index.ts (1 errors) ==== ++ export const a = async () => (await import("inner")).x(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:1:14: Add a type annotation to the variable a. ++!!! related TS9030 index.ts:1:18: Add a return type to the function expression. ++==== node_modules/inner/index.d.ts (0 errors) ==== ++ export { x } from "./other.js"; ++==== node_modules/inner/other.d.ts (0 errors) ==== ++ import { Thing } from "./private.js" ++ export const x: () => Thing; ++==== node_modules/inner/private.d.ts (0 errors) ==== ++ export interface Thing {} // not exported in export map, inaccessible under new module modes ++==== package.json (0 errors) ==== ++ { ++ "name": "package", ++ "private": true, ++ "type": "module", ++ "exports": "./index.js" ++ } ++==== node_modules/inner/package.json (0 errors) ==== ++ { ++ "name": "inner", ++ "private": true, ++ "type": "module", ++ "exports": { ++ ".": { ++ "default": "./index.js" ++ }, ++ "./other": { ++ "default": "./other.js" ++ } ++ } ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeConstraints2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeConstraints2.d.ts.map.diff new file mode 100644 index 0000000000000..b6f9fb6448cde --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeConstraints2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [mappedTypeConstraints2.d.ts.map] +-{"version":3,"file":"mappedTypeConstraints2.d.ts","sourceRoot":"","sources":["mappedTypeConstraints2.ts"],"names":[],"mappings":"AAAA,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,GAAG;QAAE,CAAC,EAAE,CAAC,CAAA;KAAE;CAAE,CAAC;AAExD,iBAAS,EAAE,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAE3D;AAED,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,EAAE,GAAG;QAAE,CAAC,EAAE,CAAC,CAAA;KAAE;CAAE,CAAC;AAErE,iBAAS,EAAE,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAEnE;AAED,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG;QAAE,CAAC,EAAE,CAAC,CAAA;KAAE;CAAE,CAAC;AAExE,iBAAS,EAAE,CAAC,CA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IE51bWVyaWNCb3VuZHNPZjxUPik6IGJvb2xlYW4gewogICAgZm9yIChjb25zdCBba2V5LCB2YWxdIG9mIE9iamVjdC5lbnRyaWVzKG9iaikpIHsKICAgICAgICBjb25zdCBib3VuZHNGb3JLZXkgPSBib3VuZHNba2V5IGFzIGtleW9mIE51bWVyaWNCb3VuZHNPZjxUPl07CiAgICAgICAgaWYgKGJvdW5kc0ZvcktleSkgewogICAgICAgICAgICBjb25zdCB7IG1pbiwgbWF4IH0gPSBib3VuZHNGb3JLZXk7CiAgICAgICAgICAgIGlmIChtaW4gPiB2YWwgfHwgbWF4IDwgdmFsKSByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0KCi8vIHJlcHJvIGZyb20gIzUwMDMwCgp0eXBlIE9iamVjdFdpdGhVbmRlcnNjb3JlZEtleXM8SyBleHRlbmRzIHN0cmluZz4gPSB7CiAgICBbayBpbiBLIGFzIGBfJHtrfWBdOiB0cnVlOwp9OwoKZnVuY3Rpb24gZ2VuZXJpY1Rlc3Q8SyBleHRlbmRzIHN0cmluZz4ob2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czogT2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czxLPiwga2V5OiBLKTogdm9pZCB7CiAgY29uc3Qgc2hvdWxkQmVUcnVlOiB0cnVlID0gb2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5c1tgXyR7a2V5fWBdOwp9Cg== ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBNYXBwZWQxPEsgZXh0ZW5kcyBzdHJpbmc+ID0gew0KICAgIFtQIGluIEtdOiB7DQogICAgICAgIGE6IFA7DQogICAgfTsNCn07DQpkZWNsYXJlIGZ1bmN0aW9uIGYxPEsgZXh0ZW5kcyBzdHJpbmc+KG9iajogTWFwcGVkMTxLPiwga2V5OiBLKTogdm9pZDsNCnR5cGUgTWFwcGVkMjxLIGV4dGVuZHMgc3RyaW5nPiA9IHs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mRzIHN0cmluZz4gPSB7CiAgICBbayBpbiBLIGFzIGBfJHtrfWBdOiB0cnVlOwp9OwoKZnVuY3Rpb24gZ2VuZXJpY1Rlc3Q8SyBleHRlbmRzIHN0cmluZz4ob2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czogT2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czxLPiwga2V5OiBLKTogdm9pZCB7CiAgY29uc3Qgc2hvdWxkQmVUcnVlOiB0cnVlID0gb2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5c1tgXyR7a2V5fWBdOwp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericIndexedAccess.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericIndexedAccess.d.ts.map.diff new file mode 100644 index 0000000000000..f1a997e67464b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericIndexedAccess.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/mappedTypeGenericIndexedAccess.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [mappedTypeGenericIndexedAccess.d.ts.map] +-{"version":3,"file":"mappedTypeGenericIndexedAccess.d.ts","sourceRoot":"","sources":["mappedTypeGenericIndexedAccess.ts"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACT,KAAK,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;IACpB,MAAM,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;IACrB,KAAK,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;CACvB,CAAA;AAED,cAAM,IAAI;IACN,OAAO,EAAE;SAAG,CAAC,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE;KAAE,CAAC;;IAM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bXSB9OwoKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZW50cmllcyA9IHt9OwogICAgfQoKICAgIGFkZEVudHJ5PFQgZXh0ZW5kcyBrZXlvZiBUeXBlcz4obmFtZTogVCwgZW50cnk6IFR5cGVzW1RdKTogdm9pZCB7CiAgICAgICAgaWYgKCF0aGlzLmVudHJpZXNbbmFtZV0pIHsKICAgICAgICAgICAgdGhpcy5lbnRyaWVzW25hbWVdID0gW107CiAgICAgICAgfQogICAgICAgIHRoaXMuZW50cmllc1tuYW1lXT8ucHVzaChlbnRyeSk7CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzQ5MzM4Cgp0eXBlIFR5cGVzTWFwID0gewogICAgWzBdOiB7IGZvbzogJ2Jhcic7IH07CiAgICBbMV06IHsgYTogJ2InOyB9Owp9OwoKdHlwZSBQPFQgZXh0ZW5kcyBrZXlvZiBUeXBlc01hcD4gPSB7IHQ6IFQ7IH0gJiBUeXBlc01hcFtUXTsKCnR5cGUgVHlwZUhhbmRsZXJzID0gewogICAgW1QgaW4ga2V5b2YgVHlwZXNNYXBdPzogKHA6IFA8VD4pID0+IHZvaWQ7Cn07Cgpjb25zdCB0eXBlSGFuZGxlcnM6IFR5cGVIYW5kbGVycyA9IHsKICAgIFswXTogKHApID0+IGNvbnNvbGUubG9nKHAuZm9vKSwKICAgIFsxXTogKHApID0+IGNvbnNvbGUubG9nKHAuYSksCn07Cgpjb25zdCBvblNvbWVFdmVudCA9IDxUIGV4dGVuZHMga2V5b2YgVHlwZXNNYXA+KHA6IFA8VD4pOiB2b2lkIHwgdW5kZWZpbmVkID0+CiAgICB0eXBlSGFuZGxlcnNbcC50XT8uKHApOwo= ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBUeXBlcyA9IHsNCiAgICBmaXJzdDogew0KICAgICAgICBhMTogdHJ1ZTsNCiAgICB9Ow0KICAgIHNlY29uZDogew0KICAgICAgICBhMjogdHJ1ZTsNCiAgICB9Ow0KIC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bGVycyA9IHsKICAgIFswXTogKHApID0+IGNvbnNvbGUubG9nKHAuZm9vKSwKICAgIFsxXTogKHApID0+IGNvbnNvbGUubG9nKHAuYSksCn07Cgpjb25zdCBvblNvbWVFdmVudCA9IDxUIGV4dGVuZHMga2V5b2YgVHlwZXNNYXA+KHA6IFA8VD4pOiB2b2lkIHwgdW5kZWZpbmVkID0+CiAgICB0eXBlSGFuZGxlcnNbcC50XT8uKHApOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts.diff new file mode 100644 index 0000000000000..44c73b3de9435 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/mappedTypeGenericInstantiationPreservesHomomorphism.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,10 @@ + + + //// [api.d.ts] +-export declare const mappedUnionWithPrivateType: (...args: T) => T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never; ++export declare const mappedUnionWithPrivateType: (...args: T) => T[any] extends infer T_1 ? { ++ [K in keyof T_1]: T[any][K]; ++} : never; + //# sourceMappingURL=api.d.ts.map + //// [internal.d.ts] + export declare function usePrivateType(...args: T): PrivateMapped; + type PrivateMapped = { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericInstantiationPreservesInlineForm.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericInstantiationPreservesInlineForm.d.ts.diff new file mode 100644 index 0000000000000..40833e18c0ffd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericInstantiationPreservesInlineForm.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/mappedTypeGenericInstantiationPreservesInlineForm.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,10 @@ + + + //// [mappedTypeGenericInstantiationPreservesInlineForm.d.ts] +-export declare const test1: >(schema: { [K in keyof Required]: T[K]; }) => void; ++export declare const test1: >(schema: { ++ [K in keyof Required]: T[K]; ++}) => void; + export declare function test2>(schema: { + [K in keyof Required]: T[K]; + }): void; + //# sourceMappingURL=mappedTypeGenericInstantiationPreservesInlineForm.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeNoTypeNoCrash.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeNoTypeNoCrash.d.ts.diff new file mode 100644 index 0000000000000..291d3541c7b95 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeNoTypeNoCrash.d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/mappedTypeNoTypeNoCrash.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,13 @@ + ++ ++//// [mappedTypeNoTypeNoCrash.d.ts] ++type T0 = ({ ++ [K in keyof T]: ; ++}) extends ({ ++ [key in K]: T[K]; ++}) ? number : never; ++//# sourceMappingURL=mappedTypeNoTypeNoCrash.d.ts.map + /// [Errors] //// + + mappedTypeNoTypeNoCrash.ts(1,51): error TS2304: Cannot find name 'K'. + mappedTypeNoTypeNoCrash.ts(1,51): error TS4081: Exported type alias 'T0' has or is using private name 'K'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff new file mode 100644 index 0000000000000..374888553d90b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff @@ -0,0 +1,109 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,99 +1,7 @@ + + + //// [mappedTypeWithAsClauseAndLateBoundProperty2.d.ts] + export declare const thing: { +- [x: number]: number; +- toString: () => string; +- toLocaleString: () => string; +- pop: () => number; +- push: (...items: number[]) => number; +- concat: { +- (...items: ConcatArray[]): number[]; +- (...items: (number | ConcatArray)[]): number[]; +- }; +- join: (separator?: string) => string; +- reverse: () => number[]; +- shift: () => number; +- slice: (start?: number, end?: number) => number[]; +- sort: (compareFn?: (a: number, b: number) => number) => number[]; +- splice: { +- (start: number, deleteCount?: number): number[]; +- (start: number, deleteCount: number, ...items: number[]): number[]; +- }; +- unshift: (...items: number[]) => number; +- indexOf: (searchElement: number, fromIndex?: number) => number; +- lastIndexOf: (searchElement: number, fromIndex?: number) => number; +- every: { +- (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; +- (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; +- }; +- some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; +- forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; +- map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; +- filter: { +- (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; +- (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; +- }; +- reduce: { +- (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; +- (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; +- (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; +- }; +- reduceRight: { +- (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; +- (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; +- (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; +- }; +- find: { +- (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; +- (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; +- }; +- findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; +- fill: (value: number, start?: number, end?: number) => number[]; +- copyWithin: (target: number, start: number, end?: number) => number[]; +- entries: () => IterableIterator<[number, number]>; +- keys: () => IterableIterator; +- values: () => IterableIterator; +- includes: (searchElement: number, fromIndex?: number) => boolean; +- flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; +- flat: (this: A, depth?: D) => FlatArray[]; +- [Symbol.iterator]: () => IterableIterator; +- readonly [Symbol.unscopables]: { +- [x: number]: boolean; +- length?: boolean; +- toString?: boolean; +- toLocaleString?: boolean; +- pop?: boolean; +- push?: boolean; +- concat?: boolean; +- join?: boolean; +- reverse?: boolean; +- shift?: boolean; +- slice?: boolean; +- sort?: boolean; +- splice?: boolean; +- unshift?: boolean; +- indexOf?: boolean; +- lastIndexOf?: boolean; +- every?: boolean; +- some?: boolean; +- forEach?: boolean; +- map?: boolean; +- filter?: boolean; +- reduce?: boolean; +- reduceRight?: boolean; +- find?: boolean; +- findIndex?: boolean; +- fill?: boolean; +- copyWithin?: boolean; +- entries?: boolean; +- keys?: boolean; +- values?: boolean; +- includes?: boolean; +- flatMap?: boolean; +- flat?: boolean; +- [Symbol.iterator]?: boolean; +- readonly [Symbol.unscopables]?: boolean; +- }; ++ [K in keyof number[] as Exclude]: (number[])[K]; + }; + //# sourceMappingURL=mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixinClassesAnnotated.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixinClassesAnnotated.d.ts.map.diff new file mode 100644 index 0000000000000..ef5b881a14eea --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixinClassesAnnotated.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/classes/mixinClassesAnnotated.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [mixinClassesAnnotated.d.ts.map] +-{"version":3,"file":"mixinClassesAnnotated.d.ts","sourceRoot":"","sources":["mixinClassesAnnotated.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,CAAC,CAAC,IAAI,KAAI,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAE/C,cAAM,IAAI;IACa,CAAC,EAAE,MAAM;IAAS,CAAC,EAAE,MAAM;gBAA3B,CAAC,EAAE,MAAM,EAAS,CAAC,EAAE,MAAM;CACjD;AAED,cAAM,OAAQ,SAAQ,IAAI;IACmB,CAAC,EAAE,MAAM;gBAAtC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAS,CAAC,EAAE,MAAM;CAGrD;AAED,UAAU,SAAS;IACf,KAAK,IAAI,IAAI,CAAC;CACjB;AAED,QAAA,MAAM,SAAS,4CAA6C,CAAC,KAAG,YAAY,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,CAM1G,CAAA;AAEL,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,iBAAS,MAAM,CAAC,CAAC,SAAS,WAAW,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CASjF;AAED,QAAA,MAAM,MAAM,EAAE,WAAW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aGluZzI6IENvbnN0cnVjdG9yPFRhZ2dlZD4gJiBDb25zdHJ1Y3RvcjxQcmludGFibGU+ICYgewogICAgbWVzc2FnZTogc3RyaW5nOwp9ICYgdHlwZW9mIERlcml2ZWQgPSBUYWdnZWQoUHJpbnRhYmxlKERlcml2ZWQpKTsKVGhpbmcyLm1lc3NhZ2U7CgpmdW5jdGlvbiBmMSgpOiB2b2lkIHsKICAgIGNvbnN0IHRoaW5nID0gbmV3IFRoaW5nMSgxLCAyLCAzKTsKICAgIHRoaW5nLng7CiAgICB0aGluZy5fdGFnOwp9CgpmdW5jdGlvbiBmMigpOiB2b2lkIHsKICAgIGNvbnN0IHRoaW5nID0gbmV3IFRoaW5nMigxLCAyLCAzKTsKICAgIHRoaW5nLng7CiAgICB0aGluZy5fdGFnOwogICAgdGhpbmcucHJpbnQoKTsKfQoKY2xhc3MgVGhpbmczIGV4dGVuZHMgVGhpbmcyIHsKICAgIGNvbnN0cnVjdG9yKHRhZzogc3RyaW5nKSB7CiAgICAgICAgc3VwZXIoMTAsIDIwLCAzMCk7CiAgICAgICAgdGhpcy5fdGFnID0gdGFnOwogICAgfQogICAgdGVzdCgpOiB2b2lkIHsKICAgICAgICB0aGlzLnByaW50KCk7CiAgICB9Cn0K ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBDb25zdHJ1Y3RvcjxUPiA9IG5ldyAoLi4uYXJnczogYW55W10pID0+IFQ7DQpkZWNsYXJlIGNsYXNzIEJhc2Ugew0KICAgIHg6IG51bWJlcjsNCiAgICB5OiBudW1iZXI7DQogICAgY29uc3RydWN0b3IoeDogbnVtYmVyLCB5OiBudW1iZXIpOw0KfQ0KZGVjbGFyZSBjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7DQogICAgejogbnVtYmVyOw0KICAgIGNvbnN0cnVjdG9yKHg6IG51bWJlciwgeTogbnVtYmVyLCB6OiBudW1iZXIpOw0KfQ0KaW50ZXJmYWNlIFByaW50YWJsZSB7DQogICAgc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LnByaW50KCk7CiAgICB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map.diff new file mode 100644 index 0000000000000..9e1f029bb75ad --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map.diff @@ -0,0 +1,19 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,9 @@ + + //// [index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO;QACb,QAAQ,EAAE,MAAM,CAAC;KACpB;IACD,UAAU,GAAG;QACT,QAAQ,EAAE,MAAM,CAAC;KACpB;CACJ;AACD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,eAAO,MAAM,IAAI,YAAa,aAAa,QAAQ,SAAS,KAAG,IAAU,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO;QACb,QAAQ,EAAE,MAAM,CAAC;KACpB;IACD,UAAU,GAAG;QACT,QAAQ,EAAE,MAAM,CAAC;KACpB;CACJ;AACD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,KAAG,IAAU,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBnbG9iYWwgew0KICAgIGludGVyZmFjZSBBY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oYWNjb3VudDogbW9kZWwuQWNjb3VudCwgYWNjMjogbW9kZWwuQWNjKSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sQ0FBQyxNQUFNLENBQUM7SUFDWCxVQUFVLE9BQU87UUFDYixRQUFRLEVBQUUsTUFBTSxDQUFDO0tBQ3BCO0lBQ0QsVUFBVSxHQUFHO1FBQ1QsUUFBUSxFQUFFLE1BQU0sQ0FBQztLQUNwQjtDQUNKO0FBQ0QsT0FBTyxLQUFLLEtBQUssTUFBTSxTQUFTLENBQUM7QUFDakMsZUFBTyxNQUFNLElBQUksR0FBSSxPQUFPLEVBQUUsS0FBSyxDQUFDLE9BQU8sRUFBRSxJQUFJLEVBQUUsS0FBSyxDQUFDLEdBQUcsS0FBRyxJQUFVLENBQUMifQ==,ZXhwb3J0ICogZnJvbSAiLi9hY2NvdW50IjsK + + + //// [model/index.d.ts.map] + {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/namedTupleMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/namedTupleMembers.d.ts.diff new file mode 100644 index 0000000000000..0a79bde28b90c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/namedTupleMembers.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/conformance/types/tuple/named/namedTupleMembers.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -17,9 +17,9 @@ + export declare const func: Func; + export declare function useState(initial: T): [value: T, setter: (T: any) => void]; + export type Iter = Func<[step: number, iterations: number]>; + export declare function readSegment([length, count]: [number, number]): void; +-export declare const val: [number, number]; ++export declare const val: Parameters[0]; + export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; + export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; + export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; + export type RecusiveRest2 = [string, ...RecusiveRest2[]]; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noEmitOnError.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noEmitOnError.d.ts.diff new file mode 100644 index 0000000000000..3ec5821aca22d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noEmitOnError.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/noEmitOnError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,9 @@ + ++ ++//// [noEmitOnError.d.ts] ++declare var x: number; ++//# sourceMappingURL=noEmitOnError.d.ts.map + /// [Errors] //// + + noEmitOnError.ts(1,5): error TS2322: Type 'string' is not assignable to type 'number'. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noInferRedeclaration.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noInferRedeclaration.d.ts.map.diff new file mode 100644 index 0000000000000..cc112b865d8fa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noInferRedeclaration.d.ts.map.diff @@ -0,0 +1,19 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/typeRelationships/typeInference/noInferRedeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,9 @@ + + //// [a.d.ts.map] +-{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,SAAU,CAAC,KAAK,QAAQ,CAAC,CAAC,KAAG,CAAM,CAAC"} ++{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,KAAG,CAAM,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZjogPFQ+KHg6IFQsIHk6IE5vSW5mZXI8VD4pID0+IFQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1hLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sQ0FBQyxTQUFVLENBQUMsS0FBSyxRQUFRLENBQUMsQ0FBQyxLQUFHLENBQU0sQ0FBQyJ9,ZXhwb3J0IGNvbnN0IGYgPSA8VD4oeDogVCwgeTogTm9JbmZlcjxUPik6IFQgPT4geDsK ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZjogPFQ+KHg6IFQsIHk6IE5vSW5mZXI8VD4pID0+IFQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1hLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sQ0FBQyxHQUFJLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUcsQ0FBTSxDQUFDIn0=,ZXhwb3J0IGNvbnN0IGYgPSA8VD4oeDogVCwgeTogTm9JbmZlcjxUPik6IFQgPT4geDsK + + + //// [b.d.ts.map] + {"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAK,CAAC"} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff new file mode 100644 index 0000000000000..c96b288b50ee6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff @@ -0,0 +1,45 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,32 @@ + + + //// [/index.d.ts] +-import { PrismaClient } from "@prisma/client"; +-declare const _default: PrismaClient; ++declare const _default: invalid; + export default _default; +\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map ++//# sourceMappingURL=index.d.ts.map ++/// [Errors] //// ++ ++/index.ts(4,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. ++ ++ ++==== /node_modules/.prisma/client/index.d.ts (0 errors) ==== ++ export interface PrismaClientOptions { ++ rejectOnNotFound?: any; ++ } ++ ++ export class PrismaClient { ++ private fetcher; ++ } ++ ++==== /node_modules/@prisma/client/index.d.ts (0 errors) ==== ++ export * from ".prisma/client"; ++ ++==== /index.ts (1 errors) ==== ++ import { PrismaClient } from "@prisma/client"; ++ declare const enhancePrisma: (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; ++ const EnhancedPrisma = enhancePrisma(PrismaClient); ++ export default new EnhancedPrisma(); ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. ++!!! related TS9036 /index.ts:4:1: Move the expression in default export to a variable and add a type annotation to it. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts.diff new file mode 100644 index 0000000000000..3548dcd82e2a2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,7 @@ + + + //// [/.src/out/index.d.ts] +-/// + export * from "fs"; + export * as fs from "fs"; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..3548dcd82e2a2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,7 @@ + + + //// [/.src/out/index.d.ts] +-/// + export * from "fs"; + export * as fs from "fs"; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts.diff new file mode 100644 index 0000000000000..3befbed1d7dc7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts.diff @@ -0,0 +1,40 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,31 @@ + ++ ++//// [index.d.ts] ++export declare const a: invalid; ++//# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (4 errors) ==== ++==== index.ts (5 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ + !!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..3befbed1d7dc7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts.diff @@ -0,0 +1,40 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,31 @@ + ++ ++//// [index.d.ts] ++export declare const a: invalid; ++//# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (4 errors) ==== ++==== index.ts (5 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ + !!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=node16).d.ts.diff new file mode 100644 index 0000000000000..1e942a0b48e3c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=node16).d.ts.diff @@ -0,0 +1,44 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,9 @@ + + ++//// [index.d.ts] ++export declare const a: invalid; ++//# sourceMappingURL=index.d.ts.map + //// [/.src/node_modules/inner/index.d.ts] + export { x } from "./other.js"; + //# sourceMappingURL=index.d.ts.map + //// [/.src/node_modules/inner/other.d.ts] +@@ -12,21 +15,25 @@ + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (4 errors) ==== ++==== index.ts (5 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ + !!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..1e942a0b48e3c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=nodenext).d.ts.diff @@ -0,0 +1,44 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,9 @@ + + ++//// [index.d.ts] ++export declare const a: invalid; ++//# sourceMappingURL=index.d.ts.map + //// [/.src/node_modules/inner/index.d.ts] + export { x } from "./other.js"; + //# sourceMappingURL=index.d.ts.map + //// [/.src/node_modules/inner/other.d.ts] +@@ -12,21 +15,25 @@ + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (4 errors) ==== ++==== index.ts (5 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ + !!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts.diff new file mode 100644 index 0000000000000..811852b47f186 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts.diff @@ -0,0 +1,38 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,28 @@ + + + //// [index.d.ts] +-export declare const a: import("inner/other").Thing; ++export declare const a: invalid; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (3 errors) ==== ++==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other.js"; // should fail + ~~~~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. + export const a = (await import("inner")).x(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..811852b47f186 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts.diff @@ -0,0 +1,38 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,28 @@ + + + //// [index.d.ts] +-export declare const a: import("inner/other").Thing; ++export declare const a: invalid; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (3 errors) ==== ++==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other.js"; // should fail + ~~~~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. + export const a = (await import("inner")).x(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts.diff new file mode 100644 index 0000000000000..25e3b0261e9d1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts.diff @@ -0,0 +1,38 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,28 @@ + + + //// [index.d.ts] +-export declare const a: import("inner/other.js").Thing; ++export declare const a: invalid; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (3 errors) ==== ++==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..25e3b0261e9d1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts.diff @@ -0,0 +1,38 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,28 @@ + + + //// [index.d.ts] +-export declare const a: import("inner/other.js").Thing; ++export declare const a: invalid; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (3 errors) ==== ++==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts.diff new file mode 100644 index 0000000000000..d4421a88cb91e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts.diff @@ -0,0 +1,38 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,28 @@ + + + //// [index.d.ts] +-export declare const a: import("inner/other.js").Thing; ++export declare const a: invalid; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (3 errors) ==== ++==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..d4421a88cb91e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts.diff @@ -0,0 +1,38 @@ +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,28 @@ + + + //// [index.d.ts] +-export declare const a: import("inner/other.js").Thing; ++export declare const a: invalid; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. + index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. ++index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + + !!! error TS2468: Cannot find global value 'Promise'. +-==== index.ts (3 errors) ==== ++==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ + !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ + !!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=node16).d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=node16).d.ts.map.diff new file mode 100644 index 0000000000000..32ff9aa5056fd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=node16).d.ts.map.diff @@ -0,0 +1,104 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,72 +1,72 @@ + + //// [index.d.cts.map] +-{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder/index.d.cts.map] +-{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder/index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder/index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/another/index.d.cts.map] +-{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/another/index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/another/index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/index.d.cts.map] +-{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=nodenext).d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=nodenext).d.ts.map.diff new file mode 100644 index 0000000000000..32ff9aa5056fd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=nodenext).d.ts.map.diff @@ -0,0 +1,104 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,72 +1,72 @@ + + //// [index.d.cts.map] +-{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder/index.d.cts.map] +-{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder/index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder/index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/another/index.d.cts.map] +-{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/another/index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/another/index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/index.d.cts.map] +-{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/index.d.mts.map] +-{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + + //// [subfolder2/index.d.ts.map] +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} ++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAssignments(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAssignments(module=node16).d.ts.diff new file mode 100644 index 0000000000000..92a8ce83168d5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAssignments(module=node16).d.ts.diff @@ -0,0 +1,23 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,14 +1,11 @@ + + + //// [file.d.ts] +-/// + export import fs2 = require("fs"); + //# sourceMappingURL=file.d.ts.map + //// [index.d.ts] +-/// + export import fs2 = require("fs"); + //# sourceMappingURL=index.d.ts.map + //// [subfolder/index.d.ts] +-/// + export import fs2 = require("fs"); + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAssignments(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAssignments(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..92a8ce83168d5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAssignments(module=nodenext).d.ts.diff @@ -0,0 +1,23 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,14 +1,11 @@ + + + //// [file.d.ts] +-/// + export import fs2 = require("fs"); + //# sourceMappingURL=file.d.ts.map + //// [index.d.ts] +-/// + export import fs2 = require("fs"); + //# sourceMappingURL=index.d.ts.map + //// [subfolder/index.d.ts] +-/// + export import fs2 = require("fs"); + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff new file mode 100644 index 0000000000000..2d20183f1f251 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TSC simplifies import type removing resolution-mode]] //// + +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,7 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; ++export declare const a: import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface; + export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..2d20183f1f251 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TSC simplifies import type removing resolution-mode]] //// + +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,7 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; ++export declare const a: import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface; + export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions2(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions2(module=node16).d.ts.diff new file mode 100644 index 0000000000000..8ff745027cfaf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions2(module=node16).d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,13 +1,11 @@ + + + //// [index.d.ts] +-/// + export * from "fs"; + export * as fs from "fs"; + //# sourceMappingURL=index.d.ts.map + //// [subfolder/index.d.ts] +-/// + export * from "fs"; + export * as fs from "fs"; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..8ff745027cfaf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,13 +1,11 @@ + + + //// [index.d.ts] +-/// + export * from "fs"; + export * as fs from "fs"; + //# sourceMappingURL=index.d.ts.map + //// [subfolder/index.d.ts] +-/// + export * from "fs"; + export * as fs from "fs"; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions3(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions3(module=node16).d.ts.diff new file mode 100644 index 0000000000000..5a7a03aeea3dd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions3(module=node16).d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,10 @@ + + + //// [index.d.ts] +-/// + export { default } from "fs"; + //# sourceMappingURL=index.d.ts.map + //// [subfolder/index.d.ts] +-/// + export { default } from "fs"; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..5a7a03aeea3dd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,10 @@ + + + //// [index.d.ts] +-/// + export { default } from "fs"; + //# sourceMappingURL=index.d.ts.map + //// [subfolder/index.d.ts] +-/// + export { default } from "fs"; + //# sourceMappingURL=index.d.ts.map + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff new file mode 100644 index 0000000000000..194920f2ca832 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TSC simplifies import type removing resolution-mode and uses with instead of assert]] //// + +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,7 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; ++export declare const a: import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface; ++export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..194920f2ca832 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TSC simplifies import type removing resolution-mode and uses with instead of assert]] //// + +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,7 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; ++export declare const a: import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface; ++export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; + //# sourceMappingURL=index.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nullPropertyName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nullPropertyName.d.ts.diff new file mode 100644 index 0000000000000..4cc321285de18 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nullPropertyName.d.ts.diff @@ -0,0 +1,419 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/conformance/declarationEmit/nullPropertyName.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,86 +1,327 @@ + + + //// [nullPropertyName.d.ts] + declare function foo(): void; +-declare namespace foo { +- export var x: number; +- export var y: number; +- var _a: number; +- var _b: number; +- var _c: number; +- var _d: number; +- var _e: number; +- var _f: number; +- var _g: number; +- var _h: number; +- var _j: number; +- var _k: number; +- var _l: number; +- var _m: number; +- var _o: number; +- var _p: number; +- var _q: number; +- var _r: number; +- var _s: number; +- var _t: number; +- var _u: number; +- var _v: number; +- var _w: number; +- var _x: number; +- var _y: number; +- var _z: number; +- var _0: number; +- var _1: number; +- var _2: number; +- var _3: number; +- var _4: number; +- var _5: number; +- var _6: number; +- var _7: number; +- var _8: number; +- var _9: number; +- var _10: number; +- var _11: number; +- var _12: number; +- var _13: number; +- var _14: number; +- var _15: number; +- var _16: number; +- var _17: number; +- var _18: number; +- var _19: number; +- var _20: number; +- export var abstract: number; +- export var as: number; +- export var asserts: number; +- export var any: number; +- export var async: number; +- export var await: number; +- export var boolean: number; +- export var constructor: number; +- export var declare: number; +- export var get: number; +- export var infer: number; +- export var is: number; +- export var keyof: number; +- export var module: number; +- export var namespace: number; +- export var never: number; +- export var readonly: number; +- export var require: number; +- export var number: number; +- export var object: number; +- export var set: number; +- export var string: number; +- export var symbol: number; +- export var type: number; +- export var undefined: number; +- export var unique: number; +- export var unknown: number; +- export var from: number; +- export var global: number; +- export var bigint: number; +- export var of: number; +- export { _a as break, _b as case, _c as catch, _d as class, _e as const, _f as continue, _g as debugger, _h as default, _j as delete, _k as do, _l as else, _m as enum, _o as export, _p as extends, _q as false, _r as finally, _s as for, _t as function, _u as if, _v as import, _w as in, _x as instanceof, _y as new, _z as null, _0 as return, _1 as super, _2 as switch, _3 as this, _4 as throw, _5 as true, _6 as try, _7 as typeof, _8 as var, _9 as void, _10 as while, _11 as with, _12 as implements, _13 as interface, _14 as let, _15 as package, _16 as private, _17 as protected, _18 as public, _19 as static, _20 as yield }; +-} +-//# sourceMappingURL=nullPropertyName.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=nullPropertyName.d.ts.map ++/// [Errors] //// ++ ++nullPropertyName.ts(3,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(7,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(8,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(9,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(11,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(12,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(13,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(14,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(15,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(16,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(17,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(18,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(19,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(20,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(21,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(22,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(23,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(24,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(25,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(26,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(27,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(28,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(29,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(30,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(31,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(32,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(33,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(34,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(35,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(36,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(37,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(38,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(39,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(40,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(41,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(42,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(43,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(44,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(45,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(46,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(47,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(48,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(49,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(50,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(51,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(52,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(53,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(54,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(55,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(56,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(57,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(58,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(59,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(60,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(61,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(62,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(63,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(64,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(65,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(66,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(67,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(68,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(69,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(70,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(71,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(72,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(73,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(74,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(75,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(76,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(77,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(78,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(79,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(80,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(81,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++nullPropertyName.ts(82,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== nullPropertyName.ts (78 errors) ==== ++ function foo(): void {} ++ // properties ++ foo.x = 1; ++ ~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.y = 1; ++ ~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ // keywords ++ foo.break = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.case = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.catch = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.class = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.const = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.continue = 1; ++ ~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.debugger = 1; ++ ~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.default = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.delete = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.do = 1; ++ ~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.else = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.enum = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.export = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.extends = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.false = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.finally = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.for = 1; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.function = 1; ++ ~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.if = 1; ++ ~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.import = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.in = 1; ++ ~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.instanceof = 1; ++ ~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.new = 1; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.null = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.return = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.super = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.switch = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.this = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.throw = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.true = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.try = 1; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.typeof = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.var = 1; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.void = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.while = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.with = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.implements = 1; ++ ~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.interface = 1; ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.let = 1; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.package = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.private = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.protected = 1; ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.public = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.static = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.yield = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.abstract = 1; ++ ~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.as = 1; ++ ~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.asserts = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.any = 1; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.async = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.await = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.boolean = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.constructor = 1; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.declare = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.get = 1; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.infer = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.is = 1; ++ ~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.keyof = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.module = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.namespace = 1; ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.never = 1; ++ ~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.readonly = 1; ++ ~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.require = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.number = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.object = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.set = 1; ++ ~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.string = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.symbol = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.type = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.undefined = 1; ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.unique = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.unknown = 1; ++ ~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.from = 1; ++ ~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.global = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.bigint = 1; ++ ~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.of = 1; ++ ~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/numericEnumMappedType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/numericEnumMappedType.d.ts.diff new file mode 100644 index 0000000000000..fe2bc96db65f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/numericEnumMappedType.d.ts.diff @@ -0,0 +1,70 @@ +// [[Reason: Fixing enum values is not supported]] //// + +//// [tests/cases/compiler/numericEnumMappedType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -39,5 +39,59 @@ + THREE = "x" + } + declare const e: E; + declare const x: E.ONE; +-//# sourceMappingURL=numericEnumMappedType.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=numericEnumMappedType.d.ts.map ++/// [Errors] //// ++ ++numericEnumMappedType.ts(25,11): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++numericEnumMappedType.ts(25,22): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++numericEnumMappedType.ts(26,11): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++numericEnumMappedType.ts(26,22): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ++ ++==== numericEnumMappedType.ts (4 errors) ==== ++ // Repro from #31771 ++ ++ enum E1 { ONE, TWO, THREE } ++ declare enum E2 { ONE, TWO, THREE } ++ ++ type Bins1 = { [k in E1]?: string; } ++ type Bins2 = { [k in E2]?: string; } ++ ++ const b1: Bins1 = {}; ++ const b2: Bins2 = {}; ++ ++ const e1: E1 = E1.ONE; ++ const e2: E2 = E2.ONE; ++ ++ b1[1] = "a"; ++ b1[e1] = "b"; ++ ++ b2[1] = "a"; ++ b2[e2] = "b"; ++ ++ // Multiple numeric enum types accrue to the same numeric index signature in a mapped type ++ ++ declare function val(): number; ++ ++ enum N1 { A = val(), B = val() } ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ enum N2 { C = val(), D = val() } ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ++ type T1 = { [K in N1 | N2]: K }; ++ ++ // Enum types with string valued members are always literal enum types and therefore ++ // ONE and TWO below are not computed members but rather just numerically valued members ++ // with auto-incremented values. ++ ++ declare enum E { ONE, TWO, THREE = 'x' } ++ const e: E = E.ONE; ++ const x: E.ONE = e; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralComputedNameNoDeclarationError.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralComputedNameNoDeclarationError.d.ts.diff new file mode 100644 index 0000000000000..071b1e0f33648 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralComputedNameNoDeclarationError.d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: Printing differences]] //// + +//// [tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,11 @@ + + + //// [objectLiteralComputedNameNoDeclarationError.d.ts] ++declare const Foo: { ++ BANANA: "banana"; ++}; + export declare const Baa: { +- banana: number; ++ [Foo.BANANA]: number; + }; ++export {}; + //# sourceMappingURL=objectLiteralComputedNameNoDeclarationError.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.map.diff new file mode 100644 index 0000000000000..a9b3d7fa02641 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [optionalMethods.d.ts.map] +-{"version":3,"file":"optionalMethods.d.ts","sourceRoot":"","sources":["optionalMethods.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,IAAI,MAAM,CAAC;IACZ,CAAC,CAAC,IAAI,MAAM,CAAC;CAChB;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAQ3B;AAED,cAAM,GAAG;IAIc,CAAC,CAAC;IAAiB,CAAC;IAHvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,qBAAK;gBACY,CAAC,CAAC,oBAAQ,EAAS,CAAC,SAAK;IAC5C,CAAC,IAAI,MAAM;IAGX,CAAC,CAAC,IAAI,MAAM;IACZ,CAAC,CAAC,IAAI,MAAM;CAGf;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAa3B;AAED,cAAM,IAAI;IACN,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,IAAI,MAAM;CACf;AAED,cAAM,OAAQ,SAAQ,IAAI;IACtB,CAAC,SAAK;IACN,CAAC,IAAI,MAAM;CACd"} ++{"version":3,"file":"optionalMethods.d.ts","sourceRoot":"","sources":["optionalMethods.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,IAAI,MAAM,CAAC;IACZ,CAAC,CAAC,IAAI,MAAM,CAAC;CAChB;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAQ3B;AAED,cAAM,GAAG;IAIc,CAAC,CAAC,EAAE,MAAM;IAAS,CAAC;IAHvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,qBAAK;gBACY,CAAC,CAAC,EAAE,MAAM,YAAA,EAAS,CAAC,SAAK;IAC5C,CAAC,IAAI,MAAM;IAGX,CAAC,CAAC,IAAI,MAAM;IACZ,CAAC,CAAC,IAAI,MAAM;CAGf;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAa3B;AAED,cAAM,IAAI;IACN,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,IAAI,MAAM;CACf;AAED,cAAM,OAAQ,SAAQ,IAAI;IACtB,CAAC,SAAK;IACN,CAAC,IAAI,MAAM;CACd"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogbnVtYmVyOw0KICAgIGI/OiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KfQ0KZGVjbGFyZSBmdW5jdGlvbiB0ZXN0MSh4OiBGb28pOiB2b2lkOw0KZGVjbGFyZSBjbGFzcyBCYXIgew0KICAgIGQ/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICA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Rpb24gdGVzdDIoeDogQmFyKTogdm9pZCB7CiAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogbnVtYmVyOw0KICAgIGI/OiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KfQ0KZGVjbGFyZSBmdW5jdGlvbiB0ZXN0MSh4OiBGb28pOiB2b2lkOw0KZGVjbGFyZSBjbGFzcyBCYXIgew0KICAgIGQ/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgZTogbnVtYmVyOw0KICAgIGE6IG51bWJlcjsNCiAgICBiPzogbnVtYmVyOw0KICAgIGM/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoZD86IG51bWJlciB8IHVuZGVmaW5lZCwgZT86IG51bWJlcik7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KICAgIGg/KCk6IG51bWJlcjsNCn0NCmRlY2xhcmUgZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZDsNCmRlY2xhcmUgY2xhc3MgQmFzZSB7DQogICAgYT86IG51bWJlcjsNCiAgICBmPygpOiBudW1iZ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AgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalProperties01.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalProperties01.d.ts.map.diff new file mode 100644 index 0000000000000..5b842101130f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalProperties01.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [optionalProperties01.d.ts.map] +-{"version":3,"file":"optionalProperties01.d.ts","sourceRoot":"","sources":["optionalProperties01.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,IAAI,KAAgC,CAAC;AAC3C,QAAA,MAAM,IAAI,KAAiD,CAAC"} ++{"version":3,"file":"optionalProperties01.d.ts","sourceRoot":"","sources":["optionalProperties01.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,IAAI,EAA6B,GAAG,CAAC;AAC3C,QAAA,MAAM,IAAI,EAA8C,GAAG,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgcmVxdWlyZWQxOiBzdHJpbmc7DQogICAgcmVxdWlyZWQyOiBzdHJpbmc7DQogICAgb3B0aW9uYWw/O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YWxQcm9wZXJ0aWVzMDEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uYWxQcm9wZXJ0aWVzMDEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm9wdGlvbmFsUHJvcGVydGllczAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFVBQVUsR0FBRztJQUNYLFNBQVMsRUFBRSxNQUFNLENBQUM7SUFDbEIsU0FBUyxFQUFFLE1BQU0sQ0FBQztJQUNsQixRQUFRLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDbkI7QUFFRCxRQUFBLE1BQU0sSUFBSSxFQUE2QixHQUFHLENBQUM7QUFDM0MsUUFBQSxNQUFNLElBQUksRUFBOEMsR0FBRyxDQUFDIn0=,aW50ZXJmYWNlIEZvbyB7CiAgcmVxdWlyZWQxOiBzdHJpbmc7CiAgcmVxdWlyZWQyOiBzdHJpbmc7CiAgb3B0aW9uYWw/OiBzdHJpbmc7Cn0KCmNvbnN0IGZvbzEgPSB7IHJlcXVpcmVkMTogImhlbGxvIiB9IGFzIEZvbzsKY29uc3QgZm9vMiA9IHsgcmVxdWlyZWQxOiAiaGVsbG8iLCBvcHRpb25hbDogImJhciIgfSBhcyBGb287Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parameterDestructuringObjectLiteral.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parameterDestructuringObjectLiteral.d.ts.map.diff new file mode 100644 index 0000000000000..1be6d7ae117d8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parameterDestructuringObjectLiteral.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/parameterDestructuringObjectLiteral.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [parameterDestructuringObjectLiteral.d.ts.map] +-{"version":3,"file":"parameterDestructuringObjectLiteral.d.ts","sourceRoot":"","sources":["parameterDestructuringObjectLiteral.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG,YAAa;IAAE,OAAO,CAAC,EAAE,EAAE,CAAA;CAAE,KAAG,IAAW,CAAC;AAGrD,QAAA,MAAM,GAAG;cACS,EAAE;MACZ,IAAW,CAAC"} ++{"version":3,"file":"parameterDestructuringObjectLiteral.d.ts","sourceRoot":"","sources":["parameterDestructuringObjectLiteral.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG,GAAI,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,EAAE,CAAA;CAAE,KAAG,IAAW,CAAC;AAGrD,QAAA,MAAM,GAAG,GAAI,EAAE,OAAY,EAAE,EAAE;IACvB,OAAO,CAAC,EAAE,EAAE,CAAC;CAChB,KAAG,IAAW,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmbjE6IChvcHRpb25zOiB7DQogICAgaGVhZGVycz86IHt9Ow0KfSkgPT4gdm9pZDsNCmRlY2xhcmUgY29uc3QgZm4yOiAoeyBoZWFkZXJzIH06IHsNCiAgICBoZWFkZXJzPzoge307DQp9KSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cGFyYW1ldGVyRGVzdHJ1Y3R1cmluZ09iamVjdExpdGVyYWwuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1ldGVyRGVzdHJ1Y3R1cmluZ09iamVjdExpdGVyYWwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhcmFtZXRlckRlc3RydWN0dXJpbmdPYmplY3RMaXRlcmFsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsTUFBTSxHQUFHLFlBQWE7SUFBRSxPQUFPLENBQUMsRUFBRSxFQUFFLENBQUE7Q0FBRSxLQUFHLElBQVcs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FBQztDQUNoQixLQUFHLElBQVcsQ0FBQyJ9,Ly8gUmVwcm8gZnJvbSAjMjI2NDQKCmNvbnN0IGZuMSA9IChvcHRpb25zOiB7IGhlYWRlcnM/OiB7fSB9KTogdm9pZCA9PiB7IH07CmZuMSh7IGhlYWRlcnM6IHsgZm9vOiAxIH0gfSk7Cgpjb25zdCBmbjIgPSAoeyBoZWFkZXJzID0ge30gfTogewogICAgICAgIGhlYWRlcnM/OiB7fTsKICAgIH0pOiB2b2lkID0+IHsgfTsKZm4yKHsgaGVhZGVyczogeyBmb286IDEgfSB9KTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map.diff new file mode 100644 index 0000000000000..8bf77fba75793 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map] +-{"version":3,"file":"parenthesisDoesNotBlockAliasSymbolCreation.d.ts","sourceRoot":"","sources":["parenthesisDoesNotBlockAliasSymbolCreation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAC,MAAM,GAAC,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAG,KAAK;CAAE,CAAC;AAChF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAC,MAAM,GAAC,MAAM,IAAI,CACvD;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAG,KAAK;CAAE,CACxB,CA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ests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportWrittenCorrectlyInDeclaration.d.ts.map.diff new file mode 100644 index 0000000000000..7ef78927c5270 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportWrittenCorrectlyInDeclaration.d.ts.map.diff @@ -0,0 +1,19 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,9 @@ + + //// [Test.d.ts.map] +-{"version":3,"file":"Test.d.ts","sourceRoot":"","sources":["Test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACN,MAAM,UAAW,OAAO,MAAM,KAAG,IAAI,CAAS;CACxD"} ++{"version":3,"file":"Test.d.ts","sourceRoot":"","sources":["Test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACN,MAAM,GAAI,KAAK,EAAE,MAAM,CAAC,MAAM,KAAG,IAAI,CAAS;CACxD"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vVGhpbmdzIjsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIFRlc3Qgew0KICAgIG1ldGhvZDogKGlucHV0OiB0aGluZ3MuVGhpbmdBKSA9PiB2b2lkOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9VGVzdC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGVzdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiVGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssTUFBTSxNQUFNLFVBQVUsQ0FBQztBQUVuQyxxQkFBYSxJQUFJO0lBQ04sTUFBTSxVQUFXLE9BQU8sTUFBTSxLQUFHLElBQUksQ0FBUztDQUN4RCJ9,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vVGhpbmdzIjsKCmV4cG9ydCBjbGFzcyBUZXN0IHsKICAgIHB1YmxpYyBtZXRob2QgPSAoaW5wdXQ6IHRoaW5ncy5UaGluZ0EpOiB2b2lkICA9PiB7IH07Cn0= ++//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vVGhpbmdzIjsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIFRlc3Qgew0KICAgIG1ldGhvZDogKGlucHV0OiB0aGluZ3MuVGhpbmdBKSA9PiB2b2lkOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9VGVzdC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGVzdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiVGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssTUFBTSxNQUFNLFVBQVUsQ0FBQztBQUVuQyxxQkFBYSxJQUFJO0lBQ04sTUFBTSxHQUFJLEtBQUssRUFBRSxNQUFNLENBQUMsTUFBTSxLQUFHLElBQUksQ0FBUztDQUN4RCJ9,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vVGhpbmdzIjsKCmV4cG9ydCBjbGFzcyBUZXN0IHsKICAgIHB1YmxpYyBtZXRob2QgPSAoaW5wdXQ6IHRoaW5ncy5UaGluZ0EpOiB2b2lkICA9PiB7IH07Cn0= + + + //// [ThingA.d.ts.map] + {"version":3,"file":"ThingA.d.ts","sourceRoot":"","sources":["ThingA.ts"],"names":[],"mappings":"AACA,qBAAa,MAAM;CAAI"} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff new file mode 100644 index 0000000000000..8b9cae16a3e3d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff @@ -0,0 +1,26 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -84,15 +84,15 @@ + } + declare function f1({ a: string }: O): void; + declare const f2: ({ a: string }: O) => void; + declare const f3: ({ a: string, b, c }: O) => void; +-declare const f4: ({ a: string }: O) => string; +-declare const f5: ({ a: string, b, c }: O) => string; ++declare const f4: ({ a: string }: O) => typeof string; ++declare const f5: ({ a: string, b, c }: O) => typeof string; + declare const obj1: { + method({ a: string }: O): void; + }; + declare const obj2: { +- method({ a: string }: O): string; ++ method({ a: string }: O): typeof string; + }; + declare function f6({ a: string }: O): void; + declare const f7: ({ a: string, b, c }: O) => void; + declare const f8: ({ "a": string }: O) => void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit10.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit10.d.ts.map.diff new file mode 100644 index 0000000000000..c973189059954 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit10.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [symbolDeclarationEmit10.d.ts.map] +-{"version":3,"file":"symbolDeclarationEmit10.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit10.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;;CAGN,CAAA"} ++{"version":3,"file":"symbolDeclarationEmit10.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit10.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;IACC,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAI,MAAM;CAE5C,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdOiBzdHJpbmc7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0MTAuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0MTAuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN5bWJvbERlY2xhcmF0aW9uRW1pdDEwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxHQUFHOztDQUdOLENBQUEifQ==,dmFyIG9iaiA9IHsKICAgIGdldCBbU3ltYm9sLmlzQ29uY2F0U3ByZWFkYWJsZV0oKTogc3RyaW5nIHsgcmV0dXJuICcnIH0sCiAgICBzZXQgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdKHgpIHsgfQp9 ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdOiBzdHJpbmc7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0MTAuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0MTAuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN5bWJvbERlY2xhcmF0aW9uRW1pdDEwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxHQUFHO0lBQ0MsQ0FBQyxNQUFNLENBQUMsa0JBQWtCLENBQUMsRUFBSSxNQUFNO0NBRTVDLENBQUEifQ==,dmFyIG9iaiA9IHsKICAgIGdldCBbU3ltYm9sLmlzQ29uY2F0U3ByZWFkYWJsZV0oKTogc3RyaW5nIHsgcmV0dXJuICcnIH0sCiAgICBzZXQgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdKHgpIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit12.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit12.d.ts.diff new file mode 100644 index 0000000000000..d4d9d6704263b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit12.d.ts.diff @@ -0,0 +1,52 @@ +// [[Reason: Can't fix computed properties]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,33 +5,42 @@ + interface I { + } + export class C { + [Symbol.iterator]: I; ++ [Symbol.toPrimitive](x: I): invalid; + [Symbol.isConcatSpreadable](): I; +- get [Symbol.toPrimitive](): I; ++ get [Symbol.toPrimitive](): invalid; + set [Symbol.toPrimitive](x: I); + } + export {}; + } + //# sourceMappingURL=symbolDeclarationEmit12.d.ts.map + /// [Errors] //// + ++symbolDeclarationEmit12.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. ++symbolDeclarationEmit12.ts(9,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +-==== symbolDeclarationEmit12.ts (2 errors) ==== ++==== symbolDeclarationEmit12.ts (4 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9034 symbolDeclarationEmit12.ts:5:9: Add a return type to the method + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9032 symbolDeclarationEmit12.ts:9:13: Add a return type to the get accessor declaration. + set [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit8.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit8.d.ts.map.diff new file mode 100644 index 0000000000000..906bf05104649 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit8.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [symbolDeclarationEmit8.d.ts.map] +-{"version":3,"file":"symbolDeclarationEmit8.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit8.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;;CAEN,CAAA"} ++{"version":3,"file":"symbolDeclarationEmit8.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit8.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;IACH,CAAC,MAAM,CAAC,kBAAkB,CAAC;CAC9B,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0OC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0OC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sRGVjbGFyYXRpb25FbWl0OC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLElBQUksR0FBRzs7Q0FFTixDQUFBIn0=,dmFyIG9iaiA9IHsKICAgIFtTeW1ib2wuaXNDb25jYXRTcHJlYWRhYmxlXTogMAp9 ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0OC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0OC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sRGVjbGFyYXRpb25FbWl0OC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLElBQUksR0FBRztJQUNILENBQUMsTUFBTSxDQUFDLGtCQUFrQixDQUFDO0NBQzlCLENBQUEifQ==,dmFyIG9iaiA9IHsKICAgIFtTeW1ib2wuaXNDb25jYXRTcHJlYWRhYmxlXTogMAp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit9.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit9.d.ts.map.diff new file mode 100644 index 0000000000000..770e91878dcfd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit9.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [symbolDeclarationEmit9.d.ts.map] +-{"version":3,"file":"symbolDeclarationEmit9.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit9.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;mCAC4B,IAAI;CACtC,CAAA"} ++{"version":3,"file":"symbolDeclarationEmit9.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit9.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;IACH,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,IAAI;CACtC,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdKCk6IHZvaWQ7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0OS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0OS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sRGVjbGFyYXRpb25FbWl0OS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLElBQUksR0FBRzttQ0FDNEIsSUFBSTtDQUN0QyxDQUFBIn0=,dmFyIG9iaiA9IHsKICAgIFtTeW1ib2wuaXNDb25jYXRTcHJlYWRhYmxlXSgpOiB2b2lkIHsgfQp9 ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdKCk6IHZvaWQ7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0OS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0OS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sRGVjbGFyYXRpb25FbWl0OS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLElBQUksR0FBRztJQUNILENBQUMsTUFBTSxDQUFDLGtCQUFrQixDQUFDLElBQUksSUFBSTtDQUN0QyxDQUFBIn0=,dmFyIG9iaiA9IHsKICAgIFtTeW1ib2wuaXNDb25jYXRTcHJlYWRhYmxlXSgpOiB2b2lkIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff new file mode 100644 index 0000000000000..9ca19f3760fb9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff @@ -0,0 +1,44 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,32 @@ + + + //// [Folder/monorepo/core/index.d.ts] +-export declare function getStyles(): import("styled-components").InterpolationValue[]; +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file ++export declare function getStyles(): invalid; ++//# sourceMappingURL=index.d.ts.map ++/// [Errors] //// ++ ++Folder/monorepo/core/index.ts(3,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ++ ++ ++==== Folder/monorepo/core/index.ts (1 errors) ==== ++ import { styles } from "package-a"; ++ ++ export function getStyles() { ++ ~~~~~~~~~ ++!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9031 Folder/monorepo/core/index.ts:3:17: Add a return type to the function declaration. ++ return styles; ++ } ++ ++==== Folder/monorepo/package-a/index.d.ts (0 errors) ==== ++ export declare const styles: import("styled-components").InterpolationValue[]; ++ ++==== Folder/node_modules/styled-components/package.json (0 errors) ==== ++ { ++ "name": "styled-components", ++ "version": "3.3.3", ++ "typings": "typings/styled-components.d.ts" ++ } ++ ++==== Folder/node_modules/styled-components/typings/styled-components.d.ts (0 errors) ==== ++ export interface InterpolationValue {} +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map.diff new file mode 100644 index 0000000000000..d1918eb1d26bd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map] +-{"version":3,"file":"symbolObserverMismatchingPolyfillsWorkTogether.d.ts","sourceRoot":"","sources":["symbolObserverMismatchingPolyfillsWorkTogether.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B;AACD,UAAU,iBAAiB;IACvB,QAAQ,CAAC,QAAQ,EAAE,OAAO,MAAM,CAAC;CACpC;AAED,QAAA,MAAM,GAAG;;CAER,CAAC"} ++{"version":3,"file":"symbolObserverMismatchingPolyfillsWorkTogether.d.ts","sourceRoot":"","sources":["symbolObserverMismatchingPolyfillsWorkTogether.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B;AACD,UAAU,iBAAiB;IACvB,QAAQ,CAAC,QAAQ,EAAE,OAAO,MAAM,CAAC;CACpC;AAED,QAAA,MAAM,GAAG;IACL,CAAC,MAAM,CAAC,QAAQ,CAAC;CACpB,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsNCiAgICByZWFkb25seSBvYnNlcnZlcjogc3ltYm9sOw0KfQ0KaW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsNCiAgICByZWFkb25seSBvYnNlcnZlcjogdW5pcXVlIHN5bWJvbDsNCn0NCmRlY2xhcmUgY29uc3Qgb2JqOiB7DQogICAgW1N5bWJvbC5vYnNlcnZlcl06IG51bWJlcjsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1zeW1ib2xPYnNlcnZlck1pc21hdGNoaW5nUG9seWZpbGxzV29ya1RvZ2V0aGVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sT2JzZXJ2ZXJNaXNtYXRjaGluZ1BvbHlmaWxsc1dvcmtUb2dldGhlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sT2JzZXJ2ZXJNaXNtYXRjaGluZ1BvbHlmaWxsc1dvcmtUb2dldGhlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxVQUFVLGlCQUFpQjtJQUN2QixRQUFRLENBQUMsUUFBUSxFQUFFLE1BQU0sQ0FBQztDQUM3QjtBQUNELFVBQVUsaUJBQWlCO0lBQ3ZCLFFBQVEsQ0FBQyxRQUFRLEVBQUUsT0FBTyxNQUFNLENBQUM7Q0FDcEM7QUFFRC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7QUFFRCxRQUFBLE1BQU0sR0FBRztJQUNMLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQztDQUNwQixDQUFDIn0=,aW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsKICAgIHJlYWRvbmx5IG9ic2VydmVyOiBzeW1ib2w7Cn0KaW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsKICAgIHJlYWRvbmx5IG9ic2VydmVyOiB1bmlxdWUgc3ltYm9sOwp9Cgpjb25zdCBvYmogPSB7CiAgICBbU3ltYm9sLm9ic2VydmVyXTogMAp9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes4.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes4.d.ts.diff new file mode 100644 index 0000000000000..3acafeda3a641 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes4.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: Enums are not fixed]] //// + +//// [tests/cases/conformance/types/literal/templateLiteralTypes4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -38,10 +38,10 @@ + One = 1 + } + type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; + declare const enum NonLiteralEnum { +- Zero = 0, +- One = 1 ++ Zero, ++ One + } + type TNonLiteralEnum0 = "0" extends `${infer T extends NonLiteralEnum}` ? T : never; + type PString00 = "0" extends `${infer T extends string | StringLiteralEnum}` ? T : never; + type PString01 = "0" extends `${infer T extends string | number}` ? T : never; +@@ -158,13 +158,15 @@ + declare function f4(s: `**${T}**`): T; + //# sourceMappingURL=templateLiteralTypes4.d.ts.map + /// [Errors] //// + ++templateLiteralTypes4.ts(43,29): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++templateLiteralTypes4.ts(43,60): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + templateLiteralTypes4.ts(285,12): error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. + templateLiteralTypes4.ts(289,12): error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. + + +-==== templateLiteralTypes4.ts (2 errors) ==== ++==== templateLiteralTypes4.ts (4 errors) ==== + // infer from number + type TNumber0 = "100" extends `${infer N extends number}` ? N : never; // 100 + type TNumber1 = "-100" extends `${infer N extends number}` ? N : never; // -100 + type TNumber2 = "1.1" extends `${infer N extends number}` ? N : never; // 1.1 +@@ -206,8 +208,12 @@ + type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; // NumberLiteralEnum.Zero + + // infer from non-literal enums + const enum NonLiteralEnum { Zero = NumberLiteralEnum.Zero, One = NumberLiteralEnum.One } ++ ~~~~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ++ ~~~ ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + type TNonLiteralEnum0 = "0" extends `${infer T extends NonLiteralEnum}` ? T : never; // 0 + + // infer using priority: + // string > template-literal > (string-literal | string-literal-enum) > diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralsInTypes.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralsInTypes.d.ts.map.diff new file mode 100644 index 0000000000000..213003b324652 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralsInTypes.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/templateLiteralsInTypes.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [templateLiteralsInTypes.d.ts.map] +-{"version":3,"file":"templateLiteralsInTypes.d.ts","sourceRoot":"","sources":["templateLiteralsInTypes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,QAAS,MAAM,OAAO,MAAM,KAAG,GAAG,MAAM,MAAM,MAAM,MAA8D,CAAC"} ++{"version":3,"file":"templateLiteralsInTypes.d.ts","sourceRoot":"","sources":["templateLiteralsInTypes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAI,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAG,GAAG,MAAM,MAAM,MAAM,MAA8D,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmOiAoaGRyOiBzdHJpbmcsIHZhbDogbnVtYmVyKSA9PiBgJHtzdHJpbmd9Olx0JHtudW1iZXJ9XHJcbmA7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZW1wbGF0ZUxpdGVyYWxzSW5UeXBlcy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcGxhdGVMaXRlcmFsc0luVHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlbXBsYXRlTGl0ZXJhbHNJblR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsTUFBTSxDQUFDLFFBQVMsTUFBTSxPQUFPLE1BQU0sS0FBRyxHQUFHLE1BQU0sTUFBTSxNQUFNLE1BQThELENBQUMifQ==,Y29uc3QgZiA9IChoZHI6IHN0cmluZywgdmFsOiBudW1iZXIpOiBgJHtzdHJpbmd9Olx0JHtudW1iZXJ9XHJcbmAgPT4gYCR7aGRyfTpcdCR7dmFsfVxyXG5gIGFzIGAke3N0cmluZ306XHQke251bWJlcn1cclxuYDsKCmYoIngiKS5mb287Cg== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmOiAoaGRyOiBzdHJpbmcsIHZhbDogbnVtYmVyKSA9PiBgJHtzdHJpbmd9Olx0JHtudW1iZXJ9XHJcbmA7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZW1wbGF0ZUxpdGVyYWxzSW5UeXBlcy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcGxhdGVMaXRlcmFsc0luVHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlbXBsYXRlTGl0ZXJhbHNJblR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsTUFBTSxDQUFDLEdBQUksR0FBRyxFQUFFLE1BQU0sRUFBRSxHQUFHLEVBQUUsTUFBTSxLQUFHLEdBQUcsTUFBTSxNQUFNLE1BQU0sTUFBOEQsQ0FBQyJ9,Y29uc3QgZiA9IChoZHI6IHN0cmluZywgdmFsOiBudW1iZXIpOiBgJHtzdHJpbmd9Olx0JHtudW1iZXJ9XHJcbmAgPT4gYCR7aGRyfTpcdCR7dmFsfVxyXG5gIGFzIGAke3N0cmluZ306XHQke251bWJlcn1cclxuYDsKCmYoIngiKS5mb287Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisTypeInObjectLiterals2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisTypeInObjectLiterals2.d.ts.map.diff new file mode 100644 index 0000000000000..43d2c5fd4dee3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisTypeInObjectLiterals2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [thisTypeInObjectLiterals2.d.ts.map] +-{"version":3,"file":"thisTypeInObjectLiterals2.d.ts","sourceRoot":"","sources":["thisTypeInObjectLiterals2.ts"],"names":[],"mappings":"AAGA,QAAA,IAAI,IAAI;;SAEC,MAAM;;;aAKF,IAAI;;;;CAahB,CAAC;AAKF,KAAK,KAAK,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAA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sIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMuei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gICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgb2JqMTogew0KICAgIGE6IG51bWJlcjsNCiAgICBmKCk6IG51bWJlcjsNCiAgICBiOiBzdHJpbmc7DQogICAgYzogew0KICAgICAgICBnKCk6IHZvaWQ7DQogICAgfTsNCiAgICByZWFkb25seSBkOiBudW1iZXI7DQogICAgZTogc3RyaW5nOw0KfTsNCnR5cGUgUG9pbnQgPSB7DQogICAgeDogbnVtYmVyOw0KICAgIHk6IG51bWJlcjsNCiAgICB6PzogbnVtYmVyOw0KICAgIG1vdmVCeShkeDogbnVtYmVyLCBkeTogbnVtYmVyLCBkej86IG51bWJlcik6IHZvaWQ7DQp9Ow0KZGVjbGFyZSBsZXQgcDE6IFBvaW50Ow0KZGVjbGFyZSBsZXQgcDI6IFBvaW50IHwgbnVsbDsNCmRlY2xhcmUgbGV0IHAzOiBQb2ludCB8IHVuZGVmaW5lZDsNCmRlY2xhcmUgbGV0IHA0OiBQb2ludCB8IG51bGwgfCB1bmRlZmluZWQ7DQpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsNCmRlY2xhcmUgZnVuY3Rpb24gZjIocDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkKTogdm9pZDsNCnR5cGUgT2JqZWN0RGVzY3JpcHRvcjxELCBNPiA9IHsNCiAgICBkYXRhPzogRDsNCiAgICBtZXRob2RzPzogTSAmIFRoaXNUeXBlPEQgJiBNPjsNCn07DQpkZWNsYXJlIGZ1bmN0aW9uIG1ha2VPYmplY3Q8RCwgTT4oZGV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ogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LC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bnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/trackedSymbolsNoCrash.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/trackedSymbolsNoCrash.d.ts.map.diff new file mode 100644 index 0000000000000..c6371b22bbb68 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/trackedSymbolsNoCrash.d.ts.map.diff @@ -0,0 +1,18 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/trackedSymbolsNoCrash.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,8 +5,8 @@ + //// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgZW51bSBTeW50YXhLaW5kIHsNCiAgICBOb2RlMCA9IDAsDQogICAgTm9kZTEgPSAxLA0KICAgIE5vZGUyID0gMiwNCiAgICBOb2RlMyA9IDMsDQogICAgTm9kZTQgPSA0LA0KICAgIE5vZGU1ID0gNSwNCiAgICBOb2RlNiA9IDYsDQogICAgTm9kZTcgPSA3LA0KICAgIE5vZGU4ID0gOCwNCiAgICBOb2RlOSA9IDksDQogICAgTm9kZTEwID0gMTAsDQogICAgTm9kZTExID0gMTEsDQogICAgTm9kZTEyID0gMTIsDQogICAgTm9kZTEzID0gMTMsDQogICAgTm9kZTE0ID0gMTQsDQogICAgTm9kZTE1ID0gMTUsDQogICAgTm9kZTE2ID0gMTYsDQogICAgTm9kZTE3ID0gMTcsDQogICAgTm9kZTE4ID0gMTgsDQogICAgTm9kZTE5ID0gMTksDQogICAgTm9kZTIwID0gMjAsDQogICAgTm9kZTIxID0gMjEsDQogICAgTm9kZTIyID0gMjIsDQogICAgTm9kZTIzID0gMjMsDQogICAgTm9kZTI0ID0gMjQsDQogICAgTm9kZTI1ID0gMjUsDQogICAgTm9kZTI2ID0gMjYsDQogICAgTm9kZTI3ID0gMjcsDQogICAgTm9kZTI4ID0gMjgsDQogICAgTm9kZTI5ID0gMjksDQogICAgTm9kZTMwID0gMzAsDQogICAgTm9kZTMxID0gMzEsDQogICAgTm9kZTMyID0gMzIsDQogICAgTm9kZTMzID0gMzMsDQogICAgTm9kZTM0ID0gMzQsDQogICAgTm9kZTM1ID0gMzUsDQogICAgTm9kZTM2ID0gMzYsDQogICAgTm9kZTM3ID0gMzcsDQogICAgTm9kZTM4ID0gMzgsDQogICAgTm9kZTM5ID0gMzksDQogICAgTm9kZTQwID0gNDAsDQogICAgTm9kZTQxID0gNDEsDQogICAgTm9kZTQyID0gNDIsDQogICAgTm9kZTQzID0gNDMsDQogICAgTm9kZTQ0ID0gNDQsDQogICAgTm9kZTQ1ID0gNDUsDQogICAgTm9kZTQ2ID0gNDYsDQogICAgTm9kZTQ3ID0gNDcsDQogICAgTm9kZTQ4ID0gNDgsDQogICAgTm9kZTQ5ID0gNDksDQogICAgTm9kZTUwID0gNTAsDQogICAgTm9kZTUxID0gNTEsDQogICAgTm9kZTUyID0gNTIsDQogICAgTm9kZTUzID0gNTMsDQogICAgTm9kZTU0ID0gNTQsDQogICAgTm9kZTU1ID0gNTUsDQogICAgTm9kZTU2ID0gNTYsDQogICAgTm9kZTU3ID0gNTcsDQogICAgTm9kZTU4ID0gNTgsDQogICAgTm9kZTU5ID0gNTksDQogICAgTm9kZTYwID0gNjAsDQogICAgTm9kZTYxID0gNjEsDQogICAgTm9kZTYyID0gNjIsDQogICAgTm9kZTYzID0gNjMsDQogICAgTm9kZTY0ID0gNjQsDQogICAgTm9kZTY1ID0gNjUsDQogICAgTm9kZTY2ID0gNjYsDQogICAgTm9kZTY3ID0gNjcsDQogICAgTm9kZTY4ID0gNjgsDQogICAgTm9kZTY5ID0gNjksDQogICAgTm9kZTcwID0gNzAsDQogICAgTm9kZTcxID0gNzEsDQogICAgTm9kZTcyID0gNzIsDQogICAgTm9kZTczID0gNzMsDQogICAgTm9kZTc0ID0gNzQsDQogICAgTm9kZTc1ID0gNzUsDQogICAgTm9kZTc2ID0gNzYsDQogICAgTm9kZTc3ID0gNzcsDQogICAgTm9kZTc4ID0gNzgsDQogICAgTm9kZTc5ID0gNzksDQogICAgTm9kZTgwID0gODAsDQogICAgTm9kZTgxID0gODEsDQogICAgTm9kZTgyID0gODIsDQogICAgTm9kZTgzID0gODMsDQogICAgTm9kZTg0ID0gODQsDQogICAgTm9kZTg1ID0gODUsDQogICAgTm9kZTg2ID0gODYsDQogICAgTm9kZTg3ID0gODcsDQogICAgTm9kZTg4ID0gODgsDQogICAgTm9kZTg5ID0gODksDQogICAgTm9kZTkwID0gOTAsDQogICAgTm9kZTkxID0gOTEsDQogICAgTm9kZTkyID0gOTIsDQogICAgTm9kZTkzID0gOTMsDQogICAgTm9kZTk0ID0gOTQsDQogICAgTm9kZTk1ID0gOTUsDQogICAgTm9kZTk2ID0gOTYsDQogICAgTm9kZTk3ID0gOTcsDQogICAgTm9kZTk4ID0gOTgsDQogICAgTm9kZTk5ID0gOTkNCn0NCmV4cG9ydCBpbnRlcmZhY2UgTm9kZTAgew0KICAgIGtpbmQ6IFN5bnRheEtpbmQuTm9kZTA7DQogICAgcHJvcE5vZGUwOiBudW1iZXI7DQp9DQpleHBvcnQgaW50ZXJmYWNlIE5vZGUxIHsNCiAgICBraW5kOiBTeW50YXhLaW5kLk5vZGUxOw0KICAgIHByb3BOb2RlMTogbnVtYmVyOw0KfQ0KZXhwb3J0IGludGVyZmFjZSBOb2RlMiB7DQogICAga2luZDogU3ludGF4S2luZC5Ob2RlMjs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+IHwgRXh0cmFjdDxhc3QuTm9kZTk3LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk4LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk5LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+ID0+CiAgKAogICAgbm9kZTogYXN0Lk5vZGUgfCBudWxsIHwgdW5kZWZpbmVkLAogICk6IG5vZGUgaXMgRXh0cmFjdDxhc3QuTm9kZSwgeyBraW5kOiBOb2RlVHlwZSB9PiA9PgogICAgbm9kZT8ua2luZCA9PT0gbm9kZVR5cGU7Cgo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment29.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment29.d.ts.diff new file mode 100644 index 0000000000000..79cc89fd5a326 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment29.d.ts.diff @@ -0,0 +1,138 @@ +// [[Reason: Function declarations and class expressions are not fixed]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,8 @@ + + + //// [typeFromPropertyAssignment29.d.ts] + declare function ExpandoDecl(n: number): string; +-declare namespace ExpandoDecl { +- var prop: number; +- var m: (n: number) => number; +-} + declare var n: number; + declare const ExpandoExpr: { + (n: number): string; + prop: { +@@ -27,27 +23,18 @@ + declare function ExpandoNested(n: number): { + (m: number): number; + total: number; + }; +-declare namespace ExpandoNested { +- var also: number; +-} + declare function ExpandoMerge(n: number): number; + declare namespace ExpandoMerge { +- var p1: number; +-} +-declare namespace ExpandoMerge { + var p2: number; + } + declare namespace ExpandoMerge { + var p3: number; + } + declare var n: number; + declare namespace Ns { + function ExpandoNamespace(): void; +- namespace ExpandoNamespace { +- var p6: number; +- } + export function foo(): typeof ExpandoNamespace; + export {}; + } + declare var ExpandoExpr2: (n: number) => string; +@@ -55,37 +42,43 @@ + declare class ExpandoClass { + n: number; + } + declare var n: number; +-declare var ExpandoExpr3: { +- new (): { +- n: number; +- }; +-}; ++declare var ExpandoExpr3: invalid; + declare var n: number; + //# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map + /// [Errors] //// + ++typeFromPropertyAssignment29.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++typeFromPropertyAssignment29.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++typeFromPropertyAssignment29.ts(51,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++typeFromPropertyAssignment29.ts(56,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++typeFromPropertyAssignment29.ts(67,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + typeFromPropertyAssignment29.ts(77,14): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. + typeFromPropertyAssignment29.ts(78,14): error TS2339: Property 'm' does not exist on type '(n: number) => string'. + typeFromPropertyAssignment29.ts(81,22): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. + typeFromPropertyAssignment29.ts(81,42): error TS2339: Property 'm' does not exist on type '(n: number) => string'. + typeFromPropertyAssignment29.ts(87,14): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. + typeFromPropertyAssignment29.ts(88,14): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. + typeFromPropertyAssignment29.ts(91,22): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. + typeFromPropertyAssignment29.ts(91,42): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. ++typeFromPropertyAssignment29.ts(94,20): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + typeFromPropertyAssignment29.ts(97,14): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. + typeFromPropertyAssignment29.ts(98,14): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + typeFromPropertyAssignment29.ts(101,22): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. + typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + + +-==== typeFromPropertyAssignment29.ts (12 errors) ==== ++==== typeFromPropertyAssignment29.ts (18 errors) ==== + function ExpandoDecl(n: number): string { + return n.toString(); + } + ExpandoDecl.prop = 2 ++ ~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoDecl.m = function(n: number) { ++ ~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return n + 1; + } + var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length + +@@ -130,13 +123,17 @@ + nested.total = n + 1_000_000; + return nested; + } + ExpandoNested.also = -1; ++ ~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + function ExpandoMerge(n: number): number { + return n * 100; + } + ExpandoMerge.p1 = 111 ++ ~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + namespace ExpandoMerge { + export var p2 = 222; + } + namespace ExpandoMerge { +@@ -146,8 +143,10 @@ + + namespace Ns { + function ExpandoNamespace(): void {} + ExpandoNamespace.p6 = 42; ++ ~~~~~~~~~~~~~~~~~~~ ++!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + export function foo(): typeof ExpandoNamespace { + return ExpandoNamespace; + } + } +@@ -189,8 +188,10 @@ + !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. + + // Class expressions shouldn't work in typescript either + var ExpandoExpr3 = class { ++ ~~~~~ ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + n = 10001; + } + ExpandoExpr3.prop = 3 + ~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeGuardFunctionOfFormThis.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeGuardFunctionOfFormThis.d.ts.map.diff new file mode 100644 index 0000000000000..ad0a92f9d6600 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeGuardFunctionOfFormThis.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [typeGuardFunctionOfFormThis.d.ts.map] +-{"version":3,"file":"typeGuardFunctionOfFormThis.d.ts","sourceRoot":"","sources":["typeGuardFunctionOfFormThis.ts"],"names":[],"mappings":"AAAA,cAAM,UAAU;IACZ,QAAQ,IAAI,IAAI,IAAI,SAAS;IAG7B,UAAU,IAAI,IAAI,IAAI,aAAa;CAGtC;AAED,cAAM,SAAU,SAAQ,UAAU;IAC9B,IAAI,IAAI,IAAI;CACf;AAED,cAAM,aAAc,SAAQ,UAAU;IAClC,MAAM,IAAI,IAAI;CACjB;AAED,QAAA,IAAI,CAAC,EAAE,UAAgC,CAAC;AAQxC,UAAU,cAAe,SAAQ,UAAU;CAAG;AAE9C,QAAA,IAAI,CAAC,EAAE,cAAc,CAAC;AAsBtB,QAAA,IAAI,OAAO,EAAE;IACT,CAAC,EAAE,UAAU,CAAC;CACX,CAA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KTsKCmEuaXNMZWFkZXIgPSBtaW1pYy5pc0xlYWRlcjsKYS5pc0ZvbGxvd2VyID0gbWltaWMuaXNGb2xsb3dlcjsKCmlmIChtaW1pYy5pc0ZvbGxvd2VyKCkpIHsKICAgIG1pbWljLmZvbGxvdygpOwogICAgbWltaWMuaXNGb2xsb3dlciA9IGEuaXNGb2xsb3dlcjsKfQoKCmludGVyZmFjZSBNaW1pY0d1YXJkSW50ZXJmYWNlIHsKICAgIGlzTGVhZGVyKCk6IHRoaXMgaXMgTGVhZEd1YXJkOwogICAgaXNGb2xsb3dlcigpOiB0aGlzIGlzIEZvbGxvd2VyR3VhcmQ7Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeofImportTypeOnlyExport.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeofImportTypeOnlyExport.d.ts.map.diff new file mode 100644 index 0000000000000..393fb27b72fcb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeofImportTypeOnlyExport.d.ts.map.diff @@ -0,0 +1,18 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,8 +5,8 @@ + //// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgQ2xhc3NNYXBEaXJlY3RpdmUgfSBmcm9tICcuL2xpdC5qcyc7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBjOiB7DQogICAgZGlyZWN0aXZlOiBDbGFzc01hcERpcmVjdGl2ZTsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1idXR0b24uZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJidXR0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGlCQUFpQixFQUFXLE1BQU0sVUFBVSxDQUFDO0FBQ3JELGVBQU8sTUFBTSxDQUFDLEVBQUU7SUFDWixTQUFTLEVBQUUsaUJBQWlCLENBQUM7Q0FDbkIsQ0FBQyJ9,aW1wb3J0IHtDbGFzc01hcERpcmVjdGl2ZSwgY2xhc3NNYXB9IGZyb20gJy4vbGl0LmpzJzsKZXhwb3J0IGNvbnN0IGM6IHsKICAgIGRpcmVjdGl2ZTogQ2xhc3NNYXBEaXJlY3RpdmU7Cn0gPSBjbGFzc01hcCgpOwo= + + + //// [/.src/lit.d.ts.map] +-{"version":3,"file":"lit.d.ts","sourceRoot":"","sources":["lit.ts"],"names":[],"mappings":"AAAA,cAAM,iBAAiB;CAAG;AAE1B,YAAY,EAAC,iBAAiB,EAAC,CAAC;AAEhC,eAAO,MAAM,SAAS,cACR,CAAC,KAAG,MAAM;IAClB,WAAW,CAAC,CAAC;CAIf,CAAC;AAEL,eAAO,MAAM,QAAQ,EAAE,MAAM;IACzB,SAAS,EAAE,OAAO,iBAAiB,CAAC;CACR,CAAC"} ++{"version":3,"file":"lit.d.ts","sourceRoot":"","sources":["lit.ts"],"names":[],"mappings":"AAAA,cAAM,iBAAiB;CAAG;AAE1B,YAAY,EAAC,iBAAiB,EAAC,CAAC;AAEhC,eAAO,MAAM,SAAS,GACnB,CAAC,EAAE,MAAM,EAAE,CAAC,KAAG,MAAM;IAClB,SAAS,EAAE,CAAC,CAAC;CAIf,CAAC;AAEL,eAAO,MAAM,QAAQ,EAAE,MAAM;IACzB,SAAS,EAAE,OAAO,iBAAiB,CAAC;CACR,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBDbGFzc01hcERpcmVjdGl2ZSB7DQp9DQpleHBvcnQgdHlwZSB7IENsYXNzTWFwRGlyZWN0aXZlIH07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBkaXJlY3RpdmU6IDxDPihjbGFzc186IEMpID0+ICgpID0+IHsNCiAgICBk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Q2xhc3NNYXBEaXJlY3RpdmUpOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff new file mode 100644 index 0000000000000..dad54a9ea6d64 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff @@ -0,0 +1,64 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,51 @@ + + + //// [/.src/main.d.ts] +-export declare const va: import("ext").A; +-export declare const vb: import("ext/other").B; +-//# sourceMappingURL=main.d.ts.map +\ No newline at end of file ++export declare const va: invalid; ++export declare const vb: invalid; ++//# sourceMappingURL=main.d.ts.map ++/// [Errors] //// ++ ++main.ts(4,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++main.ts(5,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++ ++ ++==== main.ts (2 errors) ==== ++ import { fa } from "ext"; ++ import { fb } from "ext/other"; ++ ++ export const va = fa(); ++ ~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 main.ts:4:14: Add a type annotation to the variable va. ++ export const vb = fb(); ++ ~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 main.ts:5:14: Add a type annotation to the variable vb. ++ ++==== node_modules/ext/package.json (0 errors) ==== ++ { ++ "name": "ext", ++ "version": "1.0.0", ++ "types": "index", ++ "typesVersions": { ++ ">=3.1.0-0": { "*" : ["ts3.1/*"] } ++ } ++ } ++ ++==== node_modules/ext/index.d.ts (0 errors) ==== ++ export interface A {} ++ export function fa(): A; ++ ++==== node_modules/ext/other.d.ts (0 errors) ==== ++ export interface B {} ++ export function fb(): B; ++ ++==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== ++ export interface A {} ++ export function fa(): A; ++ ++==== node_modules/ext/ts3.1/other.d.ts (0 errors) ==== ++ export interface B {} ++ export function fb(): B; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff new file mode 100644 index 0000000000000..903262f80348e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff @@ -0,0 +1,37 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,27 @@ + + + //// [/.src/main.d.ts] + export declare const va: any; +-export declare const vb: import("ext/other").B; ++export declare const vb: invalid; + //# sourceMappingURL=main.d.ts.map + /// [Errors] //// + + main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. ++main.ts(5,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +-==== main.ts (1 errors) ==== ++==== main.ts (2 errors) ==== + import { fa } from "ext"; + ~~ + !!! error TS2305: Module '"ext"' has no exported member 'fa'. + import { fb } from "ext/other"; + + export const va: any = fa(); + export const vb = fb(); ++ ~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 main.ts:5:14: Add a type annotation to the variable vb. + + ==== node_modules/ext/package.json (0 errors) ==== + { + "name": "ext", diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff new file mode 100644 index 0000000000000..db0134c18f81f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff @@ -0,0 +1,61 @@ +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// + +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,48 @@ + + + //// [/.src/main.d.ts] +-export declare const va: import("ext").A2; +-export declare const va2: import("ext").A2; +-//# sourceMappingURL=main.d.ts.map +\ No newline at end of file ++export declare const va: invalid; ++export declare const va2: invalid; ++//# sourceMappingURL=main.d.ts.map ++/// [Errors] //// ++ ++main.ts(4,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++main.ts(5,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++ ++ ++==== main.ts (2 errors) ==== ++ import { fa } from "ext"; ++ import { fa as fa2 } from "ext/other"; ++ ++ export const va = fa(); ++ ~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 main.ts:4:14: Add a type annotation to the variable va. ++ export const va2 = fa2(); ++ ~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 main.ts:5:14: Add a type annotation to the variable va2. ++ ++==== node_modules/ext/package.json (0 errors) ==== ++ { ++ "name": "ext", ++ "version": "1.0.0", ++ "types": "index", ++ "typesVersions": { ++ ">=3.1.0-0": { ++ "index" : ["ts3.1/index"] ++ } ++ } ++ } ++ ++==== node_modules/ext/index.d.ts (0 errors) ==== ++ export interface A {} ++ export function fa(): A; ++ ++==== node_modules/ext/other.d.ts (0 errors) ==== ++ export interface A2 {} ++ export function fa(): A2; ++ ++==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== ++ export * from "../other"; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.diff new file mode 100644 index 0000000000000..3a0b08cdc2baa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.diff @@ -0,0 +1,101 @@ +// [[Reason: Can't fix class expressions.]] //// + +//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,14 +8,9 @@ + export declare const obj: { + method1(p: typeof s): typeof s; + method2(p: I["readonlyType"]): I["readonlyType"]; + }; +-export declare const classExpression: { +- new (): { +- method1(p: typeof s): typeof s; +- method2(p: I["readonlyType"]): I["readonlyType"]; +- }; +-}; ++export declare const classExpression: invalid; + export declare function funcInferredReturnType(obj: { + method(p: typeof s): void; + }): { + method(p: typeof s): void; +@@ -46,5 +41,74 @@ + static get [s](): any; + static set [s](v: any); + } + export {}; +-//# sourceMappingURL=uniqueSymbolsDeclarationsErrors.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=uniqueSymbolsDeclarationsErrors.d.ts.map ++/// [Errors] //// ++ ++uniqueSymbolsDeclarationsErrors.ts(15,32): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. ++ ++ ++==== uniqueSymbolsDeclarationsErrors.ts (1 errors) ==== ++ declare const s: unique symbol; ++ interface I { readonly readonlyType: unique symbol; } ++ ++ // not allowed when emitting declarations ++ ++ export const obj = { ++ method1(p: typeof s): typeof s { ++ return p; ++ }, ++ method2(p: I["readonlyType"]): I["readonlyType"] { ++ return p; ++ } ++ }; ++ ++ export const classExpression = class { ++ ~~~~~ ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. ++ method1(p: typeof s): typeof s { ++ return p; ++ } ++ method2(p: I["readonlyType"]): I["readonlyType"] { ++ return p; ++ } ++ }; ++ ++ export function funcInferredReturnType(obj: { method(p: typeof s): void }): { ++ method(p: typeof s): void; ++ } { ++ return obj; ++ } ++ ++ export interface InterfaceWithPrivateNamedProperties { ++ [s]: any; ++ } ++ ++ export interface InterfaceWithPrivateNamedMethods { ++ [s](): any; ++ } ++ ++ export type TypeLiteralWithPrivateNamedProperties = { ++ [s]: any; ++ } ++ ++ export type TypeLiteralWithPrivateNamedMethods = { ++ [s](): any; ++ } ++ ++ export class ClassWithPrivateNamedProperties { ++ [s]: any; ++ static [s]: any; ++ } ++ ++ export class ClassWithPrivateNamedMethods { ++ [s](): void {} ++ static [s](): void {} ++ } ++ ++ export class ClassWithPrivateNamedAccessors { ++ get [s](): any { return undefined; } ++ set [s](v: any) { } ++ static get [s](): any { return undefined; } ++ static set [s](v: any) { } ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/variadicTuples1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/variadicTuples1.d.ts.map.diff new file mode 100644 index 0000000000000..0e77ed433f279 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/variadicTuples1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/tuple/variadicTuples1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [variadicTuples1.d.ts.map] +-{"version":3,"file":"variadicTuples1.d.ts","sourceRoot":"","sources":["variadicTuples1.ts"],"names":[],"mappings":"AAEA,KAAK,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;AAC/C,KAAK,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,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/isolated-declarations/auto-fixed/diff/varianceAnnotations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/varianceAnnotations.d.ts.diff new file mode 100644 index 0000000000000..82657cc7ab838 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/varianceAnnotations.d.ts.diff @@ -0,0 +1,62 @@ +// [[Reason: Can't fix class expressions]] //// + +//// [tests/cases/conformance/types/typeParameters/typeParameterLists/varianceAnnotations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -104,18 +104,10 @@ + declare const qq: ActionObject<{ + type: "PLAY"; + value: number; + }>; +-declare let Anon: { +- new (): { +- foo(): any; +- }; +-}; +-declare let OuterC: { +- new (): { +- foo(): any; +- }; +-}; ++declare let Anon: invalid; ++declare let OuterC: invalid; + //# sourceMappingURL=varianceAnnotations.d.ts.map + /// [Errors] //// + + varianceAnnotations.ts(9,1): error TS2322: Type 'Covariant' is not assignable to type 'Covariant'. +@@ -183,11 +175,13 @@ + Type 'StateNode' is not assignable to type 'StateNode'. + Types of property '_storedEvent' are incompatible. + Type '{ type: "PLAY"; value: number; } | { type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. + Type '{ type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. ++varianceAnnotations.ts(164,12): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. ++varianceAnnotations.ts(170,20): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + + +-==== varianceAnnotations.ts (31 errors) ==== ++==== varianceAnnotations.ts (33 errors) ==== + type Covariant = { + x: T; + } + +@@ -447,14 +441,18 @@ + + // Repros from #48618 + + let Anon = class { ++ ~~~~~ ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + foo(): InstanceType<(typeof Anon)> { + return this; + } + } + + let OuterC = class C { ++ ~ ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + foo(): C { + return this; + } + } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/weakTypesAndLiterals01.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/weakTypesAndLiterals01.d.ts.map.diff new file mode 100644 index 0000000000000..b8185f4b75de8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/weakTypesAndLiterals01.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [weakTypesAndLiterals01.d.ts.map] +-{"version":3,"file":"weakTypesAndLiterals01.d.ts","sourceRoot":"","sources":["weakTypesAndLiterals01.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GACR;IAAE,QAAQ,CAAC,EAAE,IAAI,CAAC;CAAE,GACpB;IAAE,WAAW,CAAC,IAAI,MAAM,CAAA;CAAE,GAC1B;IAAE,WAAW,CAAC,IAAI,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,KAAK,mBAAmB,GAClB,GAAG,GACH,GAAG,GACH,SAAS,CAAC;AAEhB,OAAO,CAAC,IAAI,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;AAE5B,QAAA,MAAM,CAAC,QAAS,mBAAmB,KAAG,SAAS,GAAG,GAAG,GAAG,GAOvD,CAAA;AAED,QAAA,MAAM,CAAC,QAAS,SAAS,KAAG,SAO3B,CAAA;AAED,QAAA,MAAM,CAAC,QAAS,mBAAmB,KAAG,mBAOrC,CAAA;AAED,QAAA,MAAM,CAAC,QAAS,SAAS,KAAG,SAO3B,CAAA"} ++{"version":3,"file":"weakTypesAndLiterals01.d.ts","sourceRoot":"","sources":["weakTypesAndLiterals01.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GACR;IAAE,QAAQ,CAAC,EAAE,IAAI,CAAC;CAAE,GACpB;IAAE,WAAW,CAA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gfQogICAgfCB7IHRvVXBwZXJDYXNlPygpOiBzdHJpbmcsIG90aGVyT3B0aW9uYWxQcm9wPzogbnVtYmVyIH07Cgp0eXBlIExpdGVyYWxzT3JXZWFrVHlwZXMgPQogICAgfCAiQSIKICAgIHwgIkIiCiAgICB8IFdlYWtUeXBlczsKCmRlY2xhcmUgbGV0IGFPckI6ICJBIiB8ICJCIjsKCmNvbnN0IGYgPSAoYXJnOiBMaXRlcmFsc09yV2Vha1R5cGVzKTogV2Vha1R5cGVzIHwgIkEiIHwgIkIiID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBnID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBoID0gKGFyZzogTGl0ZXJhbHNPcldlYWtUeXBlcyk6IExpdGVyYWxzT3JXZWFrVHlwZXMgPT4gewogICAgaWYgKGFyZyA9PT0gYU9yQikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBpID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09IGFPckIpIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgcmV0dXJuIGFyZzsKICAgIH0KfQo= ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBXZWFrVHlwZXMgPSB7DQogICAgb3B0aW9uYWw/OiB0cnVlOw0KfSB8IHsNCiAgICB0b0xvd2VyQ2FzZT8oKTogc3RyaW5nOw0KfSB8IHsNCiAgICB0b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pjb25zdCBoID0gKGFyZzogTGl0ZXJhbHNPcldlYWtUeXBlcyk6IExpdGVyYWxzT3JXZWFrVHlwZXMgPT4gewogICAgaWYgKGFyZyA9PT0gYU9yQikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBpID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09IGFPckIpIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgcmV0dXJuIGFyZzsKICAgIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorDeclarationEmitVisibilityErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorDeclarationEmitVisibilityErrors.d.ts new file mode 100644 index 0000000000000..bb9cdd8727e2f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorDeclarationEmitVisibilityErrors.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts] //// + +//// [accessorDeclarationEmitVisibilityErrors.ts] +export class Q { + set bet(arg: DoesNotExist) {} +} + +/// [Declarations] //// + + + +//// [accessorDeclarationEmitVisibilityErrors.d.ts] +export declare class Q { + set bet(arg: DoesNotExist); +} +//# sourceMappingURL=accessorDeclarationEmitVisibilityErrors.d.ts.map +/// [Errors] //// + +accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS2304: Cannot find name 'DoesNotExist'. +accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS4106: Parameter 'arg' of accessor has or is using private name 'DoesNotExist'. + + +==== accessorDeclarationEmitVisibilityErrors.ts (2 errors) ==== + export class Q { + set bet(arg: DoesNotExist) {} + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'DoesNotExist'. + ~~~~~~~~~~~~ +!!! error TS4106: Parameter 'arg' of accessor has or is using private name 'DoesNotExist'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map new file mode 100644 index 0000000000000..73fd425a8e10f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts] //// + +//// [accessorInferredReturnTypeErrorInReturnStatement.ts] +export var basePrototype = { + get primaryPath(): any { + var _this = this; + return _this.collection.schema.primaryPath; + }, +}; + + +/// [Declarations] //// + + + +//// [accessorInferredReturnTypeErrorInReturnStatement.d.ts] +export declare var basePrototype: { + readonly primaryPath: any; +}; +//# sourceMappingURL=accessorInferredReturnTypeErrorInReturnStatement.d.ts.map + +/// [Declarations Maps] //// + + +//// [accessorInferredReturnTypeErrorInReturnStatement.d.ts.map] +{"version":3,"file":"accessorInferredReturnTypeErrorInReturnStatement.d.ts","sourceRoot":"","sources":["accessorInferredReturnTypeErrorInReturnStatement.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,aAAa;aAClB,WAAW,EAAI,GAAG;CAIvB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7YUFDbEIsV0FBVyxFQUFJLEdBQUc7Q0FJdkIsQ0FBQyJ9,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientConstLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientConstLiterals.d.ts new file mode 100644 index 0000000000000..293b676b98d89 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientConstLiterals.d.ts @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/ambientConstLiterals.ts] //// + +//// [ambientConstLiterals.ts] +function f(x: T): T { + return x; +} + +enum E { A, B, C, "non identifier" } + +const c1 = "abc"; +const c2 = 123; +const c3: "abc" = c1; +const c4: 123 = c2; +const c5: 123 = f(123); +const c6: -123 = f(-123); +const c7 = true; +const c8: E.A = E.A; +const c8b: (typeof E)["non identifier"] = E["non identifier"]; +const c9 = { x: "abc" }; +const c10: number[] = [123]; +const c11: string = "abc" + "def"; +const c12: number = 123 + 456; +const c13: "abc" | "def" = Math.random() > 0.5 ? "abc" : "def"; +const c14: 123 | 456 = Math.random() > 0.5 ? 123 : 456; + +/// [Declarations] //// + + + +//// [ambientConstLiterals.d.ts] +declare function f(x: T): T; +declare enum E { + A = 0, + B = 1, + C = 2, + "non identifier" = 3 +} +declare const c1 = "abc"; +declare const c2 = 123; +declare const c3: "abc"; +declare const c4: 123; +declare const c5: 123; +declare const c6: -123; +declare const c7 = true; +declare const c8: E.A; +declare const c8b: (typeof E)["non identifier"]; +declare const c9: { + x: string; +}; +declare const c10: number[]; +declare const c11: string; +declare const c12: number; +declare const c13: "abc" | "def"; +declare const c14: 123 | 456; +//# sourceMappingURL=ambientConstLiterals.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts new file mode 100644 index 0000000000000..5f82d670c77f9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts] //// + +//// [arrayFakeFlatNoCrashInferenceDeclarations.ts] +type BadFlatArray = {obj: { + "done": Arr, + "recur": Arr extends ReadonlyArray + ? BadFlatArray + : Arr +}[Depth extends -1 ? "done" : "recur"]}["obj"]; + +declare function flat( + arr: A, + depth?: D +): BadFlatArray[] + +function foo(arr: T[], depth: number) { + return flat(arr, depth); +} + +/// [Declarations] //// + + + +//// [arrayFakeFlatNoCrashInferenceDeclarations.d.ts] +type BadFlatArray = { + obj: { + "done": Arr; + "recur": Arr extends ReadonlyArray ? BadFlatArray : Arr; + }[Depth extends -1 ? "done" : "recur"]; +}["obj"]; +declare function flat(arr: A, depth?: D): BadFlatArray[]; +declare function foo(arr: T[], depth: number): invalid; +//# sourceMappingURL=arrayFakeFlatNoCrashInferenceDeclarations.d.ts.map +/// [Errors] //// + +arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary. +arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + + +==== arrayFakeFlatNoCrashInferenceDeclarations.ts (2 errors) ==== + type BadFlatArray = {obj: { + "done": Arr, + "recur": Arr extends ReadonlyArray + ? BadFlatArray + : Arr + }[Depth extends -1 ? "done" : "recur"]}["obj"]; + + declare function flat( + arr: A, + depth?: D + ): BadFlatArray[] + + function foo(arr: T[], depth: number) { + ~~~ +!!! error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary. + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 arrayFakeFlatNoCrashInferenceDeclarations.ts:13:10: Add a return type to the function declaration. + return flat(arr, depth); + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/coAndContraVariantInferences.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/coAndContraVariantInferences.d.ts.map new file mode 100644 index 0000000000000..f9ab380bac18a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/coAndContraVariantInferences.d.ts.map @@ -0,0 +1,76 @@ +//// [tests/cases/compiler/coAndContraVariantInferences.ts] //// + +//// [coAndContraVariantInferences.ts] +type A = { kind: 'a' }; +type B = { kind: 'b' }; + +declare const a: A; +declare const b: B; + +declare function fab(arg: A | B): void; + +declare function foo(x: { kind: T }, f: (arg: { kind: T }) => void): void; + +foo(a, fab); +foo(b, fab); + +// Repro from #45603 + +interface Action { + name: TName, + payload: TPayload +} + +const actionA = { payload: 'any-string' } as Action<'ACTION_A', string>; +const actionB = { payload: true } as Action<'ACTION_B', boolean>; + +function call( + action: Action, + fn: (action: Action)=> any, +): void { + fn(action); +} + +const printFn = (action: typeof actionA | typeof actionB): void=> console.log(action); + +call(actionA, printFn); +call(actionB, printFn); + + +/// [Declarations] //// + + + +//// [coAndContraVariantInferences.d.ts] +type A = { + kind: 'a'; +}; +type B = { + kind: 'b'; +}; +declare const a: A; +declare const b: B; +declare function fab(arg: A | B): void; +declare function foo(x: { + kind: T; +}, f: (arg: { + kind: T; +}) => void): void; +interface Action { + name: TName; + payload: TPayload; +} +declare const actionA: Action<"ACTION_A", string>; +declare const actionB: Action<"ACTION_B", boolean>; +declare function call(action: Action, fn: (action: Action) => any): void; +declare const printFn: (action: typeof actionA | typeof actionB) => void; +//# sourceMappingURL=coAndContraVariantInferences.d.ts.map + +/// [Declarations Maps] //// + + +//// [coAndContraVariantInferences.d.ts.map] +{"version":3,"file":"coAndContraVariantInferences.d.ts","sourceRoot":"","sources":["coAndContraVariantInferences.ts"],"names":[],"mappings":"AAAA,KAAK,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC;AACvB,KAAK,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC;AAEvB,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACnB,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEnB,OAAO,UAAU,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAEvC,OAAO,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,KAAK,IAAI,GAAG,IAAI,CAAC;AAO7E,UAAU,MAAM,CAAC,KAAK,SAAS,MAAM,EAAC,QAAQ;IAC1C,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,QAAQ,CAAA;CACpB;AAED,QAAA,MAAM,OAAO,EAAgC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACxE,QAAA,MAAM,OAAO,EAAwB,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAEjE,iBAAS,IAAI,CAAC,KAAK,SAAS,MAAM,EAAC,QAAQ,EACzC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAC,QAAQ,CAAC,EAC9B,EAAE,EAAE,CAAC,MAAM,EAA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lIGV4dGVuZHMgc3RyaW5nLFRQYXlsb2FkPigKICBhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4sCiAgZm46IChhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4pPT4gYW55LAopOiB2b2lkIHsKICBmbihhY3Rpb24pOwp9Cgpjb25zdCBwcmludEZuID0gKGFjdGlvbjogdHlwZW9mIGFjdGlvbkEgfCB0eXBlb2YgYWN0aW9uQik6IHZvaWQ9PiBjb25zb2xlLmxvZyhhY3Rpb24pOwoKY2FsbChhY3Rpb25BLCBwcmludEZuKTsKY2FsbChhY3Rpb25CLCBwcmludEZuKTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsFunction.d.ts new file mode 100644 index 0000000000000..7e18f166107cc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsFunction.d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/compiler/commentsFunction.ts] //// + +//// [commentsFunction.ts] +/** This comment should appear for foo*/ +function foo(): void { +} /* trailing comment of function */ +foo(); +/** This is comment for function signature*/ +function fooWithParameters(/** this is comment about a*/a: string, + /** this is comment for b*/ + b: number): void { + var d = a; +} // trailing comment of function +fooWithParameters("a", 10); +/** fooFunc + * comment + */ +var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b: string): string { + return b; +} + +/// lamdaFoo var comment +var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number): number => a + b; +var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number): number => a * b; +lambdaFoo(10, 20); +lambddaNoVarComment(10, 20); + +function blah(a: string /* multiline trailing comment +multiline */): void { +} + +function blah2(a: string /* single line multiple trailing comments */ /* second */): void { +} + +function blah3(a: string // trailing commen single line + ): void { +} + +lambdaFoo = (a, b) => a * b; // This is trailing comment + +/*leading comment*/() => 0; // Needs to be wrapped in parens to be a valid expression (not declaration) +/*leading comment*/(() => 0); //trailing comment + +function blah4(/*1*/a: string/*2*/,/*3*/b: string/*4*/): void { +} + +function foo1(): void { + + // should emit this +} + +function foo2(): void { + /// This is some detached comment + + // should emit this leading comment of } too +} + + +/// [Declarations] //// + + + +//// [commentsFunction.d.ts] +/** This comment should appear for foo*/ +declare function foo(): void; +/** This is comment for function signature*/ +declare function fooWithParameters(/** this is comment about a*/ a: string, +/** this is comment for b*/ +b: number): void; +/** fooFunc + * comment + */ +declare var fooFunc: (/** fooFunctionValue param */ b: string) => string; +declare var lambdaFoo: (/**param a*/ a: number, /**param b*/ b: number) => number; +declare var lambddaNoVarComment: (/**param a*/ a: number, /**param b*/ b: number) => number; +declare function blah(a: string): void; +declare function blah2(a: string): void; +declare function blah3(a: string): void; +declare function blah4(/*1*/ a: string, /*3*/ b: string): void; +declare function foo1(): void; +declare function foo2(): void; +//# sourceMappingURL=commentsFunction.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsVarDecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsVarDecl.d.ts.map new file mode 100644 index 0000000000000..9202b366b6d56 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsVarDecl.d.ts.map @@ -0,0 +1,84 @@ +//// [tests/cases/compiler/commentsVarDecl.ts] //// + +//// [commentsVarDecl.ts] +/** Variable comments*/ +var myVariable = 10; // This trailing Comment1 + +/** This is another variable comment*/ +var anotherVariable = 30; + +// shouldn't appear +var aVar = ""; + +/** this is multiline comment + * All these variables are of number type */ +var anotherAnotherVariable = 70; /* these are multiple trailing comments */ /* multiple trailing comments */ + +/** Triple slash multiline comment*/ +/** another line in the comment*/ +/** comment line 2*/ +var x = 70; /* multiline trailing comment +this is multiline trailing comment */ +/** Triple slash comment on the assignment shouldnt be in .d.ts file*/ +x = myVariable; + +/** triple slash comment1*/ +/** jsdocstyle comment - only this comment should be in .d.ts file*/ +var n = 30; + +/** var deckaration with comment on type as well*/ +var y = /** value comment */ 20; + +/// var deckaration with comment on type as well +var yy = + /// value comment + 20; + +/** comment2 */ +var z = /** lambda comment */ (x: number, y: number): number => x + y; + +var z2: /** type comment*/ (x: number) => string; + +var x2: (x: number) => string = z2; + +var n4: (x: number) => string; +n4 = z2; + +/// [Declarations] //// + + + +//// [commentsVarDecl.d.ts] +/** Variable comments*/ +declare var myVariable: number; +/** This is another variable comment*/ +declare var anotherVariable: number; +declare var aVar: string; +/** this is multiline comment + * All these variables are of number type */ +declare var anotherAnotherVariable: number; +/** Triple slash multiline comment*/ +/** another line in the comment*/ +/** comment line 2*/ +declare var x: number; +/** triple slash comment1*/ +/** jsdocstyle comment - only this comment should be in .d.ts file*/ +declare var n: number; +/** var deckaration with comment on type as well*/ +declare var y: number; +declare var yy: number; +/** comment2 */ +declare var z: (x: number, y: number) => number; +declare var z2: (x: number) => string; +declare var x2: (x: number) => string; +declare var n4: (x: number) => string; +//# sourceMappingURL=commentsVarDecl.d.ts.map + +/// [Declarations Maps] //// + + +//// [commentsVarDecl.d.ts.map] +{"version":3,"file":"commentsVarDecl.d.ts","sourceRoot":"","sources":["commentsVarDecl.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,QAAA,IAAI,UAAU,QAAK,CAAC;AAEpB,sCAAsC;AACtC,QAAA,IAAI,eAAe,QAAK,CAAC;AAGzB,QAAA,IAAI,IAAI,QAAK,CAAC;AAEd;6CAC6C;AAC7C,QAAA,IAAI,sBAAsB,QAAK,CAAC;AAEhC,oCAAoC;AACpC,iCAAiC;AACjC,oBAAoB;AACpB,QAAA,IAAI,CAAC,QAAK,CAAC;AAKX,2BAA2B;AAC3B,oEAAoE;AACpE,QAAA,IAAI,CAAC,QAAK,CAAC;AAEX,kDAAkD;AAClD,QAAA,IAAI,CAAC,QAA0B,CAAC;AAGhC,QAAA,IAAI,EAAE,QAEA,CAAC;AAEP,eAAe;AACf,QAAA,IAAI,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aW4gLmQudHMgZmlsZSovCnggPSBteVZhcmlhYmxlOwoKLyoqIHRyaXBsZSBzbGFzaCBjb21tZW50MSovCi8qKiBqc2RvY3N0eWxlIGNvbW1lbnQgLSBvbmx5IHRoaXMgY29tbWVudCBzaG91bGQgYmUgaW4gLmQudHMgZmlsZSovCnZhciBuID0gMzA7CgovKiogdmFyIGRlY2thcmF0aW9uIHdpdGggY29tbWVudCBvbiB0eXBlIGFzIHdlbGwqLwp2YXIgeSA9IC8qKiB2YWx1ZSBjb21tZW50ICovIDIwOwoKLy8vIHZhciBkZWNrYXJhdGlvbiB3aXRoIGNvbW1lbnQgb24gdHlwZSBhcyB3ZWxsCnZhciB5eSA9CiAgICAvLy8gdmFsdWUgY29tbWVudAogICAgMjA7CgovKiogY29tbWVudDIgKi8KdmFyIHogPSAvKiogbGFtYmRhIGNvbW1lbnQgKi8gKHg6IG51bWJlciwgeTogbnVtYmVyKTogbnVtYmVyID0+IHggKyB5OwoKdmFyIHoyOiAvKiogdHlwZSBjb21tZW50Ki8gKHg6IG51bWJlcikgPT4gc3RyaW5nOwoKdmFyIHgyOiAoeDogbnVtYmVyKSA9PiBzdHJpbmcgPSB6MjsKCnZhciBuNDogKHg6IG51bWJlcikgPT4gc3RyaW5nOwpuNCA9IHoyOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts new file mode 100644 index 0000000000000..ff4358d957377 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts @@ -0,0 +1,220 @@ +//// [tests/cases/compiler/computedEnumTypeWidening.ts] //// + +//// [computedEnumTypeWidening.ts] +declare function computed(x: number): number; + +enum E { + A = computed(0), + B = computed(1), + C = computed(2), + D = computed(3), +} + +function f1(): void { + const c1 = E.B; // Fresh E.B + let v1 = c1; // E + const c2 = c1; // Fresh E.B + let v2 = c2; // E + const c3: E.B = E.B; // E.B + let v3 = c3; // E.B + const c4: E.B = c1; // E.B + let v4 = c4; // E.B +} + +function f2(cond: boolean): void { + const c1 = cond ? E.A : E.B; // Fresh E.A | fresh E.B + const c2: E.A | E.B = c1; // E.A | E.B + const c3 = cond ? c1 : c2; // E.A | E.B + const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C + const c5: E.A | E.B | E.C = c4; // E.A | E.B | E.C + let v1 = c1; // E + let v2 = c2; // E.A | E.B + let v3 = c3; // E.A | E.B + let v4 = c4; // E + let v5 = c5; // E.A | E.B | E.C +} + +function f3(): void { + const c1 = E.B; + let v1 = c1; // E + const c2: E.B = E.B; + let v2 = c2; // E.B + const c3 = E.B as E.B; + let v3 = c3; // E.B + const c4 = E.B; + let v4 = c4; // E.B + const c5 = E.B as const; + let v5 = c5; // E.B +} + +declare enum E2 { A, B, C, D } + +function f4(): void { + const c1 = E2.B; // Fresh E2.B + let v1 = E.B; // E2 +} + +const c1: E.B = E.B; +const c2: E.B = E.B as const; +let v1: E = E.B; +let v2: E.B = E.B as const; + +class C { + p1: E = E.B; + p2: E.B = E.B as const; + readonly p3: E.B = E.B; + readonly p4: E.B = E.B as const; +} + +// Repro from #52531 + +enum MyEnum { A, B, C } + +let val1: MyEnum = MyEnum.A; +val1 = MyEnum.B; + +declare enum MyDeclaredEnum { A, B, C } + +let val2: MyDeclaredEnum = MyDeclaredEnum.A; +val2 = MyDeclaredEnum.B; + + +/// [Declarations] //// + + + +//// [computedEnumTypeWidening.d.ts] +declare function computed(x: number): number; +declare enum E { + A, + B, + C, + D +} +declare function f1(): void; +declare function f2(cond: boolean): void; +declare function f3(): void; +declare enum E2 { + A, + B, + C, + D +} +declare function f4(): void; +declare const c1: E.B; +declare const c2: E.B; +declare let v1: E; +declare let v2: E.B; +declare class C { + p1: E; + p2: E.B; + readonly p3: E.B; + readonly p4: E.B; +} +declare enum MyEnum { + A = 0, + B = 1, + C = 2 +} +declare let val1: MyEnum; +declare enum MyDeclaredEnum { + A, + B, + C +} +declare let val2: MyDeclaredEnum; +//# sourceMappingURL=computedEnumTypeWidening.d.ts.map +/// [Errors] //// + +computedEnumTypeWidening.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +computedEnumTypeWidening.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +computedEnumTypeWidening.ts(6,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +computedEnumTypeWidening.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + + +==== computedEnumTypeWidening.ts (4 errors) ==== + declare function computed(x: number): number; + + enum E { + A = computed(0), + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + B = computed(1), + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + C = computed(2), + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + D = computed(3), + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + } + + function f1(): void { + const c1 = E.B; // Fresh E.B + let v1 = c1; // E + const c2 = c1; // Fresh E.B + let v2 = c2; // E + const c3: E.B = E.B; // E.B + let v3 = c3; // E.B + const c4: E.B = c1; // E.B + let v4 = c4; // E.B + } + + function f2(cond: boolean): void { + const c1 = cond ? E.A : E.B; // Fresh E.A | fresh E.B + const c2: E.A | E.B = c1; // E.A | E.B + const c3 = cond ? c1 : c2; // E.A | E.B + const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C + const c5: E.A | E.B | E.C = c4; // E.A | E.B | E.C + let v1 = c1; // E + let v2 = c2; // E.A | E.B + let v3 = c3; // E.A | E.B + let v4 = c4; // E + let v5 = c5; // E.A | E.B | E.C + } + + function f3(): void { + const c1 = E.B; + let v1 = c1; // E + const c2: E.B = E.B; + let v2 = c2; // E.B + const c3 = E.B as E.B; + let v3 = c3; // E.B + const c4 = E.B; + let v4 = c4; // E.B + const c5 = E.B as const; + let v5 = c5; // E.B + } + + declare enum E2 { A, B, C, D } + + function f4(): void { + const c1 = E2.B; // Fresh E2.B + let v1 = E.B; // E2 + } + + const c1: E.B = E.B; + const c2: E.B = E.B as const; + let v1: E = E.B; + let v2: E.B = E.B as const; + + class C { + p1: E = E.B; + p2: E.B = E.B as const; + readonly p3: E.B = E.B; + readonly p4: E.B = E.B as const; + } + + // Repro from #52531 + + enum MyEnum { A, B, C } + + let val1: MyEnum = MyEnum.A; + val1 = MyEnum.B; + + declare enum MyDeclaredEnum { A, B, C } + + let val2: MyDeclaredEnum = MyDeclaredEnum.A; + val2 = MyDeclaredEnum.B; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertiesNarrowed.d.ts new file mode 100644 index 0000000000000..9ef02aa827f36 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertiesNarrowed.d.ts @@ -0,0 +1,111 @@ +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +//// [computedPropertiesNarrowed.ts] +const x: 0 | 1 = Math.random()? 0: 1; +declare function assert(n: number): asserts n is 1; +assert(x); +export let o: { + [x]: number; // error narrow type !== declared type +} = { + [x]: 1 // error narrow type !== declared type +} + + +const y: 0 = 0 +export let o2 = { + [y]: 1 // ok literal computed type +} + +// literals are ok +export let o3 = { [1]: 1 } +export let o31 = { [-1]: 1 } + +export let o32: { + [x: number]: number; +} = { [1-1]: 1 } // error number + +let u = Symbol(); +export let o4: { + [x: symbol]: number; +} = { + [u]: 1 // Should error, nut a unique symbol +} + +export let o5: { + [x: symbol]: number; +} ={ + [Symbol()]: 1 // Should error +} + +const uu: unique symbol = Symbol(); +export let o6 = { + [uu]: 1 // Should be ok +} + + +function foo (): 1 { return 1; } +export let o7: { + 1: number; // Should error +} = { + [foo()]: 1 // Should error +}; + +let E = { A: 1 } as const +export const o8 = { + [E.A]: 1 // Fresh +} + +function ns() { return { v: 0 } as const } +export const o9: { + 0: number; +} = { + [ns().v]: 1 +} + + +/// [Declarations] //// + + + +//// [computedPropertiesNarrowed.d.ts] +declare const x: 0 | 1; +export declare let o: { + [x]: number; +}; +declare const y: 0; +export declare let o2: { + [y]: number; +}; +export declare let o3: { + 1: number; +}; +export declare let o31: { + [-1]: number; +}; +export declare let o32: { + [x: number]: number; +}; +export declare let o4: { + [x: symbol]: number; +}; +export declare let o5: { + [x: symbol]: number; +}; +declare const uu: unique symbol; +export declare let o6: { + [uu]: number; +}; +export declare let o7: { + 1: number; +}; +declare let E: { + readonly A: 1; +}; +export declare const o8: { + [E.A]: number; +}; +export declare const o9: { + 0: number; +}; +export {}; +//# sourceMappingURL=computedPropertiesNarrowed.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/conditionalTypes1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/conditionalTypes1.d.ts.map new file mode 100644 index 0000000000000..ec9915c1cbaa4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/conditionalTypes1.d.ts.map @@ -0,0 +1,655 @@ +//// [tests/cases/conformance/types/conditional/conditionalTypes1.ts] //// + +//// [conditionalTypes1.ts] +type T00 = Exclude<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "b" | "d" +type T01 = Extract<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "a" | "c" + +type T02 = Exclude void), Function>; // string | number +type T03 = Extract void), Function>; // () => void + +type T04 = NonNullable; // string | number +type T05 = NonNullable<(() => string) | string[] | null | undefined>; // (() => string) | string[] + +function f1(x: T, y: NonNullable): void { + x = y; + y = x; // Error +} + +function f2(x: T, y: NonNullable): void { + x = y; + y = x; // Error + let s1: string = x; // Error + let s2: string = y; +} + +function f3(x: Partial[keyof T], y: NonNullable[keyof T]>): void { + x = y; + y = x; // Error +} + +function f4(x: T["x"], y: NonNullable): void { + x = y; + y = x; // Error + let s1: string = x; // Error + let s2: string = y; +} + +type Options = { k: "a", a: number } | { k: "b", b: string } | { k: "c", c: boolean }; + +type T10 = Exclude; // { k: "c", c: boolean } +type T11 = Extract; // { k: "a", a: number } | { k: "b", b: string } + +type T12 = Exclude; // { k: "c", c: boolean } +type T13 = Extract; // { k: "a", a: number } | { k: "b", b: string } + +type T14 = Exclude; // Options +type T15 = Extract; // never + +declare function f5(p: K): Extract; +let x0: { + k: "a"; + a: number; +} = f5("a"); // { k: "a", a: number } + +type OptionsOfKind = Extract; + +type T16 = OptionsOfKind<"a" | "b">; // { k: "a", a: number } | { k: "b", b: string } + +type Select = Extract; + +type T17 = Select; // // { k: "a", a: number } | { k: "b", b: string } + +type TypeName = + T extends string ? "string" : + T extends number ? "number" : + T extends boolean ? "boolean" : + T extends undefined ? "undefined" : + T extends Function ? "function" : + "object"; + +type T20 = TypeName void)>; // "string" | "function" +type T21 = TypeName; // "string" | "number" | "boolean" | "undefined" | "function" | "object" +type T22 = TypeName; // never +type T23 = TypeName<{}>; // "object" + +type KnockoutObservable = { object: T }; +type KnockoutObservableArray = { array: T }; + +type KnockedOut = T extends any[] ? KnockoutObservableArray : KnockoutObservable; + +type KnockedOutObj = { + [P in keyof T]: KnockedOut; +} + +interface Item { + id: number; + name: string; + subitems: string[]; +} + +type KOItem = KnockedOutObj; + +interface Part { + id: number; + name: string; + subparts: Part[]; + updatePart(newName: string): void; +} + +type FunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]; +type FunctionProperties = Pick>; + +type NonFunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T]; +type NonFunctionProperties = Pick>; + +type T30 = FunctionProperties; +type T31 = NonFunctionProperties; + +function f7(x: T, y: FunctionProperties, z: NonFunctionProperties): void { + x = y; // Error + x = z; // Error + y = x; + y = z; // Error + z = x; + z = y; // Error +} + +function f8(x: keyof T, y: FunctionPropertyNames, z: NonFunctionPropertyNames): void { + x = y; + x = z; + y = x; // Error + y = z; // Error + z = x; // Error + z = y; // Error +} + +type DeepReadonly = + T extends any[] ? DeepReadonlyArray : + T extends object ? DeepReadonlyObject : + T; + +interface DeepReadonlyArray extends ReadonlyArray> {} + +type DeepReadonlyObject = { + readonly [P in NonFunctionPropertyNames]: DeepReadonly; +}; + +function f10(part: DeepReadonly): void { + let name: string = part.name; + let id: number = part.subparts[0].id; + part.id = part.id; // Error + part.subparts[0] = part.subparts[0]; // Error + part.subparts[0].id = part.subparts[0].id; // Error + part.updatePart("hello"); // Error +} + +type ZeroOf = T extends number ? 0 : T extends string ? "" : false; + +function zeroOf(value: T): ZeroOf { + return >(typeof value === "number" ? 0 : typeof value === "string" ? "" : false); +} + +function f20(n: number, b: boolean, x: number | boolean, y: T): void { + zeroOf(5); // 0 + zeroOf("hello"); // "" + zeroOf(true); // false + zeroOf(n); // 0 + zeroOf(b); // False + zeroOf(x); // 0 | false + zeroOf(y); // ZeroOf +} + +function f21(x: T, y: ZeroOf): void { + let z1: number | string = y; + let z2: 0 | "" = y; + x = y; // Error + y = x; // Error +} + +type T35 = T[]; +type T36 = T extends { a: string } ? T extends { b: number } ? T35 : never : never; +type T37 = T extends { b: number } ? T extends { a: string } ? T35 : never : never; +type T38 = [T] extends [{ a: string }] ? [T] extends [{ b: number }] ? T35 : never : never; + +type Extends = T extends U ? true : false; +type If = C extends true ? T : F; +type Not = If; +type And = If; +type Or = If; + +type IsString = Extends; + +type Q1 = IsString; // false +type Q2 = IsString<"abc">; // true +type Q3 = IsString; // boolean +type Q4 = IsString; // never + +type N1 = Not; // true +type N2 = Not; // false +type N3 = Not; // boolean + +type A1 = And; // false +type A2 = And; // false +type A3 = And; // false +type A4 = And; // true +type A5 = And; // false +type A6 = And; // false +type A7 = And; // boolean +type A8 = And; // boolean +type A9 = And; // boolean + +type O1 = Or; // false +type O2 = Or; // true +type O3 = Or; // true +type O4 = Or; // true +type O5 = Or; // boolean +type O6 = Or; // boolean +type O7 = Or; // true +type O8 = Or; // true +type O9 = Or; // boolean + +type T40 = never extends never ? true : false; // true +type T41 = number extends never ? true : false; // false +type T42 = never extends number ? true : false; // true + +type IsNever = [T] extends [never] ? true : false; + +type T50 = IsNever; // true +type T51 = IsNever; // false +type T52 = IsNever; // false + +function f22(x: T extends (infer U)[] ? U[] : never): void { + let e = x[0]; // {} +} + +function f23(x: T extends (infer U)[] ? U[] : never): void { + let e = x[0]; // string +} + +// Repros from #21664 + +type Eq = T extends U ? U extends T ? true : false : false; +type T60 = Eq; // true +type T61 = Eq; // false +type T62 = Eq; // false +type T63 = Eq; // true + +type Eq1 = Eq extends false ? false : true; +type T70 = Eq1; // true +type T71 = Eq1; // false +type T72 = Eq1; // false +type T73 = Eq1; // true + +type Eq2 = Eq extends true ? true : false; +type T80 = Eq2; // true +type T81 = Eq2; // false +type T82 = Eq2; // false +type T83 = Eq2; // true + +// Repro from #21756 + +type Foo = T extends string ? boolean : number; +type Bar = T extends string ? boolean : number; +const convert = (value: Foo): Bar => value; + +type Baz = Foo; +const convert2 = (value: Foo): Baz => value; + +function f31(): void { + type T1 = T extends string ? boolean : number; + type T2 = T extends string ? boolean : number; + var x: T1; + var x: T2; +} + +function f32(): void { + type T1 = T & U extends string ? boolean : number; + type T2 = Foo; + var z: T1; + var z: T2; // Error, T2 is distributive, T1 isn't +} + +function f33(): void { + type T1 = Foo; + type T2 = Bar; + var z: T1; + var z: T2; +} + +// Repro from #21823 + +type T90 = T extends 0 ? 0 : () => 0; +type T91 = T extends 0 ? 0 : () => 0; +const f40 = (a: T90): T91 => a; +const f41 = (a: T91): T90 => a; + +type T92 = T extends () => 0 ? () => 1 : () => 2; +type T93 = T extends () => 0 ? () => 1 : () => 2; +const f42 = (a: T92): T93 => a; +const f43 = (a: T93): T92 => a; + +type T94 = T extends string ? true : 42; +type T95 = T extends string ? boolean : number; +const f44 = (value: T94): T95 => value; +const f45 = (value: T95): T94 => value; // Error + +// Repro from #21863 + +function f50(): void { + type Eq = T extends U ? U extends T ? true : false : false; + type If = S extends false ? U : T; + type Omit = { [P in keyof T]: If, never, P>; }[keyof T]; + type Omit2 = { [P in keyof T]: If, never, P>; }[keyof T]; + type A = Omit<{ a: void; b: never; }>; // 'a' + type B = Omit2<{ a: void; b: never; }>; // 'a' +} + +// Repro from #21862 + +type OldDiff = ( + & { [P in T]: P; } + & { [P in U]: never; } + & { [x: string]: never; } +)[T]; +type NewDiff = T extends U ? never : T; +interface A { + a: 'a'; +} +interface B1 extends A { + b: 'b'; + c: OldDiff; +} +interface B2 extends A { + b: 'b'; + c: NewDiff; +} +type c1 = B1['c']; // 'c' | 'b' +type c2 = B2['c']; // 'c' | 'b' + +// Repro from #21929 + +type NonFooKeys1 = OldDiff; +type NonFooKeys2 = Exclude; + +type Test1 = NonFooKeys1<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" +type Test2 = NonFooKeys2<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" + +// Repro from #21729 + +interface Foo2 { foo: string; } +interface Bar2 { bar: string; } +type FooBar = Foo2 | Bar2; +declare interface ExtractFooBar { } + +type Extracted = { + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; +} + +// Repro from #22985 + +type RecursivePartial = { + [P in keyof T]?: T[P] extends Array ? {[index: number]: RecursivePartial} : + T[P] extends object ? RecursivePartial : T[P]; +}; + +declare function assign(o: T, a: RecursivePartial): void; + +var a: { + o: number; + b: number; + c: { + a: number; + c: string; + }[]; +} = {o: 1, b: 2, c: [{a: 1, c: '213'}]} +assign(a, {o: 2, c: {0: {a: 2, c: '213123'}}}) + +// Repros from #23843 + +type Weird1 = ((a: U) => never) extends + ((a: U) => never) ? never : never; + +type Weird2 = ((a: U) => U) extends + ((a: U) => infer T) ? T : never; + + +/// [Declarations] //// + + + +//// [conditionalTypes1.d.ts] +type T00 = Exclude<"a" | "b" | "c" | "d", "a" | "c" | "f">; +type T01 = Extract<"a" | "b" | "c" | "d", "a" | "c" | "f">; +type T02 = Exclude void), Function>; +type T03 = Extract void), Function>; +type T04 = NonNullable; +type T05 = NonNullable<(() => string) | string[] | null | undefined>; +declare function f1(x: T, y: NonNullable): void; +declare function f2(x: T, y: NonNullable): void; +declare function f3(x: Partial[keyof T], y: NonNullable[keyof T]>): void; +declare function f4(x: T["x"], y: NonNullable): void; +type Options = { + k: "a"; + a: number; +} | { + k: "b"; + b: string; +} | { + k: "c"; + c: boolean; +}; +type T10 = Exclude; +type T11 = Extract; +type T12 = Exclude; +type T13 = Extract; +type T14 = Exclude; +type T15 = Extract; +declare function f5(p: K): Extract; +declare let x0: { + k: "a"; + a: number; +}; +type OptionsOfKind = Extract; +type T16 = OptionsOfKind<"a" | "b">; +type Select = Extract; +type T17 = Select; +type TypeName = T extends string ? "string" : T extends number ? "number" : T extends boolean ? "boolean" : T extends undefined ? "undefined" : T extends Function ? "function" : "object"; +type T20 = TypeName void)>; +type T21 = TypeName; +type T22 = TypeName; +type T23 = TypeName<{}>; +type KnockoutObservable = { + object: T; +}; +type KnockoutObservableArray = { + array: T; +}; +type KnockedOut = T extends any[] ? KnockoutObservableArray : KnockoutObservable; +type KnockedOutObj = { + [P in keyof T]: KnockedOut; +}; +interface Item { + id: number; + name: string; + subitems: string[]; +} +type KOItem = KnockedOutObj; +interface Part { + id: number; + name: string; + subparts: Part[]; + updatePart(newName: string): void; +} +type FunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? K : never; +}[keyof T]; +type FunctionProperties = Pick>; +type NonFunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? never : K; +}[keyof T]; +type NonFunctionProperties = Pick>; +type T30 = FunctionProperties; +type T31 = NonFunctionProperties; +declare function f7(x: T, y: FunctionProperties, z: NonFunctionProperties): void; +declare function f8(x: keyof T, y: FunctionPropertyNames, z: NonFunctionPropertyNames): void; +type DeepReadonly = T extends any[] ? DeepReadonlyArray : T extends object ? DeepReadonlyObject : T; +interface DeepReadonlyArray extends ReadonlyArray> { +} +type DeepReadonlyObject = { + readonly [P in NonFunctionPropertyNames]: DeepReadonly; +}; +declare function f10(part: DeepReadonly): void; +type ZeroOf = T extends number ? 0 : T extends string ? "" : false; +declare function zeroOf(value: T): ZeroOf; +declare function f20(n: number, b: boolean, x: number | boolean, y: T): void; +declare function f21(x: T, y: ZeroOf): void; +type T35 = T[]; +type T36 = T extends { + a: string; +} ? T extends { + b: number; +} ? T35 : never : never; +type T37 = T extends { + b: number; +} ? T extends { + a: string; +} ? T35 : never : never; +type T38 = [T] extends [{ + a: string; +}] ? [T] extends [{ + b: number; +}] ? T35 : never : never; +type Extends = T extends U ? true : false; +type If = C extends true ? T : F; +type Not = If; +type And = If; +type Or = If; +type IsString = Extends; +type Q1 = IsString; +type Q2 = IsString<"abc">; +type Q3 = IsString; +type Q4 = IsString; +type N1 = Not; +type N2 = Not; +type N3 = Not; +type A1 = And; +type A2 = And; +type A3 = And; +type A4 = And; +type A5 = And; +type A6 = And; +type A7 = And; +type A8 = And; +type A9 = And; +type O1 = Or; +type O2 = Or; +type O3 = Or; +type O4 = Or; +type O5 = Or; +type O6 = Or; +type O7 = Or; +type O8 = Or; +type O9 = Or; +type T40 = never extends never ? true : false; +type T41 = number extends never ? true : false; +type T42 = never extends number ? true : false; +type IsNever = [T] extends [never] ? true : false; +type T50 = IsNever; +type T51 = IsNever; +type T52 = IsNever; +declare function f22(x: T extends (infer U)[] ? U[] : never): void; +declare function f23(x: T extends (infer U)[] ? U[] : never): void; +type Eq = T extends U ? U extends T ? true : false : false; +type T60 = Eq; +type T61 = Eq; +type T62 = Eq; +type T63 = Eq; +type Eq1 = Eq extends false ? false : true; +type T70 = Eq1; +type T71 = Eq1; +type T72 = Eq1; +type T73 = Eq1; +type Eq2 = Eq extends true ? true : false; +type T80 = Eq2; +type T81 = Eq2; +type T82 = Eq2; +type T83 = Eq2; +type Foo = T extends string ? boolean : number; +type Bar = T extends string ? boolean : number; +declare const convert: (value: Foo) => Bar; +type Baz = Foo; +declare const convert2: (value: Foo) => Baz; +declare function f31(): void; +declare function f32(): void; +declare function f33(): void; +type T90 = T extends 0 ? 0 : () => 0; +type T91 = T extends 0 ? 0 : () => 0; +declare const f40: (a: T90) => T91; +declare const f41: (a: T91) => T90; +type T92 = T extends () => 0 ? () => 1 : () => 2; +type T93 = T extends () => 0 ? () => 1 : () => 2; +declare const f42: (a: T92) => T93; +declare const f43: (a: T93) => T92; +type T94 = T extends string ? true : 42; +type T95 = T extends string ? boolean : number; +declare const f44: (value: T94) => T95; +declare const f45: (value: T95) => T94; +declare function f50(): void; +type OldDiff = ({ + [P in T]: P; +} & { + [P in U]: never; +} & { + [x: string]: never; +})[T]; +type NewDiff = T extends U ? never : T; +interface A { + a: 'a'; +} +interface B1 extends A { + b: 'b'; + c: OldDiff; +} +interface B2 extends A { + b: 'b'; + c: NewDiff; +} +type c1 = B1['c']; +type c2 = B2['c']; +type NonFooKeys1 = OldDiff; +type NonFooKeys2 = Exclude; +type Test1 = NonFooKeys1<{ + foo: 1; + bar: 2; + baz: 3; +}>; +type Test2 = NonFooKeys2<{ + foo: 1; + bar: 2; + baz: 3; +}>; +interface Foo2 { + foo: string; +} +interface Bar2 { + bar: string; +} +type FooBar = Foo2 | Bar2; +declare interface ExtractFooBar { +} +type Extracted = { + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; +}; +type RecursivePartial = { + [P in keyof T]?: T[P] extends Array ? { + [index: number]: RecursivePartial; + } : T[P] extends object ? RecursivePartial : T[P]; +}; +declare function assign(o: T, a: RecursivePartial): void; +declare var a: { + o: number; + b: number; + c: { + a: number; + c: string; + }[]; +}; +type Weird1 = ((a: U) => never) extends ((a: U) => never) ? never : never; +type Weird2 = ((a: U) => U) extends ((a: U) => infer T) ? T : never; +//# sourceMappingURL=conditionalTypes1.d.ts.map + +/// [Declarations Maps] //// + + +//// [conditionalTypes1.d.ts.map] +{"version":3,"file":"conditionalTypes1.d.ts","sourceRoot":"","sources":["conditionalTypes1.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,G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iBVKSBleHRlbmRzIAogICAgKDxVIGV4dGVuZHMgdHJ1ZT4oYTogVSkgPT4gaW5mZXIgVCkgPyBUIDogbmV2ZXI7Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constAssertions.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constAssertions.d.ts.map new file mode 100644 index 0000000000000..f6c717df54ad9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constAssertions.d.ts.map @@ -0,0 +1,282 @@ +//// [tests/cases/conformance/expressions/typeAssertions/constAssertions.ts] //// + +//// [constAssertions.ts] +let v1 = 'abc' as const; +let v2 = `abc` as const; +let v3 = 10 as const; +let v4 = -10 as const; +let v5 = +10 as const; +let v6 = 10n as const; +let v7 = -10n as const; +let v8 = true as const; +let v9 = false as const; + +let c1 = 'abc' as const; +let c2 = `abc` as const; +let c3 = 10 as const; +let c4 = -10 as const; +let c5 = +10 as const; +let c6 = 10n as const; +let c7 = -10n as const; +let c8 = true as const; +let c9 = false as const; + +let vv1: "abc" = v1; +let vc1: "abc" = c1; + +let a1 = [] as const; +let a2 = [1, 2, 3] as const; +let a3 = [10, 'hello', true] as const; +let a4: readonly [1, 2, 3] = [...[1, 2, 3]] as const; +let a5: number[] = [1, 2, 3]; +let a6: readonly number[] = [...a5] as const; +let a7: number[] = [...a6]; +let a8: readonly ["abc", ...number[]] = ['abc', ...a7] as const; +let a9: (number | "abc")[] = [...a8]; + +declare let d: { [x: string]: string }; + +let o1 = { x: 10, y: 20 } as const; +let o2: { + readonly [x: string]: 1 | 2 | 3 | (() => void) | 4; + readonly a: 1; + readonly b: 2; + readonly c: 3; + readonly d: () => void; +} = { a: 1, 'b': 2, ['c']: 3, d(): void {}, ['e' + '']: 4 } as const; +let o3: { + readonly a: 1; + readonly b: 2; + readonly c: 3; + readonly d: () => void; + readonly x: 10; + readonly y: 20; +} = { ...o1, ...o2 } as const; +let o4 = { a: 1, b: 2 }; +let o5: { + readonly a: number; + readonly b: number; +} = { ...o4 } as const; +let o6: { + a: number; + b: number; +} = { ...o5 }; +let o7: { + readonly [x: string]: string; +} = { ...d } as const; +let o8: { + [x: string]: string; +} = { ...o7 }; +let o9 = { x: 10, foo(): void { this.x = 20 } } as const; // Error + +let p1 = (10) as const; +let p2 = ((-10)) as const; +let p3 = ([(10)]) as const; +let p4 = [[[[10]]]] as const; + +let x1 = { x: 10, y: [20, 30], z: { a: { b: 42 } } } as const; + +let q1 = 10; +let q2 = 'abc'; +let q3 = true; +let q4 = [1, 2, 3]; +let q5 = { x: 10, y: 20 }; + +declare function id(x: T): T; + +let e1: "abc" = v1 as const; // Error +let e2: 0 | 1 = (true ? 1 : 0) as const; // Error +let e3: 1 = id(1) as const; // Error + +let t1 = 'foo' as const; +let t2 = 'bar' as const; +let t3: "foo-bar" = `${t1}-${t2}` as const; +let t4: "(foo)-(bar)" = `${`(${t1})`}-${`(${t2})`}` as const; + +function ff1(x: 'foo' | 'bar', y: 1 | 2): "foo-1" | "foo-2" | "bar-1" | "bar-2" { + return `${x}-${y}` as const; +} + +function ff2(x: T, y: U): `${T}-${U}` { + return `${x}-${y}` as const; +} + +const ts1: "foo-bar" = ff2('foo', 'bar'); +const ts2: "foo-1" | "foo-0" = ff2('foo', !!true ? '0' : '1'); +const ts3: "top-left" | "top-right" | "bottom-left" | "bottom-right" = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); + +function ff3(x: 'foo' | 'bar', y: object): `foo${string}` | `bar${string}` { + return `${x}${y}` as const; +} + +type Action = "verify" | "write"; +type ContentMatch = "match" | "nonMatch"; +type Outcome = `${Action}_${ContentMatch}`; + +function ff4(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" { + const action : Action = verify ? `verify` : `write`; + const contentMatch: ContentMatch = contentMatches ? `match` : `nonMatch`; + const outcome: Outcome = `${action}_${contentMatch}` as const; + return outcome; +} + +function ff5(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" { + const action = verify ? `verify` : `write`; + const contentMatch = contentMatches ? `match` : `nonMatch`; + const outcome = `${action}_${contentMatch}` as const; + return outcome; +} + +function accessorNames(propName: S): readonly [`get-${S}`, `set-${S}`] { + return [`get-${propName}`, `set-${propName}`] as const; +} + +const ns1: readonly ["get-foo", "set-foo"] = accessorNames('foo'); + +// repro from https://github.com/microsoft/TypeScript/issues/54374 +interface Foo54374 { + a: 1; + b: 2; +} + +const fooConst54374: Foo54374 = { + a: 1, + b: 3 +} as const + + +/// [Declarations] //// + + + +//// [constAssertions.d.ts] +declare let v1: "abc"; +declare let v2: "abc"; +declare let v3: 10; +declare let v4: -10; +declare let v5: 10; +declare let v6: 10n; +declare let v7: -10n; +declare let v8: true; +declare let v9: false; +declare let c1: "abc"; +declare let c2: "abc"; +declare let c3: 10; +declare let c4: -10; +declare let c5: 10; +declare let c6: 10n; +declare let c7: -10n; +declare let c8: true; +declare let c9: false; +declare let vv1: "abc"; +declare let vc1: "abc"; +declare let a1: readonly []; +declare let a2: readonly [1, 2, 3]; +declare let a3: readonly [10, "hello", true]; +declare let a4: readonly [1, 2, 3]; +declare let a5: number[]; +declare let a6: readonly number[]; +declare let a7: number[]; +declare let a8: readonly ["abc", ...number[]]; +declare let a9: (number | "abc")[]; +declare let d: { + [x: string]: string; +}; +declare let o1: { + readonly x: 10; + readonly y: 20; +}; +declare let o2: { + readonly [x: string]: 1 | 2 | 3 | (() => void) | 4; + readonly a: 1; + readonly b: 2; + readonly c: 3; + readonly d: () => void; +}; +declare let o3: { + readonly a: 1; + readonly b: 2; + readonly c: 3; + readonly d: () => void; + readonly x: 10; + readonly y: 20; +}; +declare let o4: { + a: number; + b: number; +}; +declare let o5: { + readonly a: number; + readonly b: number; +}; +declare let o6: { + a: number; + b: number; +}; +declare let o7: { + readonly [x: string]: string; +}; +declare let o8: { + [x: string]: string; +}; +declare let o9: { + readonly x: 10; + readonly foo: () => void; +}; +declare let p1: 10; +declare let p2: -10; +declare let p3: readonly [10]; +declare let p4: readonly [readonly [readonly [readonly [10]]]]; +declare let x1: { + readonly x: 10; + readonly y: readonly [20, 30]; + readonly z: { + readonly a: { + readonly b: 42; + }; + }; +}; +declare let q1: 10; +declare let q2: "abc"; +declare let q3: true; +declare let q4: readonly [1, 2, 3]; +declare let q5: { + readonly x: 10; + readonly y: 20; +}; +declare function id(x: T): T; +declare let e1: "abc"; +declare let e2: 0 | 1; +declare let e3: 1; +declare let t1: "foo"; +declare let t2: "bar"; +declare let t3: "foo-bar"; +declare let t4: "(foo)-(bar)"; +declare function ff1(x: 'foo' | 'bar', y: 1 | 2): "foo-1" | "foo-2" | "bar-1" | "bar-2"; +declare function ff2(x: T, y: U): `${T}-${U}`; +declare const ts1: "foo-bar"; +declare const ts2: "foo-1" | "foo-0"; +declare const ts3: "top-left" | "top-right" | "bottom-left" | "bottom-right"; +declare function ff3(x: 'foo' | 'bar', y: object): `foo${string}` | `bar${string}`; +type Action = "verify" | "write"; +type ContentMatch = "match" | "nonMatch"; +type Outcome = `${Action}_${ContentMatch}`; +declare function ff4(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch"; +declare function ff5(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch"; +declare function accessorNames(propName: S): readonly [`get-${S}`, `set-${S}`]; +declare const ns1: readonly ["get-foo", "set-foo"]; +interface Foo54374 { + a: 1; + b: 2; +} +declare const fooConst54374: Foo54374; +//# sourceMappingURL=constAssertions.d.ts.map + +/// [Declarations Maps] //// + + +//// [constAssertions.d.ts.map] +{"version":3,"file":"constAssertions.d.ts","sourceRoot":"","sources":["constAssertions.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,IAAc,CAAC;AACrB,QAAA,IAAI,EAAE,EAAG,CAAC,EAAW,C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V9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts new file mode 100644 index 0000000000000..6543e534016b9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/constEnums/constEnum2.ts] //// + +//// [constEnum2.ts] +// An enum declaration that specifies a const modifier is a constant enum declaration. +// In a constant enum declaration, all members must have constant values and +// it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression. + +// Error : not a constant enum expression + +const CONST: number = 9000 % 2; +const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), + f = d - (100 * Math.floor(Math.random() % 8)), + g = CONST, +} + +/// [Declarations] //// + + + +//// [constEnum2.d.ts] +declare const CONST: number; +declare const enum D { + d = 10, + e, + f, + g +} +//# sourceMappingURL=constEnum2.d.ts.map +/// [Errors] //// + +constEnum2.ts(10,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. +constEnum2.ts(11,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. +constEnum2.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +constEnum2.ts(12,9): error TS2474: const enum member initializers must be constant expressions. + + +==== constEnum2.ts (6 errors) ==== + // An enum declaration that specifies a const modifier is a constant enum declaration. + // In a constant enum declaration, all members must have constant values and + // it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression. + + // Error : not a constant enum expression + + const CONST: number = 9000 % 2; + const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + f = d - (100 * Math.floor(Math.random() % 8)), + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + g = CONST, + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map new file mode 100644 index 0000000000000..d559e1a5107f5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx] //// + +//// [contextuallyTypedStringLiteralsInJsxAttributes01.tsx] +namespace JSX { + export interface IntrinsicElements { + span: {}; + } + export interface Element { + something?: any; + } +} + +const FooComponent = (props: { foo: "A" | "B" | "C" }): JSX.Element => {props.foo}; + +; +; + +; +; + +/// [Declarations] //// + + + +//// [contextuallyTypedStringLiteralsInJsxAttributes01.d.ts] +declare namespace JSX { + interface IntrinsicElements { + span: {}; + } + interface Element { + something?: any; + } +} +declare const FooComponent: (props: { + foo: "A" | "B" | "C"; +}) => JSX.Element; +//# sourceMappingURL=contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map + +/// [Declarations Maps] //// + + +//// [contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map] +{"version":3,"file":"contextuallyTypedStringLiteralsInJsxAttributes01.d.ts","sourceRoot":"","sources":["contextuallyTypedStringLiteralsInJsxAttributes01.tsx"],"names":[],"mappings":"AAAA,kBAAU,GAAG,CAAC;IACV,UAAiB,iBAAiB;QAC9B,IAAI,EAAE,EAAE,CAAC;KACZ;IACD,UAAiB,OAAO;QAC1B,SAAS,CAAC,EAAE,GAAG,CAAC;KACb;CACJ;AAED,QAAA,MAAM,YAAY,GAAI,KAAK,EAAE;IAAE,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;CAAE,KAAG,GAAG,CAAC,OAAmC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsNCiAgICBpbnRlcmZhY2UgSW50cmluc2ljRWxlbWVudHMgew0KICAgICAgICBzcGFuOiB7fTsNCiAgICB9DQogICAgaW50ZXJmYWNlIEVsZW1lbnQgew0KICAgICAgICBzb21ldGhpbmc/OiBhbnk7DQogICAgfQ0KfQ0KZGVjbGFyZSBjb25zdCBGb29Db21wb25lbnQ6IChwcm9wczogew0KICAgIGZvbzogIkEiIHwgIkIiIHwgIkMiOw0KfSkgPT4gSlNYLkVsZW1lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1jb250ZXh0dWFsbHlUeXBlZFN0cmluZ0xpdGVyYWxzSW5Kc3hBdHRyaWJ1dGVzMDEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbGx5VHlwZWRTdHJpbmdMaXRlcmFsc0luSnN4QXR0cmlidXRlczAxLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjb250ZXh0dWFsbHlUeXBlZFN0cmluZ0xpdGVyYWxzSW5Kc3hBdHRyaWJ1dGVzMDEudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFVLEdBQUcsQ0FBQztJQUNWLFVBQWlCLGlCQUFpQjtRQUM5QixJQUFJLEVBQUUsRUFBRSxDQUFDO0tBQ1o7SUFDRCxVQUFpQixPQUFPO1FBQzFCLFNBQVMsQ0FBQyxFQUFFLEdBQUcsQ0FBQztLQUNiO0NBQ0o7QUFFRCxRQUFBLE1BQU0sWUFBWSxHQUFJLEtBQUssRUFBRTtJQUFFLEdBQUcsRUFBRSxHQUFHLEdBQUcsR0FBRyxHQUFHLEdBQUcsQ0FBQTtDQUFFLEtBQUcsR0FBRyxDQUFDLE9BQW1DLENBQUMifQ==,bmFtZXNwYWNlIEpTWCB7CiAgICBleHBvcnQgaW50ZXJmYWNlIEludHJpbnNpY0VsZW1lbnRzIHsKICAgICAgICBzcGFuOiB7fTsKICAgIH0KICAgIGV4cG9ydCBpbnRlcmZhY2UgRWxlbWVudCB7CgkJc29tZXRoaW5nPzogYW55OwogICAgfQp9Cgpjb25zdCBGb29Db21wb25lbnQgPSAocHJvcHM6IHsgZm9vOiAiQSIgfCAiQiIgfCAiQyIgfSk6IEpTWC5FbGVtZW50ID0+IDxzcGFuPntwcm9wcy5mb299PC9zcGFuPjsKCjxGb29Db21wb25lbnQgZm9vPXsiQSJ9IC8+Owo8Rm9vQ29tcG9uZW50IGZvbz0iQSIgICAvPjsKCjxGb29Db21wb25lbnQgZm9vPXsiZiJ9IC8+Owo8Rm9vQ29tcG9uZW50IGZvbz0iZiIgICAvPjs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/correlatedUnions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/correlatedUnions.d.ts new file mode 100644 index 0000000000000..0c14e01b8f235 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/correlatedUnions.d.ts @@ -0,0 +1,503 @@ +//// [tests/cases/compiler/correlatedUnions.ts] //// + +//// [correlatedUnions.ts] +// Various repros from #30581 + +type RecordMap = { n: number, s: string, b: boolean }; +type UnionRecord = { [P in K]: { + kind: P, + v: RecordMap[P], + f: (v: RecordMap[P]) => void +}}[K]; + +function processRecord(rec: UnionRecord): void { + rec.f(rec.v); +} + +declare const r1: UnionRecord<'n'>; // { kind: 'n', v: number, f: (v: number) => void } +declare const r2: UnionRecord; // { kind: 'n', ... } | { kind: 's', ... } | { kind: 'b', ... } + +processRecord(r1); +processRecord(r2); +processRecord({ kind: 'n', v: 42, f: v => v.toExponential() }); + +// -------- + +type TextFieldData = { value: string } +type SelectFieldData = { options: string[], selectedValue: string } + +type FieldMap = { + text: TextFieldData; + select: SelectFieldData; +} + +type FormField = { type: K, data: FieldMap[K] }; + +type RenderFunc = (props: FieldMap[K]) => void; +type RenderFuncMap = { [K in keyof FieldMap]: RenderFunc }; + +function renderTextField(props: TextFieldData): void {} +function renderSelectField(props: SelectFieldData): void {} + +const renderFuncs: RenderFuncMap = { + text: renderTextField, + select: renderSelectField, +}; + +function renderField(field: FormField): void { + const renderFn = renderFuncs[field.type]; + renderFn(field.data); +} + +// -------- + +type TypeMap = { + foo: string, + bar: number +}; + +type Keys = keyof TypeMap; + +type HandlerMap = { [P in Keys]: (x: TypeMap[P]) => void }; + +const handlers: HandlerMap = { + foo: s => s.length, + bar: n => n.toFixed(2) +}; + +type DataEntry = { [P in K]: { + type: P, + data: TypeMap[P] +}}[K]; + +const data: DataEntry[] = [ + { type: 'foo', data: 'abc' }, + { type: 'foo', data: 'def' }, + { type: 'bar', data: 42 }, +]; + +function process(data: DataEntry[]): void { + data.forEach(block => { + if (block.type in handlers) { + handlers[block.type](block.data) + } + }); +} + +process(data); +process([{ type: 'foo', data: 'abc' }]); + +// -------- + +type LetterMap = { A: string, B: number } +type LetterCaller = { [P in K]: { letter: Record, caller: (x: Record) => void } }[K]; + +function call({ letter, caller }: LetterCaller): void { + caller(letter); +} + +type A = { A: string }; +type B = { B: number }; +type ACaller = (a: A) => void; +type BCaller = (b: B) => void; + +declare const xx: { letter: A, caller: ACaller } | { letter: B, caller: BCaller }; + +call(xx); + +// -------- + +type Ev = { [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; +}}[K]; + +function processEvents(events: Ev[]): void { + for (const event of events) { + document.addEventListener(event.name, (ev) => event.callback(ev), { once: event.once }); + } +} + +function createEventListener({ name, once = false, callback }: Ev): Ev { + return { name, once, callback }; +} + +const clickEvent: { + readonly name: "click"; + readonly once?: boolean | undefined; + readonly callback: (ev: MouseEvent) => void; +} = createEventListener({ + name: "click", + callback: ev => console.log(ev), +}); + +const scrollEvent: { + readonly name: "scroll"; + readonly once?: boolean | undefined; + readonly callback: (ev: Event) => void; +} = createEventListener({ + name: "scroll", + callback: ev => console.log(ev), +}); + +processEvents([clickEvent, scrollEvent]); + +processEvents([ + { name: "click", callback: ev => console.log(ev) }, + { name: "scroll", callback: ev => console.log(ev) }, +]); + +// -------- + +function ff1(): void { + type ArgMap = { + sum: [a: number, b: number], + concat: [a: string, b: string, c: string] + } + type Keys = keyof ArgMap; + const funs: { [P in Keys]: (...args: ArgMap[P]) => void } = { + sum: (a, b) => a + b, + concat: (a, b, c) => a + b + c + } + function apply(funKey: K, ...args: ArgMap[K]) { + const fn = funs[funKey]; + fn(...args); + } + const x1 = apply('sum', 1, 2) + const x2 = apply('concat', 'str1', 'str2', 'str3' ) +} + +// Repro from #47368 + +type ArgMap = { a: number, b: string }; +type Func = (x: ArgMap[K]) => void; +type Funcs = { [K in keyof ArgMap]: Func }; + +function f1(funcs: Funcs, key: K, arg: ArgMap[K]): void { + funcs[key](arg); +} + +function f2(funcs: Funcs, key: K, arg: ArgMap[K]): void { + const func = funcs[key]; // Type Funcs[K] + func(arg); +} + +function f3(funcs: Funcs, key: K, arg: ArgMap[K]): void { + const func: Func = funcs[key]; + func(arg); +} + +function f4(x: Funcs[keyof ArgMap], y: Funcs[K]): void { + x = y; +} + +// Repro from #47890 + +interface MyObj { + someKey: { + name: string; + } + someOtherKey: { + name: number; + } +} + +const ref: MyObj = { + someKey: { name: "" }, + someOtherKey: { name: 42 } +}; + +function func(k: K): MyObj[K]['name'] | undefined { + const myObj: Partial[K] = ref[k]; + if (myObj) { + return myObj.name; + } + const myObj2: Partial[keyof MyObj] = ref[k]; + if (myObj2) { + return myObj2.name; + } + return undefined; +} + +// Repro from #48157 + +interface Foo { + bar?: string +} + +function foo(prop: T, f: Required): void { + bar(f[prop]); +} + +declare function bar(t: string): void; + +// Repro from #48246 + +declare function makeCompleteLookupMapping, Attr extends keyof T[number]>( + ops: T, attr: Attr): { [Item in T[number]as Item[Attr]]: Item }; + +const ALL_BARS = [{ name: 'a'}, {name: 'b'}] as const; + +const BAR_LOOKUP: { + a: { + readonly name: "a"; + }; + b: { + readonly name: "b"; + }; +} = makeCompleteLookupMapping(ALL_BARS, 'name'); + +type BarLookup = typeof BAR_LOOKUP; + +type Baz = { [K in keyof BarLookup]: BarLookup[K]['name'] }; + +// repro from #43982 + +interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; +} +type KeyOfOriginal = keyof Original; +type NestedKeyOfOriginalFor = keyof Original[T]; + +type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; +}; + +type MappedFromOriginal = SameKeys; + +const getStringAndNumberFromOriginalAndMapped = < + K extends KeyOfOriginal, + N extends NestedKeyOfOriginalFor +>( + original: Original, + mappedFromOriginal: MappedFromOriginal, + key: K, + nestedKey: N +): [Original[K][N], MappedFromOriginal[K][N]] => { + return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]]; +}; + +// repro from #31675 +interface Config { + string: string; + number: number; +} + +function getConfigOrDefault( + userConfig: Partial, + key: T, + defaultValue: Config[T] +): Config[T] { + const userValue = userConfig[key]; + const assertedCheck = userValue ? userValue! : defaultValue; + return assertedCheck; +} + +// repro from #47523 + +type Foo1 = { + x: number; + y: string; +}; + +function getValueConcrete( + o: Partial, + k: K +): Foo1[K] | undefined { + return o[k]; +} + + +/// [Declarations] //// + + + +//// [correlatedUnions.d.ts] +type RecordMap = { + n: number; + s: string; + b: boolean; +}; +type UnionRecord = { + [P in K]: { + kind: P; + v: RecordMap[P]; + f: (v: RecordMap[P]) => void; + }; +}[K]; +declare function processRecord(rec: UnionRecord): void; +declare const r1: UnionRecord<'n'>; +declare const r2: UnionRecord; +type TextFieldData = { + value: string; +}; +type SelectFieldData = { + options: string[]; + selectedValue: string; +}; +type FieldMap = { + text: TextFieldData; + select: SelectFieldData; +}; +type FormField = { + type: K; + data: FieldMap[K]; +}; +type RenderFunc = (props: FieldMap[K]) => void; +type RenderFuncMap = { + [K in keyof FieldMap]: RenderFunc; +}; +declare function renderTextField(props: TextFieldData): void; +declare function renderSelectField(props: SelectFieldData): void; +declare const renderFuncs: RenderFuncMap; +declare function renderField(field: FormField): void; +type TypeMap = { + foo: string; + bar: number; +}; +type Keys = keyof TypeMap; +type HandlerMap = { + [P in Keys]: (x: TypeMap[P]) => void; +}; +declare const handlers: HandlerMap; +type DataEntry = { + [P in K]: { + type: P; + data: TypeMap[P]; + }; +}[K]; +declare const data: DataEntry[]; +declare function process(data: DataEntry[]): void; +type LetterMap = { + A: string; + B: number; +}; +type LetterCaller = { + [P in K]: { + letter: Record; + caller: (x: Record) => void; + }; +}[K]; +declare function call({ letter, caller }: LetterCaller): void; +type A = { + A: string; +}; +type B = { + B: number; +}; +type ACaller = (a: A) => void; +type BCaller = (b: B) => void; +declare const xx: { + letter: A; + caller: ACaller; +} | { + letter: B; + caller: BCaller; +}; +type Ev = { + [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; + }; +}[K]; +declare function processEvents(events: Ev[]): void; +declare function createEventListener({ name, once, callback }: Ev): Ev; +declare const clickEvent: { + readonly name: "click"; + readonly once?: boolean | undefined; + readonly callback: (ev: MouseEvent) => void; +}; +declare const scrollEvent: { + readonly name: "scroll"; + readonly once?: boolean | undefined; + readonly callback: (ev: Event) => void; +}; +declare function ff1(): void; +type ArgMap = { + a: number; + b: string; +}; +type Func = (x: ArgMap[K]) => void; +type Funcs = { + [K in keyof ArgMap]: Func; +}; +declare function f1(funcs: Funcs, key: K, arg: ArgMap[K]): void; +declare function f2(funcs: Funcs, key: K, arg: ArgMap[K]): void; +declare function f3(funcs: Funcs, key: K, arg: ArgMap[K]): void; +declare function f4(x: Funcs[keyof ArgMap], y: Funcs[K]): void; +interface MyObj { + someKey: { + name: string; + }; + someOtherKey: { + name: number; + }; +} +declare const ref: MyObj; +declare function func(k: K): MyObj[K]['name'] | undefined; +interface Foo { + bar?: string; +} +declare function foo(prop: T, f: Required): void; +declare function bar(t: string): void; +declare function makeCompleteLookupMapping, Attr extends keyof T[number]>(ops: T, attr: Attr): { + [Item in T[number] as Item[Attr]]: Item; +}; +declare const ALL_BARS: readonly [{ + readonly name: "a"; +}, { + readonly name: "b"; +}]; +declare const BAR_LOOKUP: { + a: { + readonly name: "a"; + }; + b: { + readonly name: "b"; + }; +}; +type BarLookup = typeof BAR_LOOKUP; +type Baz = { + [K in keyof BarLookup]: BarLookup[K]['name']; +}; +interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; +} +type KeyOfOriginal = keyof Original; +type NestedKeyOfOriginalFor = keyof Original[T]; +type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; +}; +type MappedFromOriginal = SameKeys; +declare const getStringAndNumberFromOriginalAndMapped: >(original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]; +interface Config { + string: string; + number: number; +} +declare function getConfigOrDefault(userConfig: Partial, key: T, defaultValue: Config[T]): Config[T]; +type Foo1 = { + x: number; + y: string; +}; +declare function getValueConcrete(o: Partial, k: K): Foo1[K] | undefined; +//# sourceMappingURL=correlatedUnions.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEmitDeclarationOnly.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEmitDeclarationOnly.d.ts.map new file mode 100644 index 0000000000000..7f11a63cbc24e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEmitDeclarationOnly.d.ts.map @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/declFileEmitDeclarationOnly.ts] //// + +//// [helloworld.ts] +const Log = { + info(msg: string): void {} +} + +class HelloWorld { + constructor(private name: string) { + } + + public hello(): void { + Log.info(`Hello ${this.name}`); + } +} + + +/// [Declarations] //// + + + +//// [helloworld.d.ts] +declare const Log: { + info(msg: string): void; +}; +declare class HelloWorld { + private name; + constructor(name: string); + hello(): void; +} +//# sourceMappingURL=helloworld.d.ts.map + +/// [Declarations Maps] //// + + +//// [helloworld.d.ts.map] +{"version":3,"file":"helloworld.d.ts","sourceRoot":"","sources":["helloworld.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;SACF,GAAG,EAAE,MAAM,GAAG,IAAI;CACxB,CAAA;AAED,cAAM,UAAU;IACF,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,MAAM;IAGzB,KAAK,IAAI,IAAI;CAGrB"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBMb2c6IHsNCiAgICBpbmZvKG1zZzogc3RyaW5nKTogdm9pZDsNCn07DQpkZWNsYXJlIGNsYXNzIEhlbGxvV29ybGQgew0KICAgIHByaXZhdGUgbmFtZTsNCiAgICBjb25zdHJ1Y3RvcihuYW1lOiBzdHJpbmcpOw0KICAgIGhlbGxvKCk6IHZvaWQ7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1oZWxsb3dvcmxkLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsbG93b3JsZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaGVsbG93b3JsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLE1BQU0sR0FBRztTQUNGLEdBQUcsRUFBRSxNQUFNLEdBQUcsSUFBSTtDQUN4QixDQUFBO0FBRUQsY0FBTSxVQUFVO0lBQ0YsT0FBTyxDQUFDLElBQUk7Z0JBQUosSUFBSSxFQUFFLE1BQU07SUFHekIsS0FBSyxJQUFJLElBQUk7Q0FHckIifQ==,Y29uc3QgTG9nID0gewogIGluZm8obXNnOiBzdHJpbmcpOiB2b2lkIHt9Cn0KCmNsYXNzIEhlbGxvV29ybGQgewogIGNvbnN0cnVjdG9yKHByaXZhdGUgbmFtZTogc3RyaW5nKSB7CiAgfQoKICBwdWJsaWMgaGVsbG8oKTogdm9pZCB7CiAgICBMb2cuaW5mbyhgSGVsbG8gJHt0aGlzLm5hbWV9YCk7CiAgfQp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts new file mode 100644 index 0000000000000..e365d9985eb52 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -0,0 +1,116 @@ +//// [tests/cases/compiler/declFileEnums.ts] //// + +//// [declFileEnums.ts] +enum e1 { + a, + b, + c +} + +enum e2 { + a = 10, + b = a + 2, + c = 10, +} + +enum e3 { + a = 10, + b = Math.PI, + c = a + 3 +} + +enum e4 { + a, + b, + c, + d = 10, + e +} + +enum e5 { + "Friday", + "Saturday", + "Sunday", + "Weekend days" +} + + + + +/// [Declarations] //// + + + +//// [declFileEnums.d.ts] +declare enum e1 { + a = 0, + b = 1, + c = 2 +} +declare enum e2 { + a = 10, + b = 12, + c = 10 +} +declare enum e3 { + a = 10, + b, + c = 13 +} +declare enum e4 { + a = 0, + b = 1, + c = 2, + d = 10, + e = 11 +} +declare enum e5 { + "Friday" = 0, + "Saturday" = 1, + "Sunday" = 2, + "Weekend days" = 3 +} +//# sourceMappingURL=declFileEnums.d.ts.map +/// [Errors] //// + +declFileEnums.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + + +==== declFileEnums.ts (1 errors) ==== + enum e1 { + a, + b, + c + } + + enum e2 { + a = 10, + b = a + 2, + c = 10, + } + + enum e3 { + a = 10, + b = Math.PI, + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + c = a + 3 + } + + enum e4 { + a, + b, + c, + d = 10, + e + } + + enum e5 { + "Friday", + "Saturday", + "Sunday", + "Weekend days" + } + + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitAliasExportStar.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitAliasExportStar.d.ts.map new file mode 100644 index 0000000000000..9837502c96925 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitAliasExportStar.d.ts.map @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/declarationEmitAliasExportStar.ts] //// + +//// [thingB.ts] +export interface ThingB { } +//// [things.ts] +export * from "./thingB"; +//// [index.ts] +import * as things from "./things"; +export const thing2 = (param: things.ThingB): any => null; + + +/// [Declarations] //// + + + +//// [index.d.ts] +import * as things from "./things"; +export declare const thing2: (param: things.ThingB) => any; +//# sourceMappingURL=index.d.ts.map +//// [thingB.d.ts] +export interface ThingB { +} +//# sourceMappingURL=thingB.d.ts.map +//// [things.d.ts] +export * from "./thingB"; +//# sourceMappingURL=things.d.ts.map + +/// [Declarations Maps] //// + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,eAAO,MAAM,MAAM,GAAI,KAAK,EAAE,MAAM,CAAC,MAAM,KAAG,GAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IHRoaW5nMjogKHBhcmFtOiB0aGluZ3MuVGhpbmdCKSA9PiBhbnk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE1BQU0sVUFBVSxDQUFDO0FBQ25DLGVBQU8sTUFBTSxNQUFNLEdBQUksS0FBSyxFQUFFLE1BQU0sQ0FBQyxNQUFNLEtBQUcsR0FBVyxDQUFDIn0=,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsKZXhwb3J0IGNvbnN0IHRoaW5nMiA9IChwYXJhbTogdGhpbmdzLlRoaW5nQik6IGFueSA9PiBudWxsOwo= + + +//// [thingB.d.ts.map] +{"version":3,"file":"thingB.d.ts","sourceRoot":"","sources":["thingB.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;CAAI"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBUaGluZ0Igew0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGhpbmdCLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhpbmdCLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0aGluZ0IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxXQUFXLE1BQU07Q0FBSSJ9,ZXhwb3J0IGludGVyZmFjZSBUaGluZ0IgeyB9 + + +//// [things.d.ts.map] +{"version":3,"file":"things.d.ts","sourceRoot":"","sources":["things.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0ICogZnJvbSAiLi90aGluZ0IiOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGhpbmdzLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhpbmdzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0aGluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxVQUFVLENBQUMifQ==,ZXhwb3J0ICogZnJvbSAiLi90aGluZ0IiOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts.map new file mode 100644 index 0000000000000..aa1961863352b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// + +//// [declarationEmitBindingPatternWithReservedWord.ts] +type LocaleData = Record +type ConvertLocaleConfig = Record< + string, + T +>; +type LocaleConfig = Record>; + +export interface GetLocalesOptions { + app: unknown; + default: ConvertLocaleConfig; + config?: LocaleConfig | undefined; + name?: string; +} + +export const getLocales = ({ + app, + name, + default: defaultLocalesConfig, + config: userLocalesConfig = {}, +}: GetLocalesOptions): ConvertLocaleConfig => { + return defaultLocalesConfig; +}; + + +/// [Declarations] //// + + + +//// [declarationEmitBindingPatternWithReservedWord.d.ts] +type LocaleData = Record; +type ConvertLocaleConfig = Record; +type LocaleConfig = Record>; +export interface GetLocalesOptions { + app: unknown; + default: ConvertLocaleConfig; + config?: LocaleConfig | undefined; + name?: string; +} +export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig; +export {}; +//# sourceMappingURL=declarationEmitBindingPatternWithReservedWord.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitBindingPatternWithReservedWord.d.ts.map] +{"version":3,"file":"declarationEmitBindingPatternWithReservedWord.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatternWithReservedWord.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AACvC,KAAK,mBAAmB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,MAAM,CAClE,MAAM,EACN,CAAC,CACF,CAAC;AACF,KAAK,YAAY,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAElF,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,UAAU;IACnD,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,UAAU,EAAE,EAC7C,GAAG,EACH,IAAI,EACJ,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,iBAAsB,GACjC,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAG,mBAAmB,CAAC,CAAC,CAE9C,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBMb2NhbGVEYXRhID0gUmVjb3JkPHN0cmluZywgbmV2ZXI+Ow0KdHlwZSBDb252ZXJ0TG9jYWxlQ29uZmlnPFQgZXh0ZW5kcyBMb2NhbGVEYXRhID0gTG9jYWxlRGF0YT4gPSBSZWNvc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hY2UgR2V0TG9jYWxlc09wdGlvbnM8VCBleHRlbmRzIExvY2FsZURhdGE+IHsKICAgIGFwcDogdW5rbm93bjsKICAgIGRlZmF1bHQ6IENvbnZlcnRMb2NhbGVDb25maWc8VD47CiAgICBjb25maWc/OiBMb2NhbGVDb25maWc8VD4gfCB1bmRlZmluZWQ7CiAgICBuYW1lPzogc3RyaW5nOwp9CgpleHBvcnQgY29uc3QgZ2V0TG9jYWxlcyA9IDxUIGV4dGVuZHMgTG9jYWxlRGF0YT4oewogICAgYXBwLAogICAgbmFtZSwKICAgIGRlZmF1bHQ6IGRlZmF1bHRMb2NhbGVzQ29uZmlnLAogICAgY29uZmlnOiB1c2VyTG9jYWxlc0NvbmZpZyA9IHt9LAp9OiBHZXRMb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts.map new file mode 100644 index 0000000000000..c24d01ca7fa99 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts.map @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// + +//// [declarationEmitBindingPatterns.ts] +const k = ({x: z = 'y'}: { + x?: string; + }): void => { } + +var a: any; +function f({}: any = a, []: any = a, { p: {} = a}: any = a): void { +} + +/// [Declarations] //// + + + +//// [declarationEmitBindingPatterns.d.ts] +declare const k: ({ x: z }: { + x?: string; +}) => void; +declare var a: any; +declare function f({}?: any, []?: any, { p: {} }?: any): void; +//# sourceMappingURL=declarationEmitBindingPatterns.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitBindingPatterns.d.ts.map] +{"version":3,"file":"declarationEmitBindingPatterns.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatterns.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAI,EAAC,CAAC,EAAE,CAAO,EAAC,EAAE;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;CACd,KAAG,IAAW,CAAA;AAEnB,QAAA,IAAI,CAAC,EAAE,GAAG,CAAC;AACX,iBAAS,CAAC,CAAC,EAAE,GAAE,GAAO,EAAE,EAAE,GAAE,GAAO,EAAE,EAAE,CAAC,EAAE,EAAM,EAAC,GAAE,GAAO,GAAG,IAAI,CAChE"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBrOiAoeyB4OiB6IH06IHsNCiAgICB4Pzogc3RyaW5nOw0KfSkgPT4gdm9pZDsNCmRlY2xhcmUgdmFyIGE6IGFueTsNCmRlY2xhcmUgZnVuY3Rpb24gZih7fT86IGFueSwgW10/OiBhbnksIHsgcDoge30gfT86IGFueSk6IHZvaWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0QmluZGluZ1BhdHRlcm5zLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsR0FBSSxFQUFDLENBQUMsRUFBRSxDQUFPLEVBQUMsRUFBRTtJQUNqQixDQUFDLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDZCxLQUFHLElBQVcsQ0FBQTtBQUVuQixRQUFBLElBQUksQ0FBQyxFQUFFLEdBQUcsQ0FBQztBQUNYLGlCQUFTLENBQUMsQ0FBQyxFQUFFLEdBQUUsR0FBTyxFQUFFLEVBQUUsR0FBRSxHQUFPLEVBQUUsRUFBRSxDQUFDLEVBQUUsRUFBTSxFQUFDLEdBQUUsR0FBTyxHQUFHLElBQUksQ0FDaEUifQ==,Y29uc3QgayA9ICh7eDogeiA9ICd5J306IHsKICAgICAgICB4Pzogc3RyaW5nOwogICAgfSk6IHZvaWQgPT4geyB9Cgp2YXIgYTogYW55OwpmdW5jdGlvbiBmKHt9OiBhbnkgPSBhLCBbXTogYW55ID0gYSwgeyBwOiB7fSA9IGF9OiBhbnkgPSBhKTogdm9pZCB7Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternsFunctionExpr.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternsFunctionExpr.d.ts.map new file mode 100644 index 0000000000000..03c4a462d5d06 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternsFunctionExpr.d.ts.map @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/declarationEmitBindingPatternsFunctionExpr.ts] //// + +//// [declarationEmitBindingPatternsFunctionExpr.ts] +type Named = { name: string } +// Tempting to remove alias if unused +let notReferenced = ({ name: alias }: Named): void => { } + +// Resons we can't remove aliases that are not used in the function signature: + +// 1.Causes duplicate identifier if we remove alias +const duplicateIndetifiers = ({ name: alias, name: alias2 }: Named): void => { } +const duplicateIndetifiers2 = (name: string, { name: alias }: Named): void => { } +const duplicateIndetifiers3 = ({ name: alias }: Named, { name: alias2 }: Named): void => { } + +let value = ""; +// 2.Can change in meaning for typeof value if we remove alias +const shadowedVariable = ({ value: alias }: { value: string }): typeof value => value; + +/// [Declarations] //// + + + +//// [declarationEmitBindingPatternsFunctionExpr.d.ts] +type Named = { + name: string; +}; +declare let notReferenced: ({ name: alias }: Named) => void; +declare const duplicateIndetifiers: ({ name: alias, name: alias2 }: Named) => void; +declare const duplicateIndetifiers2: (name: string, { name: alias }: Named) => void; +declare const duplicateIndetifiers3: ({ name: alias }: Named, { name: alias2 }: Named) => void; +declare let value: string; +declare const shadowedVariable: ({ value: alias }: { + value: string; +}) => typeof value; +//# sourceMappingURL=declarationEmitBindingPatternsFunctionExpr.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitBindingPatternsFunctionExpr.d.ts.map] +{"version":3,"file":"declarationEmitBindingPatternsFunctionExpr.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatternsFunctionExpr.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7B,QAAA,IAAI,aAAa,GAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,KAAG,IAAW,CAAA;AAKzD,QAAA,MAAM,oBAAoB,GAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,KAAG,IAAW,CAAA;AAChF,QAAA,MAAM,qBAAqB,GAAI,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,KAAG,IAAW,CAAA;AACjF,QAAA,MAAM,qBAAqB,GAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,KAAG,IAAW,CAAA;AAE5F,QAAA,IAAI,KAAK,QAAK,CAAC;AAEf,QAAA,MAAM,gBAAgB,GAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,KAAG,OAAO,KAAc,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBOYW1lZCA9IHsNCiAgICBuYW1lOiBzdHJpbmc7DQp9Ow0KZGVjbGFyZSBsZXQgbm90UmVmZXJlbmNlZDogKHsgbmFtZTogYWxpYXMgfTogTmFtZWQpID0+IHZvaWQ7DQpkZWNsYXJlIGNvbnN0IGR1cGxpY2F0ZUluZGV0aWZpZXJzOiAoeyBuYW1lOi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WQgPT4geyB9CmNvbnN0IGR1cGxpY2F0ZUluZGV0aWZpZXJzMyA9ICh7IG5hbWU6IGFsaWFzIH06IE5hbWVkLCB7IG5hbWU6IGFsaWFzMiB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CgpsZXQgdmFsdWUgPSAiIjsKLy8gMi5DYW4gY2hhbmdlIGluIG1lYW5pbmcgZm9yIHR5cGVvZiB2YWx1ZSBpZiB3ZSByZW1vdmUgYWxpYXMKY29uc3Qgc2hhZG93ZWRWYXJpYWJsZSA9ICh7IHZhbHVlOiBhbGlhcyB9OiB7IHZhbHVlOiBzdHJpbmcgfSk6IHR5cGVvZiB2YWx1ZSA9PiB2YWx1ZTs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBundleWithAmbientReferences.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBundleWithAmbientReferences.d.ts new file mode 100644 index 0000000000000..d13697ad6bb74 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBundleWithAmbientReferences.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts] //// + +//// [lib.d.ts] +declare module "lib/result" { + export type Result = (E & Failure) | (T & Success); + export interface Failure { } + export interface Success { } +} + +//// [datastore_result.ts] +import { Result } from "lib/result"; + +export type T = Result; + +//// [conditional_directive_field.ts] +import * as DatastoreResult from "src/datastore_result"; + +export const build = (): DatastoreResult.T => { + return null; +}; + + +/// [Declarations] //// + + + +//// [src/conditional_directive_field.d.ts] +import * as DatastoreResult from "src/datastore_result"; +export declare const build: () => DatastoreResult.T; +//# sourceMappingURL=conditional_directive_field.d.ts.map +//// [src/datastore_result.d.ts] +import { Result } from "lib/result"; +export type T = Result; +//# sourceMappingURL=datastore_result.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts new file mode 100644 index 0000000000000..d286a593f1753 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -0,0 +1,69 @@ +//// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// + +//// [index.d.ts] +export interface NestedProps {} +//// [index.d.ts] +export interface OtherIndexProps {} +//// [other.d.ts] +export interface OtherProps {} +//// [index.d.ts] +import { OtherProps } from "./other"; +import { OtherIndexProps } from "./other/index"; +import { NestedProps } from "nested"; +export interface SomeProps {} + +export function foo(): [SomeProps, OtherProps, OtherIndexProps, NestedProps]; +//// [index.d.ts] +export interface RootProps {} + +export function bar(): RootProps; +//// [entry.ts] +import { foo } from "foo"; +import { RootProps, bar } from "root"; +export const x = foo(); +export const y: RootProps = bar(); + + +/// [Declarations] //// + + + +//// [r/entry.d.ts] +import { RootProps } from "root"; +export declare const x: invalid; +export declare const y: RootProps; +//# sourceMappingURL=entry.d.ts.map +/// [Errors] //// + +r/entry.ts(3,14): error TS2742: The inferred type of 'x' cannot be named without a reference to 'foo/node_modules/nested'. This is likely not portable. A type annotation is necessary. +r/entry.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== + export interface NestedProps {} +==== r/node_modules/foo/other/index.d.ts (0 errors) ==== + export interface OtherIndexProps {} +==== r/node_modules/foo/other.d.ts (0 errors) ==== + export interface OtherProps {} +==== r/node_modules/foo/index.d.ts (0 errors) ==== + import { OtherProps } from "./other"; + import { OtherIndexProps } from "./other/index"; + import { NestedProps } from "nested"; + export interface SomeProps {} + + export function foo(): [SomeProps, OtherProps, OtherIndexProps, NestedProps]; +==== node_modules/root/index.d.ts (0 errors) ==== + export interface RootProps {} + + export function bar(): RootProps; +==== r/entry.ts (2 errors) ==== + import { foo } from "foo"; + import { RootProps, bar } from "root"; + export const x = foo(); + ~ +!!! error TS2742: The inferred type of 'x' cannot be named without a reference to 'foo/node_modules/nested'. This is likely not portable. A type annotation is necessary. + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 r/entry.ts:3:14: Add a type annotation to the variable x. + export const y: RootProps = bar(); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameCausesImportToBePainted.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameCausesImportToBePainted.d.ts.map new file mode 100644 index 0000000000000..685b0ea31ed85 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameCausesImportToBePainted.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts] //// + +//// [context.ts] +export const Key: unique symbol = Symbol(); +export interface Context { + [Key]: string; +} +//// [index.ts] +import { Key, Context } from "./context"; + +export const context: Context = { + [Key]: 'bar', +} + +export const withContext = ({ [Key]: value }: Context): string => value; + +/// [Declarations] //// + + + +//// [context.d.ts] +export declare const Key: unique symbol; +export interface Context { + [Key]: string; +} +//# sourceMappingURL=context.d.ts.map +//// [index.d.ts] +import { Key, Context } from "./context"; +export declare const context: Context; +export declare const withContext: ({ [Key]: value }: Context) => string; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [context.d.ts.map] +{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["context.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,EAAE,OAAO,MAAiB,CAAC;AAC3C,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACf"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgS2V5OiB1bmlxdWUgc3ltYm9sOw0KZXhwb3J0IGludGVyZmFjZSBDb250ZXh0IHsNCiAgICBbS2V5XTogc3RyaW5nOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y29udGV4dC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29udGV4dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sR0FBRyxFQUFFLE9BQU8sTUFBaUIsQ0FBQztBQUMzQyxNQUFNLFdBQVcsT0FBTztJQUN0QixDQUFDLEdBQUcsQ0FBQyxFQUFFLE1BQU0sQ0FBQztDQUNmIn0=,ZXhwb3J0IGNvbnN0IEtleTogdW5pcXVlIHN5bWJvbCA9IFN5bWJvbCgpOwpleHBvcnQgaW50ZXJmYWNlIENvbnRleHQgewogIFtLZXldOiBzdHJpbmc7Cn0= + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,OAErB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,KAAG,MAAe,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgS2V5LCBDb250ZXh0IH0gZnJvbSAiLi9jb250ZXh0IjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGNvbnRleHQ6IENvbnRleHQ7DQpleHBvcnQgZGVjbGFyZSBjb25zdCB3aXRoQ29udGV4dDogKHsgW0tleV06IHZhbHVlIH06IENvbnRleHQpID0+IHN0cmluZzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxHQUFHLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBRXpDLGVBQU8sTUFBTSxPQUFPLEVBQUUsT0FFckIsQ0FBQTtBQUVELGVBQU8sTUFBTSxXQUFXLEdBQUksRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLEtBQUssRUFBRSxFQUFFLE9BQU8sS0FBRyxNQUFlLENBQUMifQ==,aW1wb3J0IHsgS2V5LCBDb250ZXh0IH0gZnJvbSAiLi9jb250ZXh0IjsKCmV4cG9ydCBjb25zdCBjb250ZXh0OiBDb250ZXh0ID0gewogIFtLZXldOiAnYmFyJywKfQoKZXhwb3J0IGNvbnN0IHdpdGhDb250ZXh0ID0gKHsgW0tleV06IHZhbHVlIH06IENvbnRleHQpOiBzdHJpbmcgPT4gdmFsdWU7 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameConstEnumAlias.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameConstEnumAlias.d.ts new file mode 100644 index 0000000000000..ed8d1dd1eb1c4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameConstEnumAlias.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationEmitComputedNameConstEnumAlias.ts] //// + +//// [EnumExample.ts] +enum EnumExample { + TEST = 'TEST', +} + +export default EnumExample; + +//// [index.ts] +import EnumExample from './EnumExample'; + +export default { + [EnumExample.TEST]: {}, +}; + +/// [Declarations] //// + + + +//// [EnumExample.d.ts] +declare enum EnumExample { + TEST = "TEST" +} +export default EnumExample; +//# sourceMappingURL=EnumExample.d.ts.map +//// [index.d.ts] +import EnumExample from './EnumExample'; +declare const _default: { + [EnumExample.TEST]: {}; +}; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts new file mode 100644 index 0000000000000..1a5587a493da4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts] //// + +//// [component.d.ts] +declare module '@namespace/component' { + export class Foo {} +} +//// [index.d.ts] +import { Foo } from "@namespace/component"; +export declare const item: typeof Foo; +//// [index.ts] +import { Foo } from "@namespace/component"; +import { item } from "../somepackage"; +export const reeexported: Foo = item; + + +/// [Declarations] //// + + + +//// [packages/secondpackage/index.d.ts] +import { Foo } from "@namespace/component"; +export declare const reeexported: Foo; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts new file mode 100644 index 0000000000000..2b3e7719dfcad --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -0,0 +1,108 @@ +//// [tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts] //// + +//// [foo.ts] +export class Foo {} + +//// [index1.ts] +import {Foo} from './foo'; +export default function Example(): void {} +Example.Foo = Foo + +//// [index2.ts] +import {Foo} from './foo'; +export {Foo}; +export default function Example(): void {} +Example.Foo = Foo + +//// [index3.ts] +export class Bar {} +export default function Example(): void {} + +Example.Bar = Bar + +//// [index4.ts] +function A() { } + +function B() { } + +export function C(): any { + return null; +} + +C.A = A; +C.B = B; + +/// [Declarations] //// + + + +//// [foo.d.ts] +export declare class Foo { +} +//# sourceMappingURL=foo.d.ts.map +//// [index1.d.ts] +export default function Example(): void; +//# sourceMappingURL=index1.d.ts.map +//// [index2.d.ts] +import { Foo } from './foo'; +export { Foo }; +export default function Example(): void; +//# sourceMappingURL=index2.d.ts.map +//// [index3.d.ts] +export declare class Bar { +} +export default function Example(): void; +//# sourceMappingURL=index3.d.ts.map +//// [index4.d.ts] +export declare function C(): any; +//# sourceMappingURL=index4.d.ts.map +/// [Errors] //// + +index1.ts(3,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +index2.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +index3.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +index4.ts(9,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +index4.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== foo.ts (0 errors) ==== + export class Foo {} + +==== index1.ts (1 errors) ==== + import {Foo} from './foo'; + export default function Example(): void {} + Example.Foo = Foo + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + +==== index2.ts (1 errors) ==== + import {Foo} from './foo'; + export {Foo}; + export default function Example(): void {} + Example.Foo = Foo + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + +==== index3.ts (1 errors) ==== + export class Bar {} + export default function Example(): void {} + + Example.Bar = Bar + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + +==== index4.ts (2 errors) ==== + function A() { } + + function B() { } + + export function C(): any { + return null; + } + + C.A = A; + ~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + C.B = B; + ~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts new file mode 100644 index 0000000000000..8abaa81efb566 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts @@ -0,0 +1,80 @@ +//// [tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts] //// + +//// [declarationEmitDestructuringParameterProperties.ts] +class C1 { + constructor(public [x, y, z]: string[]) { + } +} + +type TupleType1 =[string, number, boolean]; +class C2 { + constructor(public [x, y, z]: TupleType1) { + } +} + +type ObjType1 = { x: number; y: string; z: boolean } +class C3 { + constructor(public { x, y, z }: ObjType1) { + } +} + +/// [Declarations] //// + + + +//// [declarationEmitDestructuringParameterProperties.d.ts] +declare class C1 { + x: invalid; + y: invalid; + z: invalid; + constructor([x, y, z]: string[]); +} +type TupleType1 = [string, number, boolean]; +declare class C2 { + x: invalid; + y: invalid; + z: invalid; + constructor([x, y, z]: TupleType1); +} +type ObjType1 = { + x: number; + y: string; + z: boolean; +}; +declare class C3 { + x: invalid; + y: invalid; + z: invalid; + constructor({ x, y, z }: ObjType1); +} +//# sourceMappingURL=declarationEmitDestructuringParameterProperties.d.ts.map +/// [Errors] //// + +declarationEmitDestructuringParameterProperties.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. +declarationEmitDestructuringParameterProperties.ts(8,17): error TS1187: A parameter property may not be declared using a binding pattern. +declarationEmitDestructuringParameterProperties.ts(14,17): error TS1187: A parameter property may not be declared using a binding pattern. + + +==== declarationEmitDestructuringParameterProperties.ts (3 errors) ==== + class C1 { + constructor(public [x, y, z]: string[]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + } + } + + type TupleType1 =[string, number, boolean]; + class C2 { + constructor(public [x, y, z]: TupleType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + } + } + + type ObjType1 = { x: number; y: string; z: boolean } + class C3 { + constructor(public { x, y, z }: ObjType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDistributiveConditionalWithInfer.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDistributiveConditionalWithInfer.d.ts.map new file mode 100644 index 0000000000000..2a771e2cdbadc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDistributiveConditionalWithInfer.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts] //// + +//// [declarationEmitDistributiveConditionalWithInfer.ts] +// This function's type is changed on declaration +export const fun = ( + subFun: () + => FlatArray[]): void => { }; + + +/// [Declarations] //// + + + +//// [declarationEmitDistributiveConditionalWithInfer.d.ts] +export declare const fun: (subFun: () => FlatArray[]) => void; +//# sourceMappingURL=declarationEmitDistributiveConditionalWithInfer.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDistributiveConditionalWithInfer.d.ts.map] +{"version":3,"file":"declarationEmitDistributiveConditionalWithInfer.d.ts","sourceRoot":"","sources":["declarationEmitDistributiveConditionalWithInfer.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,GAAG,GACZ,MAAM,EAAE,CAAC,UAAU,EAAE,KAAK,SAAS,MAAM,UAAU,OAC5C,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,KAAG,IAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZnVuOiAoc3ViRnVuOiA8Q29sbGVjdGlvbiwgRmllbGQgZXh0ZW5kcyBrZXlvZiBDb2xsZWN0aW9uPigpID0+IEZsYXRBcnJheTxDb2xsZWN0aW9uW0ZpZWxkXSwgMD5bXSkgPT4gdm9pZDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdERpc3RyaWJ1dGl2ZUNvbmRpdGlvbmFsV2l0aEluZmVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0RGlzdHJpYnV0aXZlQ29uZGl0aW9uYWxXaXRoSW5mZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdERpc3RyaWJ1dGl2ZUNvbmRpdGlvbmFsV2l0aEluZmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLGVBQU8sTUFBTSxHQUFHLEdBQ1osTUFBTSxFQUFFLENBQUMsVUFBVSxFQUFFLEtBQUssU0FBUyxNQUFNLFVBQVUsT0FDNUMsU0FBUyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBRSxLQUFHLElBQVcsQ0FBQyJ9,Ly8gVGhpcyBmdW5jdGlvbidzIHR5cGUgaXMgY2hhbmdlZCBvbiBkZWNsYXJhdGlvbgpleHBvcnQgY29uc3QgZnVuID0gKAogICAgc3ViRnVuOiA8Q29sbGVjdGlvbiwgRmllbGQgZXh0ZW5kcyBrZXlvZiBDb2xsZWN0aW9uPigpCiAgICAgICAgPT4gRmxhdEFycmF5PENvbGxlY3Rpb25bRmllbGRdLCAwPltdKTogdm9pZCA9PiB7IH07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts.map new file mode 100644 index 0000000000000..a096219b7bbc0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts.map @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// + +//// [declarationEmitDuplicateParameterDestructuring.ts] +export const fn1 = ({ prop: a, prop: b }: { prop: number }): number => a + b; + +export const fn2 = ({ prop: a }: { prop: number }, { prop: b }: { prop: number }): number => a + b; + + +/// [Declarations] //// + + + +//// [declarationEmitDuplicateParameterDestructuring.d.ts] +export declare const fn1: ({ prop: a, prop: b }: { + prop: number; +}) => number; +export declare const fn2: ({ prop: a }: { + prop: number; +}, { prop: b }: { + prop: number; +}) => number; +//# sourceMappingURL=declarationEmitDuplicateParameterDestructuring.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDuplicateParameterDestructuring.d.ts.map] +{"version":3,"file":"declarationEmitDuplicateParameterDestructuring.d.ts","sourceRoot":"","sources":["declarationEmitDuplicateParameterDestructuring.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAAe,CAAC;AAE7E,eAAO,MAAM,GAAG,GAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAAe,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm4xOiAoeyBwcm9wOiBhLCBwcm9wOiBiIH06IHsNCi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wcm9wOiBhIH06IHsgcHJvcDogbnVtYmVyIH0sIHsgcHJvcDogYiB9OiB7IHByb3A6IG51bWJlciB9KTogbnVtYmVyID0+IGEgKyBiOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts new file mode 100644 index 0000000000000..3b0ad7920b781 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts] //// + +//// [a.ts] +interface I {} +export function f(): I { return null as I; } +//// [b.ts] +import {f} from "./a"; + +export function q(): void {} +q.val = f(); + + +/// [Declarations] //// + + + +//// [a.d.ts] +interface I { +} +export declare function f(): I; +export {}; +//# sourceMappingURL=a.d.ts.map +//// [b.d.ts] +export declare function q(): void; +//# sourceMappingURL=b.d.ts.map +/// [Errors] //// + +b.ts(4,1): error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. +b.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== a.ts (0 errors) ==== + interface I {} + export function f(): I { return null as I; } +==== b.ts (2 errors) ==== + import {f} from "./a"; + + export function q(): void {} + q.val = f(); + ~~~~~ +!!! error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. + ~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoWithGenericConstraint.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoWithGenericConstraint.d.ts.map new file mode 100644 index 0000000000000..9f0faeb02e630 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoWithGenericConstraint.d.ts.map @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts] //// + +//// [declarationEmitExpandoWithGenericConstraint.ts] +export interface Point { + readonly x: number; + readonly y: number; +} + +export interface Rect

{ + readonly a: p; + readonly b: p; +} + +export const Point: { + (x: number, y: number): Point; + zero(): Point; +} = (x: number, y: number): Point => ({ x, y }); +export const Rect =

(a: p, b: p): Rect

=> ({ a, b }); + +Point.zero = (): Point => Point(0, 0); + +/// [Declarations] //// + + + +//// [declarationEmitExpandoWithGenericConstraint.d.ts] +export interface Point { + readonly x: number; + readonly y: number; +} +export interface Rect

{ + readonly a: p; + readonly b: p; +} +export declare const Point: { + (x: number, y: number): Point; + zero(): Point; +}; +export declare const Rect:

(a: p, b: p) => Rect

{ + public props: Readonly

; + constructor(props: P) { + this.props = Object.freeze(props); + } +} + +interface Foo { + foo: string; +} + +declare function merge(obj1: T, obj2: U): T & U; + +class AnotherSampleClass extends SampleClass { + constructor(props: T) { + const foo: Foo = { foo: "bar" }; + super(merge(props, foo)); + } + + public brokenMethod(): void { + this.props.foo.concat; + } +} +new AnotherSampleClass({}); + +// Positive repro from #17166 +function f3>(t: T, k: K, tk: T[K]): void { + for (let key in t) { + key = k // ok, K ==> keyof T + t[key] = tk; // ok, T[K] ==> T[keyof T] + } +} + +// # 21185 +type Predicates = { + [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] +} + +// Repros from #23592 + +type Example = { [K in keyof T]: T[K]["prop"] }; +type Result = Example<{ a: { prop: string }; b: { prop: number } }>; + +type Helper2 = { [K in keyof T]: Extract }; +type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; +type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; + +// Repro from #23618 + +type DBBoolTable = { [k in K]: 0 | 1 } +enum Flag { + FLAG_1 = "flag_1", + FLAG_2 = "flag_2" +} + +type SimpleDBRecord = { staticField: number } & DBBoolTable +function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]): SimpleDBRecord[Flag] { + return record[flags[0]]; +} + +type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable +function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]): DynamicDBRecord[Flag] { + return record[flags[0]]; +} + +// Repro from #21368 + +interface I { + foo: string; +} + +declare function take(p: T): void; + +function fn(o: T, k: K): void { + take<{} | null | undefined>(o[k]); + take(o[k]); +} + +// Repro from #23133 + +class Unbounded { + foo(x: T[keyof T]): void { + let y: {} | undefined | null = x; + } +} + +// Repro from #23940 + +interface I7 { + x: any; +} +type Foo7 = T; +declare function f7(type: K): Foo7; + +// Repro from #21770 + +type Dict = { [key in T]: number }; +type DictDict = { [key in V]: Dict }; + +function ff1(dd: DictDict, k1: V, k2: T): number { + return dd[k1][k2]; +} + +function ff2(dd: DictDict, k1: V, k2: T): number { + const d: Dict = dd[k1]; + return d[k2]; +} + +// Repro from #26409 + +const cf1 = (t: T, k: K): void => +{ + const s: string = t[k]; + t.cool; +}; + +const cf2 = (t: T, k: K): void => +{ + const s: string = t[k]; + t.cool; +}; + + +/// [Declarations] //// + + + +//// [keyofAndIndexedAccess.d.ts] +declare class Shape { + name: string; + width: number; + height: number; + visible: boolean; +} +declare class TaggedShape extends Shape { + tag: string; +} +declare class Item { + name: string; + price: number; +} +declare class Options { + visible: "yes" | "no"; +} +type Dictionary = { + [x: string]: T; +}; +type NumericallyIndexed = { + [x: number]: T; +}; +declare const enum E { + A = 0, + B = 1, + C = 2 +} +type K00 = keyof any; +type K01 = keyof string; +type K02 = keyof number; +type K03 = keyof boolean; +type K04 = keyof void; +type K05 = keyof undefined; +type K06 = keyof null; +type K07 = keyof never; +type K08 = keyof unknown; +type K10 = keyof Shape; +type K11 = keyof Shape[]; +type K12 = keyof Dictionary; +type K13 = keyof {}; +type K14 = keyof Object; +type K15 = keyof E; +type K16 = keyof [string, number]; +type K17 = keyof (Shape | Item); +type K18 = keyof (Shape & Item); +type K19 = keyof NumericallyIndexed; +type KeyOf = keyof T; +type K20 = KeyOf; +type K21 = KeyOf>; +type NAME = "name"; +type WIDTH_OR_HEIGHT = "width" | "height"; +type Q10 = Shape["name"]; +type Q11 = Shape["width" | "height"]; +type Q12 = Shape["name" | "visible"]; +type Q20 = Shape[NAME]; +type Q21 = Shape[WIDTH_OR_HEIGHT]; +type Q30 = [string, number][0]; +type Q31 = [string, number][1]; +type Q32 = [string, number][number]; +type Q33 = [string, number][E.A]; +type Q34 = [string, number][E.B]; +type Q35 = [string, number]["0"]; +type Q36 = [string, number]["1"]; +type Q40 = (Shape | Options)["visible"]; +type Q41 = (Shape & Options)["visible"]; +type Q50 = Dictionary["howdy"]; +type Q51 = Dictionary[123]; +type Q52 = Dictionary[E.B]; +declare let cond: boolean; +declare function getProperty(obj: T, key: K): T[K]; +declare function setProperty(obj: T, key: K, value: T[K]): void; +declare function f10(shape: Shape): void; +declare function f11(a: Shape[]): void; +declare function f12(t: [Shape, boolean]): void; +declare function f13(foo: any, bar: any): void; +declare class Component { + props: PropType; + getProperty(key: K): PropType[K]; + setProperty(key: K, value: PropType[K]): void; +} +declare function f20(component: Component): void; +declare function pluck(array: T[], key: K): T[K][]; +declare function f30(shapes: Shape[]): void; +declare function f31(key: K): Shape[K]; +declare function f32(key: K): Shape[K]; +declare function f33(shape: S, key: K): S[K]; +declare function f34(ts: TaggedShape): void; +declare class C { + x: string; + protected y: string; + private z; +} +declare function f40(c: C): void; +declare function f50(k: keyof T, s: string): void; +declare function f51(k: K, s: string): void; +declare function f52(obj: { + [x: string]: boolean; +}, k: Exclude, s: string, n: number): void; +declare function f53>(obj: { + [x: string]: boolean; +}, k: K, s: string, n: number): void; +declare function f54(obj: T, key: keyof T): void; +declare function f55(obj: T, key: K): void; +declare function f60(source: T, target: T): void; +declare function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void): void; +declare function f71(func: (x: T, y: U) => Partial): void; +declare function f72(func: (x: T, y: U, k: K) => (T & U)[K]): void; +declare function f73(func: (x: T, y: U, k: K) => (T & U)[K]): void; +declare function f74(func: (x: T, y: U, k: K) => (T | U)[K]): void; +declare function f80(obj: T): void; +declare function f81(obj: T): T["a"]["x"]; +declare function f82(): void; +declare function f83(obj: T, key: K): T[K]["x"]; +declare function f84(): void; +declare class C1 { + x: number; + get(key: K): this[K]; + set(key: K, value: this[K]): void; + foo(): void; +} +type S2 = { + a: string; + b: string; +}; +declare function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]): void; +declare function f91(x: T, y: T[keyof T], z: T[K]): void; +declare function f92(x: T, y: T[keyof T], z: T[K]): void; +declare class Base { + get(prop: K): this[K]; + set(prop: K, value: this[K]): void; +} +declare class Person extends Base { + parts: number; + constructor(parts: number); + getParts(): this["parts"]; +} +declare class OtherPerson { + parts: number; + constructor(parts: number); + getParts(): this["parts"]; +} +declare function path(obj: T, key1: K1): T[K1]; +declare function path(obj: T, key1: K1, key2: K2): T[K1][K2]; +declare function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; +declare function path(obj: any, ...keys: (string | number)[]): any; +type Thing = { + a: { + x: number; + y: string; + }; + b: boolean; +}; +declare function f1(thing: Thing): void; +declare const assignTo2: (object: T, key1: K1, key2: K2) => (value: T[K1][K2]) => T[K1][K2]; +declare function one(handler: (t: T) => void): T; +declare var empty: unknown; +type Handlers = { + [K in keyof T]: (t: T[K]) => void; +}; +declare function on(handlerHash: Handlers): T; +declare var hashOfEmpty1: { + test: unknown; +}; +declare var hashOfEmpty2: { + test: boolean; +}; +interface Options1 { + data?: Data; + computed?: Computed; +} +declare class Component1 { + constructor(options: Options1); + get(key: K): (Data & Computed)[K]; +} +declare let c1: Component1<{ + hello: string; +}, unknown>; +interface Options2 { + data?: Data; + computed?: Computed; +} +declare class Component2 { + constructor(options: Options2); + get(key: K): (Data & Computed)[K]; +} +interface R { + p: number; +} +declare function f(p: K): void; +type MethodDescriptor = { + name: string; + args: any[]; + returnValue: any; +}; +declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; +type SomeMethodDescriptor = { + name: "someMethod"; + args: [string, number]; + returnValue: string[]; +}; +declare let result: string[]; +type KeyTypes = "a" | "b"; +declare let MyThingy: { + [key in KeyTypes]: string[]; +}; +declare function addToMyThingy(key: S): void; +type Handler = { + onChange: (name: keyof T) => void; +}; +declare function onChangeGenericFunction(handler: Handler): void; +declare function updateIds, K extends string>(obj: T, idFields: K[], idMapping: Partial>): Record; +declare function updateIds2(obj: T, key: K, stringMap: { + [oldId: string]: string; +}): void; +declare function head>(list: T): T[0]; +declare class A { + props: T & { + foo: string; + }; +} +declare class B extends A<{ + x: number; +}> { + f(p: this["props"]): void; +} +declare class Form { + private childFormFactories; + set(prop: K, value: T[K]): void; +} +declare class SampleClass

{ + props: Readonly

; + constructor(props: P); +} +interface Foo { + foo: string; +} +declare function merge(obj1: T, obj2: U): T & U; +declare class AnotherSampleClass extends SampleClass { + constructor(props: T); + brokenMethod(): void; +} +declare function f3>(t: T, k: K, tk: T[K]): void; +type Predicates = { + [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T]; +}; +type Example = { + [K in keyof T]: T[K]["prop"]; +}; +type Result = Example<{ + a: { + prop: string; + }; + b: { + prop: number; + }; +}>; +type Helper2 = { + [K in keyof T]: Extract; +}; +type Example2 = { + [K in keyof Helper2]: Helper2[K]["prop"]; +}; +type Result2 = Example2<{ + 1: { + prop: string; + }; + 2: { + prop: number; + }; +}>; +type DBBoolTable = { + [k in K]: 0 | 1; +}; +declare enum Flag { + FLAG_1 = "flag_1", + FLAG_2 = "flag_2" +} +type SimpleDBRecord = { + staticField: number; +} & DBBoolTable; +declare function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]): SimpleDBRecord[Flag]; +type DynamicDBRecord = ({ + dynamicField: number; +} | { + dynamicField: string; +}) & DBBoolTable; +declare function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]): DynamicDBRecord[Flag]; +interface I { + foo: string; +} +declare function take(p: T): void; +declare function fn(o: T, k: K): void; +declare class Unbounded { + foo(x: T[keyof T]): void; +} +interface I7 { + x: any; +} +type Foo7 = T; +declare function f7(type: K): Foo7; +type Dict = { + [key in T]: number; +}; +type DictDict = { + [key in V]: Dict; +}; +declare function ff1(dd: DictDict, k1: V, k2: T): number; +declare function ff2(dd: DictDict, k1: V, k2: T): number; +declare const cf1: (t: T, k: K) => void; +declare const cf2: (t: T, k: K) => void; +//# sourceMappingURL=keyofAndIndexedAccess.d.ts.map +/// [Errors] //// + +keyofAndIndexedAccess.ts(205,24): error TS2322: Type 'T[keyof T]' is not assignable to type 'object'. + Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'object'. + Type 'T[string]' is not assignable to type 'object'. +keyofAndIndexedAccess.ts(211,24): error TS2322: Type 'T[K]' is not assignable to type 'object'. + Type 'T[keyof T]' is not assignable to type 'object'. + Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'object'. + Type 'T[string]' is not assignable to type 'object'. +keyofAndIndexedAccess.ts(316,5): error TS2322: Type 'T' is not assignable to type '{}'. +keyofAndIndexedAccess.ts(317,5): error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. + Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. + Type 'T[string]' is not assignable to type '{}'. +keyofAndIndexedAccess.ts(318,5): error TS2322: Type 'T[K]' is not assignable to type '{}'. + Type 'T[keyof T]' is not assignable to type '{}'. + + +==== keyofAndIndexedAccess.ts (5 errors) ==== + class Shape { + name: string; + width: number; + height: number; + visible: boolean; + } + + class TaggedShape extends Shape { + tag: string; + } + + class Item { + name: string; + price: number; + } + + class Options { + visible: "yes" | "no"; + } + + type Dictionary = { [x: string]: T }; + type NumericallyIndexed = { [x: number]: T }; + + const enum E { A, B, C } + + type K00 = keyof any; // string + type K01 = keyof string; // "toString" | "charAt" | ... + type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ... + type K03 = keyof boolean; // "valueOf" + type K04 = keyof void; // never + type K05 = keyof undefined; // never + type K06 = keyof null; // never + type K07 = keyof never; // string | number | symbol + type K08 = keyof unknown; // never + + type K10 = keyof Shape; // "name" | "width" | "height" | "visible" + type K11 = keyof Shape[]; // "length" | "toString" | ... + type K12 = keyof Dictionary; // string + type K13 = keyof {}; // never + type K14 = keyof Object; // "constructor" | "toString" | ... + type K15 = keyof E; // "toString" | "toFixed" | "toExponential" | ... + type K16 = keyof [string, number]; // "0" | "1" | "length" | "toString" | ... + type K17 = keyof (Shape | Item); // "name" + type K18 = keyof (Shape & Item); // "name" | "width" | "height" | "visible" | "price" + type K19 = keyof NumericallyIndexed // never + + type KeyOf = keyof T; + + type K20 = KeyOf; // "name" | "width" | "height" | "visible" + type K21 = KeyOf>; // string + + type NAME = "name"; + type WIDTH_OR_HEIGHT = "width" | "height"; + + type Q10 = Shape["name"]; // string + type Q11 = Shape["width" | "height"]; // number + type Q12 = Shape["name" | "visible"]; // string | boolean + + type Q20 = Shape[NAME]; // string + type Q21 = Shape[WIDTH_OR_HEIGHT]; // number + + type Q30 = [string, number][0]; // string + type Q31 = [string, number][1]; // number + type Q32 = [string, number][number]; // string | number + type Q33 = [string, number][E.A]; // string + type Q34 = [string, number][E.B]; // number + type Q35 = [string, number]["0"]; // string + type Q36 = [string, number]["1"]; // string + + type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" + type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" + + type Q50 = Dictionary["howdy"]; // Shape + type Q51 = Dictionary[123]; // Shape + type Q52 = Dictionary[E.B]; // Shape + + declare let cond: boolean; + + function getProperty(obj: T, key: K): T[K] { + return obj[key]; + } + + function setProperty(obj: T, key: K, value: T[K]): void { + obj[key] = value; + } + + function f10(shape: Shape): void { + let name = getProperty(shape, "name"); // string + let widthOrHeight = getProperty(shape, cond ? "width" : "height"); // number + let nameOrVisible = getProperty(shape, cond ? "name" : "visible"); // string | boolean + setProperty(shape, "name", "rectangle"); + setProperty(shape, cond ? "width" : "height", 10); + setProperty(shape, cond ? "name" : "visible", true); // Technically not safe + } + + function f11(a: Shape[]): void { + let len = getProperty(a, "length"); // number + setProperty(a, "length", len); + } + + function f12(t: [Shape, boolean]): void { + let len = getProperty(t, "length"); + let s2 = getProperty(t, "0"); // Shape + let b2 = getProperty(t, "1"); // boolean + } + + function f13(foo: any, bar: any): void { + let x = getProperty(foo, "x"); // any + let y = getProperty(foo, "100"); // any + let z = getProperty(foo, bar); // any + } + + class Component { + props: PropType; + getProperty(key: K): PropType[K] { + return this.props[key]; + } + setProperty(key: K, value: PropType[K]): void { + this.props[key] = value; + } + } + + function f20(component: Component): void { + let name = component.getProperty("name"); // string + let widthOrHeight = component.getProperty(cond ? "width" : "height"); // number + let nameOrVisible = component.getProperty(cond ? "name" : "visible"); // string | boolean + component.setProperty("name", "rectangle"); + component.setProperty(cond ? "width" : "height", 10) + component.setProperty(cond ? "name" : "visible", true); // Technically not safe + } + + function pluck(array: T[], key: K): T[K][] { + return array.map(x => x[key]); + } + + function f30(shapes: Shape[]): void { + let names = pluck(shapes, "name"); // string[] + let widths = pluck(shapes, "width"); // number[] + let nameOrVisibles = pluck(shapes, cond ? "name" : "visible"); // (string | boolean)[] + } + + function f31(key: K): Shape[K] { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] + } + + function f32(key: K): Shape[K] { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] + } + + function f33(shape: S, key: K): S[K] { + let name = getProperty(shape, "name"); + let prop = getProperty(shape, key); + return prop; + } + + function f34(ts: TaggedShape): void { + let tag1 = f33(ts, "tag"); + let tag2 = getProperty(ts, "tag"); + } + + class C { + public x: string; + protected y: string; + private z: string; + } + + // Indexed access expressions have always permitted access to private and protected members. + // For consistency we also permit such access in indexed access types. + function f40(c: C): void { + type X = C["x"]; + type Y = C["y"]; + type Z = C["z"]; + let x: X = c["x"]; + let y: Y = c["y"]; + let z: Z = c["z"]; + } + + function f50(k: keyof T, s: string): void { + const x1 = s as keyof T; + const x2 = k as string; + } + + function f51(k: K, s: string): void { + const x1 = s as keyof T; + const x2 = k as string; + } + + function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number): void { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; + } + + function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number): void { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; + } + + function f54(obj: T, key: keyof T): void { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; + ~~~~~~~~ +!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'object'. + } + + function f55(obj: T, key: K): void { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; + ~~~~~~~~ +!!! error TS2322: Type 'T[K]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'object'. + } + + function f60(source: T, target: T): void { + for (let k in source) { + target[k] = source[k]; + } + } + + function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void): void { + func<{ a: any, b: any }, { a: any, c: any }>('a', 'a'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'b'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'c'); + } + + function f71(func: (x: T, y: U) => Partial): void { + let x = func({ a: 1, b: "hello" }, { c: true }); + x.a; // number | undefined + x.b; // string | undefined + x.c; // boolean | undefined + } + + function f72(func: (x: T, y: U, k: K) => (T & U)[K]): void { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean + } + + function f73(func: (x: T, y: U, k: K) => (T & U)[K]): void { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean + } + + function f74(func: (x: T, y: U, k: K) => (T | U)[K]): void { + let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean + } + + function f80(obj: T): void { + let a1 = obj.a; // { x: any } + let a2 = obj['a']; // { x: any } + let a3 = obj['a'] as T['a']; // T["a"] + let x1 = obj.a.x; // any + let x2 = obj['a']['x']; // any + let x3 = obj['a']['x'] as T['a']['x']; // T["a"]["x"] + } + + function f81(obj: T): T["a"]["x"] { + return obj['a']['x'] as T['a']['x']; + } + + function f82(): void { + let x1 = f81({ a: { x: "hello" } }); // string + let x2 = f81({ a: { x: 42 } }); // number + } + + function f83(obj: T, key: K): T[K]["x"] { + return obj[key]['x'] as T[K]['x']; + } + + function f84(): void { + let x1 = f83({ foo: { x: "hello" } }, "foo"); // string + let x2 = f83({ bar: { x: 42 } }, "bar"); // number + } + + class C1 { + x: number; + get(key: K): this[K] { + return this[key]; + } + set(key: K, value: this[K]): void { + this[key] = value; + } + foo(): void { + let x1 = this.x; // number + let x2 = this["x"]; // number + let x3 = this.get("x"); // this["x"] + let x4 = getProperty(this, "x"); // this["x"] + this.x = 42; + this["x"] = 42; + this.set("x", 42); + setProperty(this, "x", 42); + } + } + + type S2 = { + a: string; + b: string; + }; + + function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]): void { + x1 = x2; + x1 = x3; + x2 = x1; + x2 = x3; + x3 = x1; + x3 = x2; + x1.length; + x2.length; + x3.length; + } + + function f91(x: T, y: T[keyof T], z: T[K]): void { + let a: {}; + a = x; + ~ +!!! error TS2322: Type 'T' is not assignable to type '{}'. +!!! related TS2208 keyofAndIndexedAccess.ts:314:14: This type parameter might need an `extends {}` constraint. + a = y; + ~ +!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. +!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. +!!! error TS2322: Type 'T[string]' is not assignable to type '{}'. + a = z; + ~ +!!! error TS2322: Type 'T[K]' is not assignable to type '{}'. +!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. + } + + function f92(x: T, y: T[keyof T], z: T[K]): void { + let a: {} | null | undefined; + a = x; + a = y; + a = z; + } + + // Repros from #12011 + + class Base { + get(prop: K): this[K] { + return this[prop]; + } + set(prop: K, value: this[K]): void { + this[prop] = value; + } + } + + class Person extends Base { + parts: number; + constructor(parts: number) { + super(); + this.set("parts", parts); + } + getParts(): this["parts"] { + return this.get("parts") + } + } + + class OtherPerson { + parts: number; + constructor(parts: number) { + setProperty(this, "parts", parts); + } + getParts(): this["parts"] { + return getProperty(this, "parts") + } + } + + // Modified repro from #12544 + + function path(obj: T, key1: K1): T[K1]; + function path(obj: T, key1: K1, key2: K2): T[K1][K2]; + function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; + function path(obj: any, ...keys: (string | number)[]): any; + function path(obj: any, ...keys: (string | number)[]): any { + let result = obj; + for (let k of keys) { + result = result[k]; + } + return result; + } + + type Thing = { + a: { x: number, y: string }, + b: boolean + }; + + + function f1(thing: Thing): void { + let x1 = path(thing, 'a'); // { x: number, y: string } + let x2 = path(thing, 'a', 'y'); // string + let x3 = path(thing, 'b'); // boolean + let x4 = path(thing, ...['a', 'x']); // any + } + + // Repro from comment in #12114 + + const assignTo2 = (object: T, key1: K1, key2: K2): (value: T[K1][K2]) => T[K1][K2] => + (value: T[K1][K2]) => object[key1][key2] = value; + + // Modified repro from #12573 + + declare function one(handler: (t: T) => void): T + var empty: unknown = one(() => {}) // inferred as {}, expected + + type Handlers = { [K in keyof T]: (t: T[K]) => void } + declare function on(handlerHash: Handlers): T + var hashOfEmpty1: { + test: unknown; + } = on({ test: () => {} }); // {} + var hashOfEmpty2: { + test: boolean; + } = on({ test: (x: boolean) => {} }); // { test: boolean } + + // Repro from #12624 + + interface Options1 { + data?: Data + computed?: Computed; + } + + declare class Component1 { + constructor(options: Options1); + get(key: K): (Data & Computed)[K]; + } + + let c1: Component1<{ + hello: string; + }, unknown> = new Component1({ + data: { + hello: "" + } + }); + + c1.get("hello"); + + // Repro from #12625 + + interface Options2 { + data?: Data + computed?: Computed; + } + + declare class Component2 { + constructor(options: Options2); + get(key: K): (Data & Computed)[K]; + } + + // Repro from #12641 + + interface R { + p: number; + } + + function f(p: K): void { + let a: any; + a[p].add; // any + } + + // Repro from #12651 + + type MethodDescriptor = { + name: string; + args: any[]; + returnValue: any; + } + + declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; + + type SomeMethodDescriptor = { + name: "someMethod"; + args: [string, number]; + returnValue: string[]; + } + + let result: string[] = dispatchMethod("someMethod", ["hello", 35]); + + // Repro from #13073 + + type KeyTypes = "a" | "b" + let MyThingy: { [key in KeyTypes]: string[] }; + + function addToMyThingy(key: S): void { + MyThingy[key].push("a"); + } + + // Repro from #13102 + + type Handler = { + onChange: (name: keyof T) => void; + }; + + function onChangeGenericFunction(handler: Handler): void { + handler.onChange('preset') + } + + // Repro from #13285 + + function updateIds, K extends string>( + obj: T, + idFields: K[], + idMapping: Partial> + ): Record { + for (const idField of idFields) { + const newId: T[K] | undefined = idMapping[obj[idField]]; + if (newId) { + obj[idField] = newId; + } + } + return obj; + } + + // Repro from #13285 + + function updateIds2( + obj: T, + key: K, + stringMap: { [oldId: string]: string } + ): void { + var x = obj[key]; + stringMap[x]; // Should be OK. + } + + // Repro from #13514 + + declare function head>(list: T): T[0]; + + // Repro from #13604 + + class A { + props: T & { foo: string }; + } + + class B extends A<{ x: number}> { + f(p: this["props"]): void { + p.x; + } + } + + // Repro from #13749 + + class Form { + private childFormFactories: {[K in keyof T]: (v: T[K]) => Form} + + public set(prop: K, value: T[K]): void { + this.childFormFactories[prop](value) + } + } + + // Repro from #13787 + + class SampleClass

{ + public props: Readonly

; + constructor(props: P) { + this.props = Object.freeze(props); + } + } + + interface Foo { + foo: string; + } + + declare function merge(obj1: T, obj2: U): T & U; + + class AnotherSampleClass extends SampleClass { + constructor(props: T) { + const foo: Foo = { foo: "bar" }; + super(merge(props, foo)); + } + + public brokenMethod(): void { + this.props.foo.concat; + } + } + new AnotherSampleClass({}); + + // Positive repro from #17166 + function f3>(t: T, k: K, tk: T[K]): void { + for (let key in t) { + key = k // ok, K ==> keyof T + t[key] = tk; // ok, T[K] ==> T[keyof T] + } + } + + // # 21185 + type Predicates = { + [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] + } + + // Repros from #23592 + + type Example = { [K in keyof T]: T[K]["prop"] }; + type Result = Example<{ a: { prop: string }; b: { prop: number } }>; + + type Helper2 = { [K in keyof T]: Extract }; + type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; + type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; + + // Repro from #23618 + + type DBBoolTable = { [k in K]: 0 | 1 } + enum Flag { + FLAG_1 = "flag_1", + FLAG_2 = "flag_2" + } + + type SimpleDBRecord = { staticField: number } & DBBoolTable + function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]): SimpleDBRecord[Flag] { + return record[flags[0]]; + } + + type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable + function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]): DynamicDBRecord[Flag] { + return record[flags[0]]; + } + + // Repro from #21368 + + interface I { + foo: string; + } + + declare function take(p: T): void; + + function fn(o: T, k: K): void { + take<{} | null | undefined>(o[k]); + take(o[k]); + } + + // Repro from #23133 + + class Unbounded { + foo(x: T[keyof T]): void { + let y: {} | undefined | null = x; + } + } + + // Repro from #23940 + + interface I7 { + x: any; + } + type Foo7 = T; + declare function f7(type: K): Foo7; + + // Repro from #21770 + + type Dict = { [key in T]: number }; + type DictDict = { [key in V]: Dict }; + + function ff1(dd: DictDict, k1: V, k2: T): number { + return dd[k1][k2]; + } + + function ff2(dd: DictDict, k1: V, k2: T): number { + const d: Dict = dd[k1]; + return d[k2]; + } + + // Repro from #26409 + + const cf1 = (t: T, k: K): void => + { + const s: string = t[k]; + t.cool; + }; + + const cf2 = (t: T, k: K): void => + { + const s: string = t[k]; + t.cool; + }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts new file mode 100644 index 0000000000000..9c6039d216f4e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts] //// + +//// [index.ts] +export function foo(): void {} +foo.bar = 12; +const _private = Symbol(); +foo[_private] = "ok"; + +const x: string = foo[_private]; + + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare function foo(): void; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +index.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +index.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== index.ts (2 errors) ==== + export function foo(): void {} + foo.bar = 12; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + const _private = Symbol(); + foo[_private] = "ok"; + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + const x: string = foo[_private]; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/leaveOptionalParameterAsWritten.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/leaveOptionalParameterAsWritten.d.ts.map new file mode 100644 index 0000000000000..3ea90e0b055b8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/leaveOptionalParameterAsWritten.d.ts.map @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts] //// + +//// [a.ts] +export interface Foo {} + +//// [b.ts] +import * as a from "./a"; +declare global { + namespace teams { + export namespace calling { + export import Foo = a.Foo; + } + } +} + +//// [c.ts] +type Foo = teams.calling.Foo; +export const bar = (p?: Foo): void => {} + +/// [Declarations] //// + + + +//// [/.src/dist/a.d.ts] +export interface Foo { +} +//# sourceMappingURL=a.d.ts.map +//// [/.src/dist/b.d.ts] +import * as a from "./a"; +declare global { + namespace teams { + namespace calling { + export import Foo = a.Foo; + } + } +} +//# sourceMappingURL=b.d.ts.map +//// [/.src/dist/c.d.ts] +type Foo = teams.calling.Foo; +export declare const bar: (p?: Foo) => void; +export {}; +//# sourceMappingURL=c.d.ts.map + +/// [Declarations Maps] //// + + +//// [/.src/dist/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../a.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;CAAG"} + + +//// [/.src/dist/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../b.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,UAAiB,OAAO,CAAC;YACvB,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;SAC3B;KACF;CACF"} + + +//// [/.src/dist/c.d.ts.map] +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../c.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAC7B,eAAO,MAAM,GAAG,GAAI,CAAC,CAAC,EAAE,GAAG,KAAG,IAAU,CAAA"} + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts new file mode 100644 index 0000000000000..bb4b4bb308ea4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -0,0 +1,79 @@ +//// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// + +//// [index.ts] +export const a = async () => (await import("inner")).x(); +//// [index.d.ts] +export { x } from "./other.js"; +//// [other.d.ts] +import { Thing } from "./private.js" +export const x: () => Thing; +//// [private.d.ts] +export interface Thing {} // not exported in export map, inaccessible under new module modes +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: () => invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +index.ts(1,18): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + + +==== index.ts (1 errors) ==== + export const a = async () => (await import("inner")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:1:14: Add a type annotation to the variable a. +!!! related TS9030 index.ts:1:18: Add a return type to the function expression. +==== node_modules/inner/index.d.ts (0 errors) ==== + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + import { Thing } from "./private.js" + export const x: () => Thing; +==== node_modules/inner/private.d.ts (0 errors) ==== + export interface Thing {} // not exported in export map, inaccessible under new module modes +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeConstraints2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeConstraints2.d.ts.map new file mode 100644 index 0000000000000..7b619c8ed1924 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeConstraints2.d.ts.map @@ -0,0 +1,111 @@ +//// [tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts] //// + +//// [mappedTypeConstraints2.ts] +type Mapped1 = { [P in K]: { a: P } }; + +function f1(obj: Mapped1, key: K): void { + const x: { a: K } = obj[key]; +} + +type Mapped2 = { [P in K as `get${P}`]: { a: P } }; + +function f2(obj: Mapped2, key: `get${K}`): void { + const x: { a: K } = obj[key]; // Error +} + +type Mapped3 = { [P in K as Uppercase

]: { a: P } }; + +function f3(obj: Mapped3, key: Uppercase): void { + const x: { a: K } = obj[key]; // Error +} + +// Repro from #47794 + +type Foo = { + [RemappedT in T as `get${RemappedT}`]: RemappedT; +}; + +const get = (t: T, foo: Foo): T => foo[`get${t}`]; // Type 'Foo[`get${T}`]' is not assignable to type 'T' + +// Repro from #48626 + +interface Bounds { + min: number; + max: number; +} + +type NumericBoundsOf = { + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +} + +function validate(obj: T, bounds: NumericBoundsOf): boolean { + for (const [key, val] of Object.entries(obj)) { + const boundsForKey = bounds[key as keyof NumericBoundsOf]; + if (boundsForKey) { + const { min, max } = boundsForKey; + if (min > val || max < val) return false; + } + } + return true; +} + +// repro from #50030 + +type ObjectWithUnderscoredKeys = { + [k in K as `_${k}`]: true; +}; + +function genericTest(objectWithUnderscoredKeys: ObjectWithUnderscoredKeys, key: K): void { + const shouldBeTrue: true = objectWithUnderscoredKeys[`_${key}`]; +} + + +/// [Declarations] //// + + + +//// [mappedTypeConstraints2.d.ts] +type Mapped1 = { + [P in K]: { + a: P; + }; +}; +declare function f1(obj: Mapped1, key: K): void; +type Mapped2 = { + [P in K as `get${P}`]: { + a: P; + }; +}; +declare function f2(obj: Mapped2, key: `get${K}`): void; +type Mapped3 = { + [P in K as Uppercase

]: { + a: P; + }; +}; +declare function f3(obj: Mapped3, key: Uppercase): void; +type Foo = { + [RemappedT in T as `get${RemappedT}`]: RemappedT; +}; +declare const get: (t: T, foo: Foo) => T; +interface Bounds { + min: number; + max: number; +} +type NumericBoundsOf = { + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +}; +declare function validate(obj: T, bounds: NumericBoundsOf): boolean; +type ObjectWithUnderscoredKeys = { + [k in K as `_${k}`]: true; +}; +declare function genericTest(objectWithUnderscoredKeys: ObjectWithUnderscoredKeys, key: K): void; +//# sourceMappingURL=mappedTypeConstraints2.d.ts.map + +/// [Declarations Maps] //// + + +//// [mappedTypeConstraints2.d.ts.map] +{"version":3,"file":"mappedTypeConstraints2.d.ts","sourceRoot":"","sources":["mappedTypeConstraints2.ts"],"names":[],"mappings":"AAAA,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,GAAG;QAAE,CAAC,EAAE,CAAC,CAAA;KAAE;CAAE,CAAC;AAExD,iBAAS,EAAE,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAE3D;AAED,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,EAAE,GAAG;QAAE,CAAC,EAAE,CAAC,CAAA;KAAE;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ICAgICAgICBjb25zdCBib3VuZHNGb3JLZXkgPSBib3VuZHNba2V5IGFzIGtleW9mIE51bWVyaWNCb3VuZHNPZjxUPl07CiAgICAgICAgaWYgKGJvdW5kc0ZvcktleSkgewogICAgICAgICAgICBjb25zdCB7IG1pbiwgbWF4IH0gPSBib3VuZHNGb3JLZXk7CiAgICAgICAgICAgIGlmIChtaW4gPiB2YWwgfHwgbWF4IDwgdmFsKSByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0KCi8vIHJlcHJvIGZyb20gIzUwMDMwCgp0eXBlIE9iamVjdFdpdGhVbmRlcnNjb3JlZEtleXM8SyBleHRlbmRzIHN0cmluZz4gPSB7CiAgICBbayBpbiBLIGFzIGBfJHtrfWBdOiB0cnVlOwp9OwoKZnVuY3Rpb24gZ2VuZXJpY1Rlc3Q8SyBleHRlbmRzIHN0cmluZz4ob2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czogT2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czxLPiwga2V5OiBLKTogdm9pZCB7CiAgY29uc3Qgc2hvdWxkQmVUcnVlOiB0cnVlID0gb2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5c1tgXyR7a2V5fWBdOwp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericIndexedAccess.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericIndexedAccess.d.ts.map new file mode 100644 index 0000000000000..99ba4a446df33 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericIndexedAccess.d.ts.map @@ -0,0 +1,97 @@ +//// [tests/cases/compiler/mappedTypeGenericIndexedAccess.ts] //// + +//// [mappedTypeGenericIndexedAccess.ts] +// Repro from #49242 + +type Types = { + first: { a1: true }; + second: { a2: true }; + third: { a3: true }; +} + +class Test { + entries: { [T in keyof Types]?: Types[T][] }; + + constructor() { + this.entries = {}; + } + + addEntry(name: T, entry: Types[T]): void { + if (!this.entries[name]) { + this.entries[name] = []; + } + this.entries[name]?.push(entry); + } +} + +// Repro from #49338 + +type TypesMap = { + [0]: { foo: 'bar'; }; + [1]: { a: 'b'; }; +}; + +type P = { t: T; } & TypesMap[T]; + +type TypeHandlers = { + [T in keyof TypesMap]?: (p: P) => void; +}; + +const typeHandlers: TypeHandlers = { + [0]: (p) => console.log(p.foo), + [1]: (p) => console.log(p.a), +}; + +const onSomeEvent = (p: P): void | undefined => + typeHandlers[p.t]?.(p); + + +/// [Declarations] //// + + + +//// [mappedTypeGenericIndexedAccess.d.ts] +type Types = { + first: { + a1: true; + }; + second: { + a2: true; + }; + third: { + a3: true; + }; +}; +declare class Test { + entries: { + [T in keyof Types]?: Types[T][]; + }; + constructor(); + addEntry(name: T, entry: Types[T]): void; +} +type TypesMap = { + [0]: { + foo: 'bar'; + }; + [1]: { + a: 'b'; + }; +}; +type P = { + t: T; +} & TypesMap[T]; +type TypeHandlers = { + [T in keyof TypesMap]?: (p: P) => void; +}; +declare const typeHandlers: TypeHandlers; +declare const onSomeEvent: (p: P) => void | undefined; +//# sourceMappingURL=mappedTypeGenericIndexedAccess.d.ts.map + +/// [Declarations Maps] //// + + +//// [mappedTypeGenericIndexedAccess.d.ts.map] +{"version":3,"file":"mappedTypeGenericIndexedAccess.d.ts","sourceRoot":"","sources":["mappedTypeGenericIndexedAccess.ts"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACT,KAAK,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;IACpB,MAAM,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;IACrB,KAAK,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;CACvB,CAAA;AAED,cAAM,IAAI;IACN,OAAO,EAAE;SAAG,CAAC,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE;KAAE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reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts new file mode 100644 index 0000000000000..c7724bf0f7aa1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/mappedTypeGenericInstantiationPreservesHomomorphism.ts] //// + +//// [internal.ts] +export declare function usePrivateType(...args: T): PrivateMapped; + +type PrivateMapped = {[K in keyof Obj]: Obj[K]}; + +//// [api.ts] +import {usePrivateType} from './internal'; +export const mappedUnionWithPrivateType = (...args: T): T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never => usePrivateType(...args); + + +/// [Declarations] //// + + + +//// [api.d.ts] +export declare const mappedUnionWithPrivateType: (...args: T) => T[any] extends infer T_1 ? { + [K in keyof T_1]: T[any][K]; +} : never; +//# sourceMappingURL=api.d.ts.map +//// [internal.d.ts] +export declare function usePrivateType(...args: T): PrivateMapped; +type PrivateMapped = { + [K in keyof Obj]: Obj[K]; +}; +export {}; +//# sourceMappingURL=internal.d.ts.map +/// [Errors] //// + +api.ts(2,149): error TS2322: Type 'PrivateMapped' is not assignable to type 'T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never'. + + +==== internal.ts (0 errors) ==== + export declare function usePrivateType(...args: T): PrivateMapped; + + type PrivateMapped = {[K in keyof Obj]: Obj[K]}; + +==== api.ts (1 errors) ==== + import {usePrivateType} from './internal'; + export const mappedUnionWithPrivateType = (...args: T): T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never => usePrivateType(...args); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'PrivateMapped' is not assignable to type 'T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericInstantiationPreservesInlineForm.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericInstantiationPreservesInlineForm.d.ts new file mode 100644 index 0000000000000..87fdd8c092377 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericInstantiationPreservesInlineForm.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/mappedTypeGenericInstantiationPreservesInlineForm.ts] //// + +//// [mappedTypeGenericInstantiationPreservesInlineForm.ts] +// repro from #53109 + +export const test1 = >(schema: { + [K in keyof Required]: T[K]; +}): void => {} + +export function test2>(schema: { + [K in keyof Required]: T[K]; +}): void {}; + + +/// [Declarations] //// + + + +//// [mappedTypeGenericInstantiationPreservesInlineForm.d.ts] +export declare const test1: >(schema: { + [K in keyof Required]: T[K]; +}) => void; +export declare function test2>(schema: { + [K in keyof Required]: T[K]; +}): void; +//# sourceMappingURL=mappedTypeGenericInstantiationPreservesInlineForm.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeNoTypeNoCrash.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeNoTypeNoCrash.d.ts new file mode 100644 index 0000000000000..65ec37ee57a64 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeNoTypeNoCrash.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/mappedTypeNoTypeNoCrash.ts] //// + +//// [mappedTypeNoTypeNoCrash.ts] +type T0 = ({[K in keyof T]}) extends ({[key in K]: T[K]}) ? number : never; + +/// [Declarations] //// + + + +//// [mappedTypeNoTypeNoCrash.d.ts] +type T0 = ({ + [K in keyof T]: ; +}) extends ({ + [key in K]: T[K]; +}) ? number : never; +//# sourceMappingURL=mappedTypeNoTypeNoCrash.d.ts.map +/// [Errors] //// + +mappedTypeNoTypeNoCrash.ts(1,51): error TS2304: Cannot find name 'K'. +mappedTypeNoTypeNoCrash.ts(1,51): error TS4081: Exported type alias 'T0' has or is using private name 'K'. +mappedTypeNoTypeNoCrash.ts(1,57): error TS2304: Cannot find name 'K'. +mappedTypeNoTypeNoCrash.ts(1,57): error TS4081: Exported type alias 'T0' has or is using private name 'K'. + + +==== mappedTypeNoTypeNoCrash.ts (4 errors) ==== + type T0 = ({[K in keyof T]}) extends ({[key in K]: T[K]}) ? number : never; + ~ +!!! error TS2304: Cannot find name 'K'. + ~ +!!! error TS4081: Exported type alias 'T0' has or is using private name 'K'. + ~ +!!! error TS2304: Cannot find name 'K'. + ~ +!!! error TS4081: Exported type alias 'T0' has or is using private name 'K'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts new file mode 100644 index 0000000000000..3c8781a107b1e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts] //// + +//// [mappedTypeWithAsClauseAndLateBoundProperty2.ts] +export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); + + +/// [Declarations] //// + + + +//// [mappedTypeWithAsClauseAndLateBoundProperty2.d.ts] +export declare const thing: { + [K in keyof number[] as Exclude]: (number[])[K]; +}; +//# sourceMappingURL=mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixinClassesAnnotated.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixinClassesAnnotated.d.ts.map new file mode 100644 index 0000000000000..f4a8d46d3093e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixinClassesAnnotated.d.ts.map @@ -0,0 +1,117 @@ +//// [tests/cases/conformance/classes/mixinClassesAnnotated.ts] //// + +//// [mixinClassesAnnotated.ts] +type Constructor = new(...args: any[]) => T; + +class Base { + constructor(public x: number, public y: number) {} +} + +class Derived extends Base { + constructor(x: number, y: number, public z: number) { + super(x, y); + } +} + +interface Printable { + print(): void; +} + +const Printable = >(superClass: T): Constructor & { message: string } & T => + class extends superClass { + static message = "hello"; + print() { + const output = this.x + "," + this.y; + } + } + +interface Tagged { + _tag: string; +} + +function Tagged>(superClass: T): Constructor & T { + class C extends superClass { + _tag: string; + constructor(...args: any[]) { + super(...args); + this._tag = "hello"; + } + } + return C; +} + +const Thing1: Constructor & typeof Derived = Tagged(Derived); +const Thing2: Constructor & Constructor & { + message: string; +} & typeof Derived = Tagged(Printable(Derived)); +Thing2.message; + +function f1(): void { + const thing = new Thing1(1, 2, 3); + thing.x; + thing._tag; +} + +function f2(): void { + const thing = new Thing2(1, 2, 3); + thing.x; + thing._tag; + thing.print(); +} + +class Thing3 extends Thing2 { + constructor(tag: string) { + super(10, 20, 30); + this._tag = tag; + } + test(): void { + this.print(); + } +} + + +/// [Declarations] //// + + + +//// [mixinClassesAnnotated.d.ts] +type Constructor = new (...args: any[]) => T; +declare class Base { + x: number; + y: number; + constructor(x: number, y: number); +} +declare class Derived extends Base { + z: number; + constructor(x: number, y: number, z: number); +} +interface Printable { + print(): void; +} +declare const Printable: >(superClass: T) => Constructor & { + message: string; +} & T; +interface Tagged { + _tag: string; +} +declare function Tagged>(superClass: T): Constructor & T; +declare const Thing1: Constructor & typeof Derived; +declare const Thing2: Constructor & Constructor & { + message: string; +} & typeof Derived; +declare function f1(): void; +declare function f2(): void; +declare class Thing3 extends Thing2 { + constructor(tag: string); + test(): void; +} +//# sourceMappingURL=mixinClassesAnnotated.d.ts.map + +/// [Declarations Maps] //// + + +//// [mixinClassesAnnotated.d.ts.map] +{"version":3,"file":"mixinClassesAnnotated.d.ts","sourceRoot":"","sources":["mixinClassesAnnotated.ts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GFnOwp9CgpmdW5jdGlvbiBmMigpOiB2b2lkIHsKICAgIGNvbnN0IHRoaW5nID0gbmV3IFRoaW5nMigxLCAyLCAzKTsKICAgIHRoaW5nLng7CiAgICB0aGluZy5fdGFnOwogICAgdGhpbmcucHJpbnQoKTsKfQoKY2xhc3MgVGhpbmczIGV4dGVuZHMgVGhpbmcyIHsKICAgIGNvbnN0cnVjdG9yKHRhZzogc3RyaW5nKSB7CiAgICAgICAgc3VwZXIoMTAsIDIwLCAzMCk7CiAgICAgICAgdGhpcy5fdGFnID0gdGFnOwogICAgfQogICAgdGVzdCgpOiB2b2lkIHsKICAgICAgICB0aGlzLnByaW50KCk7CiAgICB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map new file mode 100644 index 0000000000000..af1f7194b1251 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map @@ -0,0 +1,76 @@ +//// [tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts] //// + +//// [index.ts] +export * from "./account"; + +//// [account.ts] +export interface Account { + myAccNum: number; +} +interface Account2 { + myAccNum: number; +} +export { Account2 as Acc }; + +//// [index.ts] +declare global { + interface Account { + someProp: number; + } + interface Acc { + someProp: number; + } +} +import * as model from "./model"; +export const func = (account: model.Account, acc2: model.Acc): void => {}; + + +/// [Declarations] //// + + + +//// [index.d.ts] +declare global { + interface Account { + someProp: number; + } + interface Acc { + someProp: number; + } +} +import * as model from "./model"; +export declare const func: (account: model.Account, acc2: model.Acc) => void; +//# sourceMappingURL=index.d.ts.map +//// [model/index.d.ts] +export * from "./account"; +//# sourceMappingURL=index.d.ts.map +//// [/.src/model/account.d.ts] +export interface Account { + myAccNum: number; +} +interface Account2 { + myAccNum: number; +} +export { Account2 as Acc }; +//# sourceMappingURL=account.d.ts.map + +/// [Declarations Maps] //// + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO;QACb,QAAQ,EAAE,MAAM,CAAC;KACpB;IACD,UAAU,GAAG;QACT,QAAQ,EAAE,MAAM,CAAC;KACpB;CACJ;AACD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,KAAG,IAAU,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBnbG9iYWwgew0KICAgIGludGVyZmFjZSBBY2NvdW50IHsNCiAgICAgICAgc29tZVByb3A6IG51bWJlcjsNCiAgICB9DQogICAgaW50ZXJmYWNlIEFjYyB7DQogICAgICAgIHNvbWVQcm9wOiBudW1iZXI7DQogICAgfQ0KfQ0KaW1wb3J0ICogYXMgbW9kZWwgZnJvbSAiLi9tb2RlbCI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmdW5jOiAoYWNjb3VudDogbW9kZWwuQWNjb3VudCwgYWNjMjogbW9kZWwuQWNjKSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sQ0FBQyxNQUFNLENBQUM7SUFDWCxVQUFVLE9BQU87UUFDYixRQUFRLEVBQUUsTUFBTSxDQUFDO0tBQ3BCO0lBQ0QsVUFBVSxHQUFHO1FBQ1QsUUFBUSxFQUFFLE1BQU0sQ0FBQztLQUNwQjtDQUNKO0FBQ0QsT0FBTyxLQUFLLEtBQUssTUFBTSxTQUFTLENBQUM7QUFDakMsZUFBTyxNQUFNLElBQUksR0FBSSxPQUFPLEVBQUUsS0FBSyxDQUFDLE9BQU8sRUFBRSxJQUFJLEVBQUUsS0FBSyxDQUFDLEdBQUcsS0FBRyxJQUFVLENBQUMifQ==,ZXhwb3J0ICogZnJvbSAiLi9hY2NvdW50IjsK + + +//// [model/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBnbG9iYWwgew0KICAgIGludGVyZmFjZSBBY2NvdW50IHsNCiAgICAgICAgc29tZVByb3A6IG51bWJlcjsNCiAgICB9DQogICAgaW50ZXJmYWNlIEFjYyB7DQogICAgICAgIHNvbWVQcm9wOiBudW1iZXI7DQogICAgfQ0KfQ0KaW1wb3J0ICogYXMgbW9kZWwgZnJvbSAiLi9tb2RlbCI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmdW5jOiAoYWNjb3VudDogbW9kZWwuQWNjb3VudCwgYWNjMjogbW9kZWwuQWNjKSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsV0FBVyxDQUFDIn0=,ZXhwb3J0ICogZnJvbSAiLi9hY2NvdW50IjsK + + +//// [/.src/model/account.d.ts.map] +{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["account.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACpB,QAAQ,EAAE,MAAM,CAAC;CACpB;AACD,UAAU,QAAQ;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB;AACD,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBBY2NvdW50IHsNCiAgICBteUFjY051bTogbnVtYmVyOw0KfQ0KaW50ZXJmYWNlIEFjY291bnQyIHsNCiAgICBteUFjY051bTogbnVtYmVyOw0KfQ0KZXhwb3J0IHsgQWNjb3VudDIgYXMgQWNjIH07DQovLyMgc291cmNlTWFwcGluZ1VSTD1hY2NvdW50LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3VudC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYWNjb3VudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFdBQVcsT0FBTztJQUNwQixRQUFRLEVBQUUsTUFBTSxDQUFDO0NBQ3BCO0FBQ0QsVUFBVSxRQUFRO0lBQ2QsUUFBUSxFQUFFLE1BQU0sQ0FBQztDQUNwQjtBQUNELE9BQU8sRUFBRSxRQUFRLElBQUksR0FBRyxFQUFFLENBQUMifQ==,ZXhwb3J0IGludGVyZmFjZSBBY2NvdW50IHsKICAgIG15QWNjTnVtOiBudW1iZXI7Cn0KaW50ZXJmYWNlIEFjY291bnQyIHsKICAgIG15QWNjTnVtOiBudW1iZXI7Cn0KZXhwb3J0IHsgQWNjb3VudDIgYXMgQWNjIH07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/namedTupleMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/namedTupleMembers.d.ts new file mode 100644 index 0000000000000..db97e04af1fd5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/namedTupleMembers.d.ts @@ -0,0 +1,125 @@ +//// [tests/cases/conformance/types/tuple/named/namedTupleMembers.ts] //// + +//// [namedTupleMembers.ts] +export type Segment = [length: number, count: number]; + +export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number +]; + +declare var a: Segment; +declare var b: SegmentAnnotated; +declare var c: [number, number]; +declare var d: [a: number, b: number]; + +a = b; +a = c; +a = d; + +b = a; +b = c; +b = d; + +c = a; +c = b; +c = d; + +d = a; +d = b; +d = c; + +export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; + +export type Func = (...x: T) => void; + +export const func = null as any as Func; + +export function useState(initial: T): [value: T, setter: (T: any) => void] { + return null as any; +} + + +export type Iter = Func<[step: number, iterations: number]>; + +export function readSegment([length, count]: [number, number]): void {} + +// documenting binding pattern behavior (currently does _not_ generate tuple names) +export const val = null as any as Parameters[0]; + +export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; + +export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; + +declare var q: RecursiveTupleA; +declare var r: RecursiveTupleB; + +q = r; +r = q; + +export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; +export type RecusiveRest2 = [string, ...RecusiveRest2[]]; + +declare var x: RecusiveRest; +declare var y: RecusiveRest2; + +x = y; +y = x; + +declare function f(...x: T): T; +declare function g(elem: object, index: number): object; +declare function getArgsForInjection any>(x: T): Parameters; + +export const argumentsOfGAsFirstArgument: [ + [elem: object, index: number] +] = f(getArgsForInjection(g)); // one tuple with captures arguments as first member +export const argumentsOfG: [ + elem: object, + index: number +] = f(...getArgsForInjection(g)); // captured arguments list re-spread + + +/// [Declarations] //// + + + +//// [namedTupleMembers.d.ts] +export type Segment = [length: number, count: number]; +export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number +]; +export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; +export type Func = (...x: T) => void; +export declare const func: Func; +export declare function useState(initial: T): [value: T, setter: (T: any) => void]; +export type Iter = Func<[step: number, iterations: number]>; +export declare function readSegment([length, count]: [number, number]): void; +export declare const val: Parameters[0]; +export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; +export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; +export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; +export type RecusiveRest2 = [string, ...RecusiveRest2[]]; +export declare const argumentsOfGAsFirstArgument: [ + [ + elem: object, + index: number + ] +]; +export declare const argumentsOfG: [ + elem: object, + index: number +]; +//# sourceMappingURL=namedTupleMembers.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noEmitOnError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noEmitOnError.d.ts new file mode 100644 index 0000000000000..0467191971c45 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noEmitOnError.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/noEmitOnError.ts] //// + +//// [noEmitOnError.ts] +var x: number = ""; + + +/// [Declarations] //// + + + +//// [noEmitOnError.d.ts] +declare var x: number; +//# sourceMappingURL=noEmitOnError.d.ts.map +/// [Errors] //// + +noEmitOnError.ts(1,5): error TS2322: Type 'string' is not assignable to type 'number'. + + +==== noEmitOnError.ts (1 errors) ==== + var x: number = ""; + ~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noInferRedeclaration.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noInferRedeclaration.d.ts.map new file mode 100644 index 0000000000000..5c1b515f1b4bd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noInferRedeclaration.d.ts.map @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/noInferRedeclaration.ts] //// + +//// [a.ts] +export const f = (x: T, y: NoInfer): T => x; + +//// [b.ts] +import { f } from "./a"; + +type NoInfer = T & number; + +export const g: (x: T, y: globalThis.NoInfer) => T = f; + + +/// [Declarations] //// + + + +//// [a.d.ts] +export declare const f: (x: T, y: NoInfer) => T; +//# sourceMappingURL=a.d.ts.map +//// [b.d.ts] +export declare const g: (x: T, y: globalThis.NoInfer) => T; +//# sourceMappingURL=b.d.ts.map + +/// [Declarations Maps] //// + + +//// [a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,KAAG,CAAM,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZjogPFQ+KHg6IFQsIHk6IE5vSW5mZXI8VD4pID0+IFQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1hLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sQ0FBQyxHQUFJLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUcsQ0FBTSxDQUFDIn0=,ZXhwb3J0IGNvbnN0IGYgPSA8VD4oeDogVCwgeTogTm9JbmZlcjxUPik6IFQgPT4geDsK + + +//// [b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAK,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZzogPFQ+KHg6IFQsIHk6IGdsb2JhbFRoaXMuTm9JbmZlcjxUPikgPT4gVDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWIuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxlQUFPLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLFVBQVUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBSyxDQUFDIn0=,aW1wb3J0IHsgZiB9IGZyb20gIi4vYSI7Cgp0eXBlIE5vSW5mZXI8VD4gPSBUICYgbnVtYmVyOwoKZXhwb3J0IGNvbnN0IGc6IDxUPih4OiBULCB5OiBnbG9iYWxUaGlzLk5vSW5mZXI8VD4pID0+IFQgPSBmOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts new file mode 100644 index 0000000000000..d61e6fe31796c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// + +//// [index.d.ts] +export interface PrismaClientOptions { + rejectOnNotFound?: any; +} + +export class PrismaClient { + private fetcher; +} + +//// [index.d.ts] +export * from ".prisma/client"; + +//// [index.ts] +import { PrismaClient } from "@prisma/client"; +declare const enhancePrisma: (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; +const EnhancedPrisma = enhancePrisma(PrismaClient); +export default new EnhancedPrisma(); + + +/// [Declarations] //// + + + +//// [/index.d.ts] +declare const _default: invalid; +export default _default; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +/index.ts(4,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. + + +==== /node_modules/.prisma/client/index.d.ts (0 errors) ==== + export interface PrismaClientOptions { + rejectOnNotFound?: any; + } + + export class PrismaClient { + private fetcher; + } + +==== /node_modules/@prisma/client/index.d.ts (0 errors) ==== + export * from ".prisma/client"; + +==== /index.ts (1 errors) ==== + import { PrismaClient } from "@prisma/client"; + declare const enhancePrisma: (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; + const EnhancedPrisma = enhancePrisma(PrismaClient); + export default new EnhancedPrisma(); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. +!!! related TS9036 /index.ts:4:1: Move the expression in default export to a variable and add a type annotation to it. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts new file mode 100644 index 0000000000000..ec15374d6fb4c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// + +//// [index.ts] +// cjs format file +export * from "fs"; +export * as fs from "fs"; +//// [index.js] +// esm format file +export * from "fs"; +export * as fs from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS6504: File 'index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? + The file is in the program because: + Root file specified for compilation +subfolder/index.ts(2,1): error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +subfolder/index.ts(3,1): error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +!!! error TS6504: File 'index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? +!!! error TS6504: The file is in the program because: +!!! error TS6504: Root file specified for compilation +==== subfolder/index.ts (2 errors) ==== + // cjs format file + export * from "fs"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + export * as fs from "fs"; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.js (0 errors) ==== + // esm format file + export * from "fs"; + export * as fs from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts new file mode 100644 index 0000000000000..ec15374d6fb4c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// + +//// [index.ts] +// cjs format file +export * from "fs"; +export * as fs from "fs"; +//// [index.js] +// esm format file +export * from "fs"; +export * as fs from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS6504: File 'index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? + The file is in the program because: + Root file specified for compilation +subfolder/index.ts(2,1): error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +subfolder/index.ts(3,1): error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +!!! error TS6504: File 'index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? +!!! error TS6504: The file is in the program because: +!!! error TS6504: Root file specified for compilation +==== subfolder/index.ts (2 errors) ==== + // cjs format file + export * from "fs"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + export * as fs from "fs"; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.js (0 errors) ==== + // esm format file + export * from "fs"; + export * as fs from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts new file mode 100644 index 0000000000000..f179f2ae3dee0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (5 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ +!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts new file mode 100644 index 0000000000000..f179f2ae3dee0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (5 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ +!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=node16).d.ts new file mode 100644 index 0000000000000..476c5a3e7e531 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=node16).d.ts @@ -0,0 +1,92 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +import {a as a2} from "package"; +//// [index.ts] +// esm format file +export { x } from "./other.js"; +//// [other.ts] +// esm format file +export interface Thing {} +export const x: () => Thing = null as any; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.ts" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +//// [/.src/node_modules/inner/index.d.ts] +export { x } from "./other.js"; +//# sourceMappingURL=index.d.ts.map +//// [/.src/node_modules/inner/other.d.ts] +export interface Thing { +} +export declare const x: () => Thing; +//# sourceMappingURL=other.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (5 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ +!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + import {a as a2} from "package"; +==== node_modules/inner/index.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing = null as any; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.ts" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=nodenext).d.ts new file mode 100644 index 0000000000000..476c5a3e7e531 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=nodenext).d.ts @@ -0,0 +1,92 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +import {a as a2} from "package"; +//// [index.ts] +// esm format file +export { x } from "./other.js"; +//// [other.ts] +// esm format file +export interface Thing {} +export const x: () => Thing = null as any; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.ts" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +//// [/.src/node_modules/inner/index.d.ts] +export { x } from "./other.js"; +//# sourceMappingURL=index.d.ts.map +//// [/.src/node_modules/inner/other.d.ts] +export interface Thing { +} +export declare const x: () => Thing; +//# sourceMappingURL=other.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (5 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ +!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + import {a as a2} from "package"; +==== node_modules/inner/index.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing = null as any; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.ts" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts new file mode 100644 index 0000000000000..049838f351d34 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts @@ -0,0 +1,93 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other.js"; // should fail +export const a = (await import("inner")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other.js"; // should fail + ~~~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts new file mode 100644 index 0000000000000..049838f351d34 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts @@ -0,0 +1,93 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other.js"; // should fail +export const a = (await import("inner")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other.js"; // should fail + ~~~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts new file mode 100644 index 0000000000000..ad9045f89262c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner/index.js")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts new file mode 100644 index 0000000000000..ad9045f89262c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner/index.js")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts new file mode 100644 index 0000000000000..a133ba7c73f45 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner/index.js")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts new file mode 100644 index 0000000000000..a133ba7c73f45 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner/index.js")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 index.ts:3:14: Add a type annotation to the variable a. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=node16).d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=node16).d.ts.map new file mode 100644 index 0000000000000..cc5ff46e05b64 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=node16).d.ts.map @@ -0,0 +1,195 @@ +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + +//// [index.ts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [package.json] +{ +} +//// [package.json] +{ + "type": "module" +} + +/// [Declarations] //// + + + +//// [index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder2/another/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder2/another/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder2/another/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder2/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder2/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder2/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=nodenext).d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=nodenext).d.ts.map new file mode 100644 index 0000000000000..cc5ff46e05b64 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=nodenext).d.ts.map @@ -0,0 +1,195 @@ +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + +//// [index.ts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [package.json] +{ +} +//// [package.json] +{ + "type": "module" +} + +/// [Declarations] //// + + + +//// [index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder2/another/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder2/another/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder2/another/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder2/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder2/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder2/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsR0FBSSxDQUFDLE9BQUssQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,GAAI,CAAC,OAAK,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLEdBQUksQ0FBQyxPQUFLLENBQXFCLENBQUM7QUFDdkMsT0FBTyxFQUFDLENBQUMsRUFBQyxDQUFDIn0=,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAssignments(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAssignments(module=node16).d.ts new file mode 100644 index 0000000000000..4a3e1a1fb4ba3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAssignments(module=node16).d.ts @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// + +//// [index.ts] +// cjs format file +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [index.ts] +// esm format file +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [file.ts] +// esm format file +const __require = null; +const _createRequire = null; +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; + +/// [Declarations] //// + + + +//// [file.d.ts] +export import fs2 = require("fs"); +//# sourceMappingURL=file.d.ts.map +//// [index.d.ts] +export import fs2 = require("fs"); +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +export import fs2 = require("fs"); +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAssignments(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAssignments(module=nodenext).d.ts new file mode 100644 index 0000000000000..4a3e1a1fb4ba3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAssignments(module=nodenext).d.ts @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// + +//// [index.ts] +// cjs format file +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [index.ts] +// esm format file +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [file.ts] +// esm format file +const __require = null; +const _createRequire = null; +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; + +/// [Declarations] //// + + + +//// [file.d.ts] +export import fs2 = require("fs"); +//# sourceMappingURL=file.d.ts.map +//// [index.d.ts] +export import fs2 = require("fs"); +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +export import fs2 = require("fs"); +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts new file mode 100644 index 0000000000000..afbea2184f891 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts new file mode 100644 index 0000000000000..afbea2184f891 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions2(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions2(module=node16).d.ts new file mode 100644 index 0000000000000..44093cc82ac19 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions2(module=node16).d.ts @@ -0,0 +1,73 @@ +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// + +//// [index.ts] +// cjs format file +export * from "fs"; +export * as fs from "fs"; +//// [index.ts] +// esm format file +export * from "fs"; +export * as fs from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +subfolder/index.ts(2,1): error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +subfolder/index.ts(3,1): error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +==== subfolder/index.ts (2 errors) ==== + // cjs format file + export * from "fs"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + export * as fs from "fs"; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.ts (0 errors) ==== + // esm format file + export * from "fs"; + export * as fs from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts new file mode 100644 index 0000000000000..44093cc82ac19 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts @@ -0,0 +1,73 @@ +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// + +//// [index.ts] +// cjs format file +export * from "fs"; +export * as fs from "fs"; +//// [index.ts] +// esm format file +export * from "fs"; +export * as fs from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +subfolder/index.ts(2,1): error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +subfolder/index.ts(3,1): error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +==== subfolder/index.ts (2 errors) ==== + // cjs format file + export * from "fs"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + export * as fs from "fs"; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.ts (0 errors) ==== + // esm format file + export * from "fs"; + export * as fs from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions3(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions3(module=node16).d.ts new file mode 100644 index 0000000000000..532a7eb886ec6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions3(module=node16).d.ts @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// + +//// [index.ts] +// cjs format file +export {default} from "fs"; +//// [index.ts] +// esm format file +export {default} from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export { default } from "fs"; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +export { default } from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +subfolder/index.ts(2,9): error TS2343: This syntax requires an imported helper named '__importDefault' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +==== subfolder/index.ts (1 errors) ==== + // cjs format file + export {default} from "fs"; + ~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importDefault' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.ts (0 errors) ==== + // esm format file + export {default} from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts new file mode 100644 index 0000000000000..532a7eb886ec6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// + +//// [index.ts] +// cjs format file +export {default} from "fs"; +//// [index.ts] +// esm format file +export {default} from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export { default } from "fs"; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +export { default } from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +subfolder/index.ts(2,9): error TS2343: This syntax requires an imported helper named '__importDefault' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +==== subfolder/index.ts (1 errors) ==== + // cjs format file + export {default} from "fs"; + ~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importDefault' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.ts (0 errors) ==== + // esm format file + export {default} from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts new file mode 100644 index 0000000000000..698bf76391861 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface; +export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts new file mode 100644 index 0000000000000..698bf76391861 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface; +export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts new file mode 100644 index 0000000000000..af9b57d227854 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts @@ -0,0 +1,416 @@ +//// [tests/cases/conformance/declarationEmit/nullPropertyName.ts] //// + +//// [nullPropertyName.ts] +function foo(): void {} +// properties +foo.x = 1; +foo.y = 1; + +// keywords +foo.break = 1; +foo.case = 1; +foo.catch = 1; +foo.class = 1; +foo.const = 1; +foo.continue = 1; +foo.debugger = 1; +foo.default = 1; +foo.delete = 1; +foo.do = 1; +foo.else = 1; +foo.enum = 1; +foo.export = 1; +foo.extends = 1; +foo.false = 1; +foo.finally = 1; +foo.for = 1; +foo.function = 1; +foo.if = 1; +foo.import = 1; +foo.in = 1; +foo.instanceof = 1; +foo.new = 1; +foo.null = 1; +foo.return = 1; +foo.super = 1; +foo.switch = 1; +foo.this = 1; +foo.throw = 1; +foo.true = 1; +foo.try = 1; +foo.typeof = 1; +foo.var = 1; +foo.void = 1; +foo.while = 1; +foo.with = 1; +foo.implements = 1; +foo.interface = 1; +foo.let = 1; +foo.package = 1; +foo.private = 1; +foo.protected = 1; +foo.public = 1; +foo.static = 1; +foo.yield = 1; +foo.abstract = 1; +foo.as = 1; +foo.asserts = 1; +foo.any = 1; +foo.async = 1; +foo.await = 1; +foo.boolean = 1; +foo.constructor = 1; +foo.declare = 1; +foo.get = 1; +foo.infer = 1; +foo.is = 1; +foo.keyof = 1; +foo.module = 1; +foo.namespace = 1; +foo.never = 1; +foo.readonly = 1; +foo.require = 1; +foo.number = 1; +foo.object = 1; +foo.set = 1; +foo.string = 1; +foo.symbol = 1; +foo.type = 1; +foo.undefined = 1; +foo.unique = 1; +foo.unknown = 1; +foo.from = 1; +foo.global = 1; +foo.bigint = 1; +foo.of = 1; + + +/// [Declarations] //// + + + +//// [nullPropertyName.d.ts] +declare function foo(): void; +//# sourceMappingURL=nullPropertyName.d.ts.map +/// [Errors] //// + +nullPropertyName.ts(3,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(7,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(8,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(9,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(11,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(12,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(13,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(14,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(15,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(16,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(17,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(18,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(19,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(20,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(21,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(22,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(23,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(24,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(25,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(26,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(27,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(28,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(29,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(30,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(31,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(32,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(33,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(34,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(35,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(36,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(37,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(38,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(39,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(40,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(41,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(42,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(43,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(44,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(45,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(46,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(47,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(48,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(49,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(50,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(51,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(52,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(53,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(54,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(55,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(56,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(57,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(58,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(59,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(60,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(61,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(62,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(63,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(64,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(65,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(66,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(67,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(68,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(69,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(70,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(71,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(72,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(73,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(74,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(75,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(76,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(77,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(78,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(79,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(80,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(81,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +nullPropertyName.ts(82,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== nullPropertyName.ts (78 errors) ==== + function foo(): void {} + // properties + foo.x = 1; + ~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.y = 1; + ~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + // keywords + foo.break = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.case = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.catch = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.class = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.const = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.continue = 1; + ~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.debugger = 1; + ~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.default = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.delete = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.do = 1; + ~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.else = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.enum = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.export = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.extends = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.false = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.finally = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.for = 1; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.function = 1; + ~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.if = 1; + ~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.import = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.in = 1; + ~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.instanceof = 1; + ~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.new = 1; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.null = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.return = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.super = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.switch = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.this = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.throw = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.true = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.try = 1; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.typeof = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.var = 1; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.void = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.while = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.with = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.implements = 1; + ~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.interface = 1; + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.let = 1; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.package = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.private = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.protected = 1; + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.public = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.static = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.yield = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.abstract = 1; + ~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.as = 1; + ~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.asserts = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.any = 1; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.async = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.await = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.boolean = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.constructor = 1; + ~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.declare = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.get = 1; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.infer = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.is = 1; + ~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.keyof = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.module = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.namespace = 1; + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.never = 1; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.readonly = 1; + ~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.require = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.number = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.object = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.set = 1; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.string = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.symbol = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.type = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.undefined = 1; + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.unique = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.unknown = 1; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.from = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.global = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.bigint = 1; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.of = 1; + ~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts new file mode 100644 index 0000000000000..d8d9720d3cbff --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts @@ -0,0 +1,140 @@ +//// [tests/cases/compiler/numericEnumMappedType.ts] //// + +//// [numericEnumMappedType.ts] +// Repro from #31771 + +enum E1 { ONE, TWO, THREE } +declare enum E2 { ONE, TWO, THREE } + +type Bins1 = { [k in E1]?: string; } +type Bins2 = { [k in E2]?: string; } + +const b1: Bins1 = {}; +const b2: Bins2 = {}; + +const e1: E1 = E1.ONE; +const e2: E2 = E2.ONE; + +b1[1] = "a"; +b1[e1] = "b"; + +b2[1] = "a"; +b2[e2] = "b"; + +// Multiple numeric enum types accrue to the same numeric index signature in a mapped type + +declare function val(): number; + +enum N1 { A = val(), B = val() } +enum N2 { C = val(), D = val() } + +type T1 = { [K in N1 | N2]: K }; + +// Enum types with string valued members are always literal enum types and therefore +// ONE and TWO below are not computed members but rather just numerically valued members +// with auto-incremented values. + +declare enum E { ONE, TWO, THREE = 'x' } +const e: E = E.ONE; +const x: E.ONE = e; + + +/// [Declarations] //// + + + +//// [numericEnumMappedType.d.ts] +declare enum E1 { + ONE = 0, + TWO = 1, + THREE = 2 +} +declare enum E2 { + ONE, + TWO, + THREE +} +type Bins1 = { + [k in E1]?: string; +}; +type Bins2 = { + [k in E2]?: string; +}; +declare const b1: Bins1; +declare const b2: Bins2; +declare const e1: E1; +declare const e2: E2; +declare function val(): number; +declare enum N1 { + A, + B +} +declare enum N2 { + C, + D +} +type T1 = { + [K in N1 | N2]: K; +}; +declare enum E { + ONE, + TWO, + THREE = "x" +} +declare const e: E; +declare const x: E.ONE; +//# sourceMappingURL=numericEnumMappedType.d.ts.map +/// [Errors] //// + +numericEnumMappedType.ts(25,11): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +numericEnumMappedType.ts(25,22): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +numericEnumMappedType.ts(26,11): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +numericEnumMappedType.ts(26,22): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + + +==== numericEnumMappedType.ts (4 errors) ==== + // Repro from #31771 + + enum E1 { ONE, TWO, THREE } + declare enum E2 { ONE, TWO, THREE } + + type Bins1 = { [k in E1]?: string; } + type Bins2 = { [k in E2]?: string; } + + const b1: Bins1 = {}; + const b2: Bins2 = {}; + + const e1: E1 = E1.ONE; + const e2: E2 = E2.ONE; + + b1[1] = "a"; + b1[e1] = "b"; + + b2[1] = "a"; + b2[e2] = "b"; + + // Multiple numeric enum types accrue to the same numeric index signature in a mapped type + + declare function val(): number; + + enum N1 { A = val(), B = val() } + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + enum N2 { C = val(), D = val() } + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + + type T1 = { [K in N1 | N2]: K }; + + // Enum types with string valued members are always literal enum types and therefore + // ONE and TWO below are not computed members but rather just numerically valued members + // with auto-incremented values. + + declare enum E { ONE, TWO, THREE = 'x' } + const e: E = E.ONE; + const x: E.ONE = e; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralComputedNameNoDeclarationError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralComputedNameNoDeclarationError.d.ts new file mode 100644 index 0000000000000..b49d80e7d805f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralComputedNameNoDeclarationError.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts] //// + +//// [objectLiteralComputedNameNoDeclarationError.ts] +const Foo = { + BANANA: 'banana' as 'banana', +} + +export const Baa = { + [Foo.BANANA]: 1 +}; + +/// [Declarations] //// + + + +//// [objectLiteralComputedNameNoDeclarationError.d.ts] +declare const Foo: { + BANANA: "banana"; +}; +export declare const Baa: { + [Foo.BANANA]: number; +}; +export {}; +//# sourceMappingURL=objectLiteralComputedNameNoDeclarationError.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map new file mode 100644 index 0000000000000..7c85f14be7b07 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map @@ -0,0 +1,102 @@ +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + +//// [optionalMethods.ts] +interface Foo { + a: number; + b?: number; + f(): number; + g?(): number; +} + +function test1(x: Foo): void { + x.a; + x.b; + x.f; + x.g; + let f1 = x.f(); + let g1 = x.g && x.g(); + let g2 = x.g ? x.g() : 0; +} + +class Bar { + a: number; + b?: number; + c? = 2; + constructor(public d?: number, public e = 10) {} + f(): number { + return 1; + } + g?(): number; // Body of optional method can be omitted + h?(): number { + return 2; + } +} + +function test2(x: Bar): void { + x.a; + x.b; + x.c; + x.d; + x.e; + x.f; + x.g; + let f1 = x.f(); + let g1 = x.g && x.g(); + let g2 = x.g ? x.g() : 0; + let h1 = x.h && x.h(); + let h2 = x.h ? x.h() : 0; +} + +class Base { + a?: number; + f?(): number; +} + +class Derived extends Base { + a = 1; + f(): number { return 1; } +} + + +/// [Declarations] //// + + + +//// [optionalMethods.d.ts] +interface Foo { + a: number; + b?: number; + f(): number; + g?(): number; +} +declare function test1(x: Foo): void; +declare class Bar { + d?: number | undefined; + e: number; + a: number; + b?: number; + c?: number | undefined; + constructor(d?: number | undefined, e?: number); + f(): number; + g?(): number; + h?(): number; +} +declare function test2(x: Bar): void; +declare class Base { + a?: number; + f?(): number; +} +declare class Derived extends Base { + a: number; + f(): number; +} +//# sourceMappingURL=optionalMethods.d.ts.map + +/// [Declarations Maps] //// + + +//// [optionalMethods.d.ts.map] +{"version":3,"file":"optionalMethods.d.ts","sourceRoot":"","sources":["optionalMethods.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,IAAI,MAAM,CAAC;IACZ,CAAC,CAAC,IAAI,MAAM,CAAC;CAChB;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAQ3B;AAED,cAAM,GAAG;IAIc,CAAC,CAAC,EAAE,MAAM;IAAS,CAAC;IAHvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,qBAAK;gBACY,CAAC,CAAC,EAAE,MAAM,YAAA,EAAS,CAAC,SAAK;IAC5C,CAAC,IAAI,MAAM;IAGX,CAAC,CAAC,IAAI,MAAM;IACZ,CAAC,CAAC,IAAI,MAAM;CAGf;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAa3B;AAED,cAAM,IAAI;IACN,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,IAAI,MAAM;CACf;AAED,cAAM,OAAQ,SAAQ,IAAI;IACtB,CAAC,SAAK;IACN,CAAC,IAAI,MAAM;CACd"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogbnVtYmVyOw0KICAgIGI/OiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KfQ0KZGVjbGFyZSBmdW5jdGlvbiB0ZXN0MSh4OiBGb28pOiB2b2lkOw0KZGVjbGFyZSBjbGFzcyBCYXIgew0KICAgIGQ/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgZTogbnVtYmVyOw0KICAgIGE6IG51bWJlcjsNCiAgICBiPzogbnVtYmVyOw0KIC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iAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalProperties01.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalProperties01.d.ts.map new file mode 100644 index 0000000000000..fc46783214126 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalProperties01.d.ts.map @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts] //// + +//// [optionalProperties01.ts] +interface Foo { + required1: string; + required2: string; + optional?: string; +} + +const foo1 = { required1: "hello" } as Foo; +const foo2 = { required1: "hello", optional: "bar" } as Foo; + + +/// [Declarations] //// + + + +//// [optionalProperties01.d.ts] +interface Foo { + required1: string; + required2: string; + optional?: string; +} +declare const foo1: Foo; +declare const foo2: Foo; +//# sourceMappingURL=optionalProperties01.d.ts.map + +/// [Declarations Maps] //// + + +//// [optionalProperties01.d.ts.map] +{"version":3,"file":"optionalProperties01.d.ts","sourceRoot":"","sources":["optionalProperties01.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,IAAI,EAA6B,GAAG,CAAC;AAC3C,QAAA,MAAM,IAAI,EAA8C,GAAG,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgcmVxdWlyZWQxOiBzdHJpbmc7DQogICAgcmVxdWlyZWQyOiBzdHJpbmc7DQogICAgb3B0aW9uYWw/OiBzdHJpbmc7DQp9DQpkZWNsYXJlIGNvbnN0IGZvbzE6IEZvbzsNCmRlY2xhcmUgY29uc3QgZm9vMjogRm9vOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9b3B0aW9uYWxQcm9wZXJ0aWVzMDEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uYWxQcm9wZXJ0aWVzMDEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm9wdGlvbmFsUHJvcGVydGllczAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFVBQVUsR0FBRztJQUNYLFNBQVMsRUFBRSxNQUFNLENBQUM7SUFDbEIsU0FBUyxFQUFFLE1BQU0sQ0FBQztJQUNsQixRQUFRLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDbkI7QUFFRCxRQUFBLE1BQU0sSUFBSSxFQUE2QixHQUFHLENBQUM7QUFDM0MsUUFBQSxNQUFNLElBQUksRUFBOEMsR0FBRyxDQUFDIn0=,aW50ZXJmYWNlIEZvbyB7CiAgcmVxdWlyZWQxOiBzdHJpbmc7CiAgcmVxdWlyZWQyOiBzdHJpbmc7CiAgb3B0aW9uYWw/OiBzdHJpbmc7Cn0KCmNvbnN0IGZvbzEgPSB7IHJlcXVpcmVkMTogImhlbGxvIiB9IGFzIEZvbzsKY29uc3QgZm9vMiA9IHsgcmVxdWlyZWQxOiAiaGVsbG8iLCBvcHRpb25hbDogImJhciIgfSBhcyBGb287Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parameterDestructuringObjectLiteral.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parameterDestructuringObjectLiteral.d.ts.map new file mode 100644 index 0000000000000..723f093a8dd49 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parameterDestructuringObjectLiteral.d.ts.map @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/parameterDestructuringObjectLiteral.ts] //// + +//// [parameterDestructuringObjectLiteral.ts] +// Repro from #22644 + +const fn1 = (options: { headers?: {} }): void => { }; +fn1({ headers: { foo: 1 } }); + +const fn2 = ({ headers = {} }: { + headers?: {}; + }): void => { }; +fn2({ headers: { foo: 1 } }); + + +/// [Declarations] //// + + + +//// [parameterDestructuringObjectLiteral.d.ts] +declare const fn1: (options: { + headers?: {}; +}) => void; +declare const fn2: ({ headers }: { + headers?: {}; +}) => void; +//# sourceMappingURL=parameterDestructuringObjectLiteral.d.ts.map + +/// [Declarations Maps] //// + + +//// [parameterDestructuringObjectLiteral.d.ts.map] +{"version":3,"file":"parameterDestructuringObjectLiteral.d.ts","sourceRoot":"","sources":["parameterDestructuringObjectLiteral.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG,GAAI,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,EAAE,CAAA;CAAE,KAAG,IAAW,CAAC;AAGrD,QAAA,MAAM,GAAG,GAAI,EAAE,OAAY,EAAE,EAAE;IACvB,OAAO,CAAC,EAAE,EAAE,CAAC;CAChB,KAAG,IAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmbjE6IChvcHRpb25zOiB7DQogICAgaGVhZGVycz86IHt9Ow0KfSkgPT4gdm9pZDsNCmRlY2xhcmUgY29uc3QgZm4yOiAoeyBoZWFkZXJzIH06IHsNCiAgICBoZWFkZXJzPzoge307DQp9KSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cGFyYW1ldGVyRGVzdHJ1Y3R1cmluZ09iamVjdExpdGVyYWwuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1ldGVyRGVzdHJ1Y3R1cmluZ09iamVjdExpdGVyYWwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhcmFtZXRlckRlc3RydWN0dXJpbmdPYmplY3RMaXRlcmFsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsTUFBTSxHQUFHLEdBQUksT0FBTyxFQUFFO0lBQUUsT0FBTyxDQUFDLEVBQUUsRUFBRSxDQUFBO0NBQUUsS0FBRyxJQUFXLENBQUM7QUFHckQsUUFBQSxNQUFNLEdBQUcsR0FBSSxFQUFFLE9BQVksRUFBRSxFQUFFO0lBQ3ZCLE9BQU8sQ0FBQyxFQUFFLEVBQUUsQ0FBQztDQUNoQixLQUFHLElBQVcsQ0FBQyJ9,Ly8gUmVwcm8gZnJvbSAjMjI2NDQKCmNvbnN0IGZuMSA9IChvcHRpb25zOiB7IGhlYWRlcnM/OiB7fSB9KTogdm9pZCA9PiB7IH07CmZuMSh7IGhlYWRlcnM6IHsgZm9vOiAxIH0gfSk7Cgpjb25zdCBmbjIgPSAoeyBoZWFkZXJzID0ge30gfTogewogICAgICAgIGhlYWRlcnM/OiB7fTsKICAgIH0pOiB2b2lkID0+IHsgfTsKZm4yKHsgaGVhZGVyczogeyBmb286IDEgfSB9KTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map new file mode 100644 index 0000000000000..cc5e4ad7c3c27 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts] //// + +//// [parenthesisDoesNotBlockAliasSymbolCreation.ts] +export type InvalidKeys = { [P in K]? : never }; +export type InvalidKeys2 = ( + { [P in K]? : never } +); + +export type A = ( + T & InvalidKeys<"a"> +); +export type A2 = ( + T & InvalidKeys2<"a"> +); + +export const a = null as A<{ x : number }>; +export const a2 = null as A2<{ x : number }>; +export const a3 = null as { x : number } & InvalidKeys<"a">; +export const a4 = null as { x : number } & InvalidKeys2<"a">; + + +/// [Declarations] //// + + + +//// [parenthesisDoesNotBlockAliasSymbolCreation.d.ts] +export type InvalidKeys = { + [P in K]?: never; +}; +export type InvalidKeys2 = ({ + [P in K]?: never; +}); +export type A = (T & InvalidKeys<"a">); +export type A2 = (T & InvalidKeys2<"a">); +export declare const a: A<{ + x: number; +}>; +export declare const a2: A2<{ + x: number; +}>; +export declare const a3: { + x: number; +} & InvalidKeys<"a">; +export declare const a4: { + x: number; +} & InvalidKeys2<"a">; +//# sourceMappingURL=parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map + +/// [Declarations Maps] //// + + +//// [parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map] +{"version":3,"file":"parenthesisDoesNotBlockAliasSymbolCreation.d.ts","sourceRoot":"","sources":["parenthesisDoesNotBlockAliasSymbolCreation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAC,MAAM,GAAC,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAG,KAAK;CAAE,CAAC;AAChF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAC,MAAM,GAAC,MAAM,IAAI,CACvD;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAG,KAAK;CAAE,CACxB,CAAC;AAEF,MAAM,MAAM,CAAC,CAAC,CAAC,IAAI,CACf,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CACvB,CAAC;AACF,MAAM,MAAM,EAAE,CAAC,CAAC,IAAI,CAChB,CAAC,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UFNLENBQUE7Q0FBRSxDQUFDLENBQUM7QUFDN0MsZUFBTyxNQUFNLEVBQUUsRUFBVztJQUFFLENBQUMsRUFBRyxNQUFNLENBQUE7Q0FBRSxHQUFHLFdBQVcsQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUM1RCxlQUFPLE1BQU0sRUFBRSxFQUFXO0lBQUUsQ0FBQyxFQUFHLE1BQU0sQ0FBQTtDQUFFLEdBQUcsWUFBWSxDQUFDLEdBQUcsQ0FBQyxDQUFDIn0=,ZXhwb3J0IHR5cGUgSW52YWxpZEtleXM8SyBleHRlbmRzIHN0cmluZ3xudW1iZXJ8c3ltYm9sPiA9IHsgW1AgaW4gS10/IDogbmV2ZXIgfTsKZXhwb3J0IHR5cGUgSW52YWxpZEtleXMyPEsgZXh0ZW5kcyBzdHJpbmd8bnVtYmVyfHN5bWJvbD4gPSAoCiAgICB7IFtQIGluIEtdPyA6IG5ldmVyIH0KKTsKCmV4cG9ydCB0eXBlIEE8VD4gPSAoCiAgICBUICYgSW52YWxpZEtleXM8ImEiPgopOwpleHBvcnQgdHlwZSBBMjxUPiA9ICgKICAgIFQgJiBJbnZhbGlkS2V5czI8ImEiPgopOwoKZXhwb3J0IGNvbnN0IGEgPSBudWxsIGFzIEE8eyB4IDogbnVtYmVyIH0+OwpleHBvcnQgY29uc3QgYTIgPSBudWxsIGFzIEEyPHsgeCA6IG51bWJlciB9PjsKZXhwb3J0IGNvbnN0IGEzID0gbnVsbCBhcyB7IHggOiBudW1iZXIgfSAmIEludmFsaWRLZXlzPCJhIj47CmV4cG9ydCBjb25zdCBhNCA9IG51bGwgYXMgeyB4IDogbnVtYmVyIH0gJiBJbnZhbGlkS2V5czI8ImEiPjsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportWrittenCorrectlyInDeclaration.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportWrittenCorrectlyInDeclaration.d.ts.map new file mode 100644 index 0000000000000..068322c1e1e90 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportWrittenCorrectlyInDeclaration.d.ts.map @@ -0,0 +1,69 @@ +//// [tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts] //// + +//// [ThingA.ts] +// https://github.com/Microsoft/TypeScript/issues/8612 +export class ThingA { } + +//// [ThingB.ts] +export class ThingB { } + +//// [Things.ts] +export {ThingA} from "./ThingA"; +export {ThingB} from "./ThingB"; + +//// [Test.ts] +import * as things from "./Things"; + +export class Test { + public method = (input: things.ThingA): void => { }; +} + +/// [Declarations] //// + + + +//// [Test.d.ts] +import * as things from "./Things"; +export declare class Test { + method: (input: things.ThingA) => void; +} +//# sourceMappingURL=Test.d.ts.map +//// [ThingA.d.ts] +export declare class ThingA { +} +//# sourceMappingURL=ThingA.d.ts.map +//// [ThingB.d.ts] +export declare class ThingB { +} +//# sourceMappingURL=ThingB.d.ts.map +//// [Things.d.ts] +export { ThingA } from "./ThingA"; +export { ThingB } from "./ThingB"; +//# sourceMappingURL=Things.d.ts.map + +/// [Declarations Maps] //// + + +//// [Test.d.ts.map] +{"version":3,"file":"Test.d.ts","sourceRoot":"","sources":["Test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACN,MAAM,GAAI,KAAK,EAAE,MAAM,CAAC,MAAM,KAAG,IAAI,CAAS;CACxD"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vVGhpbmdzIjsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIFRlc3Qgew0KICAgIG1ldGhvZDogKGlucHV0OiB0aGluZ3MuVGhpbmdBKSA9PiB2b2lkOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9VGVzdC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGVzdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiVGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssTUFBTSxNQUFNLFVBQVUsQ0FBQztBQUVuQyxxQkFBYSxJQUFJO0lBQ04sTUFBTSxHQUFJLEtBQUssRUFBRSxNQUFNLENBQUMsTUFBTSxLQUFHLElBQUksQ0FBUztDQUN4RCJ9,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vVGhpbmdzIjsKCmV4cG9ydCBjbGFzcyBUZXN0IHsKICAgIHB1YmxpYyBtZXRob2QgPSAoaW5wdXQ6IHRoaW5ncy5UaGluZ0EpOiB2b2lkICA9PiB7IH07Cn0= + + +//// [ThingA.d.ts.map] +{"version":3,"file":"ThingA.d.ts","sourceRoot":"","sources":["ThingA.ts"],"names":[],"mappings":"AACA,qBAAa,MAAM;CAAI"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgVGhpbmdBIHsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPVRoaW5nQS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGhpbmdBLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJUaGluZ0EudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EscUJBQWEsTUFBTTtDQUFJIn0=,Ly8gaHR0cHM6Ly9naXRodWIuY29tL01pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy84NjEyCmV4cG9ydCBjbGFzcyBUaGluZ0EgeyB9IAo= + + +//// [ThingB.d.ts.map] +{"version":3,"file":"ThingB.d.ts","sourceRoot":"","sources":["ThingB.ts"],"names":[],"mappings":"AAAA,qBAAa,MAAM;CAAI"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgVGhpbmdCIHsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPVRoaW5nQi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGhpbmdCLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJUaGluZ0IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEscUJBQWEsTUFBTTtDQUFJIn0=,ZXhwb3J0IGNsYXNzIFRoaW5nQiB7IH0K + + +//// [Things.d.ts.map] +{"version":3,"file":"Things.d.ts","sourceRoot":"","sources":["Things.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHsgVGhpbmdBIH0gZnJvbSAiLi9UaGluZ0EiOw0KZXhwb3J0IHsgVGhpbmdCIH0gZnJvbSAiLi9UaGluZ0IiOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9VGhpbmdzLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGhpbmdzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJUaGluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLE1BQU0sRUFBQyxNQUFNLFVBQVUsQ0FBQztBQUNoQyxPQUFPLEVBQUMsTUFBTSxFQUFDLE1BQU0sVUFBVSxDQUFDIn0=,ZXhwb3J0IHtUaGluZ0F9IGZyb20gIi4vVGhpbmdBIjsKZXhwb3J0IHtUaGluZ0J9IGZyb20gIi4vVGhpbmdCIjsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/renamingDestructuredPropertyInFunctionType.d.ts new file mode 100644 index 0000000000000..73bd5f979cbd2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/renamingDestructuredPropertyInFunctionType.d.ts @@ -0,0 +1,405 @@ +//// [tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts] //// + +//// [renamingDestructuredPropertyInFunctionType.ts] +// GH#37454, GH#41044 + +type O = { a?: string; b: number; c: number; }; +type F1 = (arg: number) => any; // OK +type F2 = ({ a: string }: O) => any; // Error +type F3 = ({ a: string, b, c }: O) => any; // Error +type F4 = ({ a: string }: O) => any; // Error +type F5 = ({ a: string, b, c }: O) => any; // Error +type F6 = ({ a: string }: { + a: any; +}) => typeof string; // OK +type F7 = ({ a: string, b: number }: { + a: any; + b: any; +}) => typeof number; // Error +type F8 = ({ a, b: number }: { + a: any; + b: any; +}) => typeof number; // OK +type F9 = ([a, b, c]: [ + any, + any, + any +]) => void; // OK + +type G1 = new (arg: number) => any; // OK +type G2 = new ({ a: string }: O) => any; // Error +type G3 = new ({ a: string, b, c }: O) => any; // Error +type G4 = new ({ a: string }: O) => any; // Error +type G5 = new ({ a: string, b, c }: O) => any; // Error +type G6 = new ({ a: string }: { + a: any; + }) => typeof string; // OK +type G7 = new ({ a: string, b: number }: { + a: any; + b: any; + }) => typeof number; // Error +type G8 = new ({ a, b: number }: { + a: any; + b: any; + }) => typeof number; // OK +type G9 = new ([a, b, c]: [ + any, + any, + any + ]) => void; // OK + +// Below are Error but renaming is retained in declaration emit, +// since elinding it would leave invalid syntax. +type F10 = ({ "a": string }: { + a: any; +}) => void; // Error +type F11 = ({ 2: string }: { + 2: any; +}) => void; // Error +type F12 = ({ ["a"]: string }: O) => void; // Error +type F13 = ({ [2]: string }: { + 2: any; +}) => void; // Error +type G10 = new ({ "a": string }: { + a: any; + }) => void; // Error +type G11 = new ({ 2: string }: { + 2: any; + }) => void; // Error +type G12 = new ({ ["a"]: string }: O) => void; // Error +type G13 = new ({ [2]: string }: { + 2: any; + }) => void; // Error + +interface I { + method1(arg: number): any; // OK + method2({ a: string }: { + a: any; + }): any; // Error + + (arg: number): any; // OK + ({ a: string }: { + a: any; + }): any; // Error + + new (arg: number): any; // OK + new ({ a: string }: { + a: any; + }): any; // Error +} + +// Below are OK but renaming should be removed from declaration emit +function f1({ a: string }: O): void { } +const f2 = function({ a: string }: O): void { }; +const f3 = ({ a: string, b, c }: O): void => { }; +const f4 = function({ a: string }: O): typeof string { return string; }; +const f5 = ({ a: string, b, c }: O): typeof string => ''; +const obj1 = { + method({ a: string }: O): void { } +}; +const obj2 = { + method({ a: string }: O): typeof string { return string; } +}; +function f6({ a: string = "" }: O): void { } +const f7 = ({ a: string = "", b, c }: O): void => { }; +const f8 = ({ "a": string }: O): void => { }; +function f9 ({ 2: string }: { + 2: any; + }): void { }; +function f10 ({ ["a"]: string }: O): void { }; +const f11 = ({ [2]: string }: { + 2: any; + }): void => { }; + +// In below case `string` should be kept because it is used +function f12({ a: string = "" }: O): typeof string { return "a"; } + +/// [Declarations] //// + + + +//// [renamingDestructuredPropertyInFunctionType.d.ts] +type O = { + a?: string; + b: number; + c: number; +}; +type F1 = (arg: number) => any; +type F2 = ({ a: string }: O) => any; +type F3 = ({ a: string, b, c }: O) => any; +type F4 = ({ a: string }: O) => any; +type F5 = ({ a: string, b, c }: O) => any; +type F6 = ({ a: string }: { + a: any; +}) => typeof string; +type F7 = ({ a: string, b: number }: { + a: any; + b: any; +}) => typeof number; +type F8 = ({ a, b: number }: { + a: any; + b: any; +}) => typeof number; +type F9 = ([a, b, c]: [ + any, + any, + any +]) => void; +type G1 = new (arg: number) => any; +type G2 = new ({ a: string }: O) => any; +type G3 = new ({ a: string, b, c }: O) => any; +type G4 = new ({ a: string }: O) => any; +type G5 = new ({ a: string, b, c }: O) => any; +type G6 = new ({ a: string }: { + a: any; +}) => typeof string; +type G7 = new ({ a: string, b: number }: { + a: any; + b: any; +}) => typeof number; +type G8 = new ({ a, b: number }: { + a: any; + b: any; +}) => typeof number; +type G9 = new ([a, b, c]: [ + any, + any, + any +]) => void; +type F10 = ({ "a": string }: { + a: any; +}) => void; +type F11 = ({ 2: string }: { + 2: any; +}) => void; +type F12 = ({ ["a"]: string }: O) => void; +type F13 = ({ [2]: string }: { + 2: any; +}) => void; +type G10 = new ({ "a": string }: { + a: any; +}) => void; +type G11 = new ({ 2: string }: { + 2: any; +}) => void; +type G12 = new ({ ["a"]: string }: O) => void; +type G13 = new ({ [2]: string }: { + 2: any; +}) => void; +interface I { + method1(arg: number): any; + method2({ a: string }: { + a: any; + }): any; + (arg: number): any; + ({ a: string }: { + a: any; + }): any; + new (arg: number): any; + new ({ a: string }: { + a: any; + }): any; +} +declare function f1({ a: string }: O): void; +declare const f2: ({ a: string }: O) => void; +declare const f3: ({ a: string, b, c }: O) => void; +declare const f4: ({ a: string }: O) => typeof string; +declare const f5: ({ a: string, b, c }: O) => typeof string; +declare const obj1: { + method({ a: string }: O): void; +}; +declare const obj2: { + method({ a: string }: O): typeof string; +}; +declare function f6({ a: string }: O): void; +declare const f7: ({ a: string, b, c }: O) => void; +declare const f8: ({ "a": string }: O) => void; +declare function f9({ 2: string }: { + 2: any; +}): void; +declare function f10({ ["a"]: string }: O): void; +declare const f11: ({ [2]: string }: { + 2: any; +}) => void; +declare function f12({ a: string }: O): typeof string; +//# sourceMappingURL=renamingDestructuredPropertyInFunctionType.d.ts.map +/// [Errors] //// + +renamingDestructuredPropertyInFunctionType.ts(5,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(6,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(7,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(8,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(12,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(27,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(28,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(29,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(30,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(34,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(50,20): error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(53,18): error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(56,22): error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(57,20): error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(60,24): error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(63,22): error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(66,26): error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(67,24): error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(73,16): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(78,9): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(83,13): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + + +==== renamingDestructuredPropertyInFunctionType.ts (21 errors) ==== + // GH#37454, GH#41044 + + type O = { a?: string; b: number; c: number; }; + type F1 = (arg: number) => any; // OK + type F2 = ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F3 = ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F4 = ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F5 = ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F6 = ({ a: string }: { + a: any; + }) => typeof string; // OK + type F7 = ({ a: string, b: number }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + b: any; + }) => typeof number; // Error + type F8 = ({ a, b: number }: { + a: any; + b: any; + }) => typeof number; // OK + type F9 = ([a, b, c]: [ + any, + any, + any + ]) => void; // OK + + type G1 = new (arg: number) => any; // OK + type G2 = new ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G3 = new ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G4 = new ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G5 = new ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G6 = new ({ a: string }: { + a: any; + }) => typeof string; // OK + type G7 = new ({ a: string, b: number }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + b: any; + }) => typeof number; // Error + type G8 = new ({ a, b: number }: { + a: any; + b: any; + }) => typeof number; // OK + type G9 = new ([a, b, c]: [ + any, + any, + any + ]) => void; // OK + + // Below are Error but renaming is retained in declaration emit, + // since elinding it would leave invalid syntax. + type F10 = ({ "a": string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? + a: any; + }) => void; // Error + type F11 = ({ 2: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? + 2: any; + }) => void; // Error + type F12 = ({ ["a"]: string }: O) => void; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? + type F13 = ({ [2]: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? + 2: any; + }) => void; // Error + type G10 = new ({ "a": string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? + a: any; + }) => void; // Error + type G11 = new ({ 2: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? + 2: any; + }) => void; // Error + type G12 = new ({ ["a"]: string }: O) => void; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? + type G13 = new ({ [2]: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? + 2: any; + }) => void; // Error + + interface I { + method1(arg: number): any; // OK + method2({ a: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + }): any; // Error + + (arg: number): any; // OK + ({ a: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + }): any; // Error + + new (arg: number): any; // OK + new ({ a: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + }): any; // Error + } + + // Below are OK but renaming should be removed from declaration emit + function f1({ a: string }: O): void { } + const f2 = function({ a: string }: O): void { }; + const f3 = ({ a: string, b, c }: O): void => { }; + const f4 = function({ a: string }: O): typeof string { return string; }; + const f5 = ({ a: string, b, c }: O): typeof string => ''; + const obj1 = { + method({ a: string }: O): void { } + }; + const obj2 = { + method({ a: string }: O): typeof string { return string; } + }; + function f6({ a: string = "" }: O): void { } + const f7 = ({ a: string = "", b, c }: O): void => { }; + const f8 = ({ "a": string }: O): void => { }; + function f9 ({ 2: string }: { + 2: any; + }): void { }; + function f10 ({ ["a"]: string }: O): void { }; + const f11 = ({ [2]: string }: { + 2: any; + }): void => { }; + + // In below case `string` should be kept because it is used + function f12({ a: string = "" }: O): typeof string { return "a"; } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit10.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit10.d.ts.map new file mode 100644 index 0000000000000..49397cd9e12af --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit10.d.ts.map @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts] //// + +//// [symbolDeclarationEmit10.ts] +var obj = { + get [Symbol.isConcatSpreadable](): string { return '' }, + set [Symbol.isConcatSpreadable](x) { } +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit10.d.ts] +declare var obj: { + [Symbol.isConcatSpreadable]: string; +}; +//# sourceMappingURL=symbolDeclarationEmit10.d.ts.map + +/// [Declarations Maps] //// + + +//// [symbolDeclarationEmit10.d.ts.map] +{"version":3,"file":"symbolDeclarationEmit10.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit10.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;IACC,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAI,MAAM;CAE5C,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdOiBzdHJpbmc7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0MTAuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0MTAuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN5bWJvbERlY2xhcmF0aW9uRW1pdDEwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxHQUFHO0lBQ0MsQ0FBQyxNQUFNLENBQUMsa0JBQWtCLENBQUMsRUFBSSxNQUFNO0NBRTVDLENBQUEifQ==,dmFyIG9iaiA9IHsKICAgIGdldCBbU3ltYm9sLmlzQ29uY2F0U3ByZWFkYWJsZV0oKTogc3RyaW5nIHsgcmV0dXJuICcnIH0sCiAgICBzZXQgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdKHgpIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts new file mode 100644 index 0000000000000..856b849355be2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts @@ -0,0 +1,65 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// + +//// [symbolDeclarationEmit12.ts] +module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + set [Symbol.toPrimitive](x: I) { } + } +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit12.d.ts] +declare namespace M { + interface I { + } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I): invalid; + [Symbol.isConcatSpreadable](): I; + get [Symbol.toPrimitive](): invalid; + set [Symbol.toPrimitive](x: I); + } + export {}; +} +//# sourceMappingURL=symbolDeclarationEmit12.d.ts.map +/// [Errors] //// + +symbolDeclarationEmit12.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. +symbolDeclarationEmit12.ts(9,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +==== symbolDeclarationEmit12.ts (4 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 symbolDeclarationEmit12.ts:5:9: Add a return type to the method + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 symbolDeclarationEmit12.ts:9:13: Add a return type to the get accessor declaration. + set [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit8.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit8.d.ts.map new file mode 100644 index 0000000000000..9b52f8d138e2d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit8.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts] //// + +//// [symbolDeclarationEmit8.ts] +var obj = { + [Symbol.isConcatSpreadable]: 0 +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit8.d.ts] +declare var obj: { + [Symbol.isConcatSpreadable]: number; +}; +//# sourceMappingURL=symbolDeclarationEmit8.d.ts.map + +/// [Declarations Maps] //// + + +//// [symbolDeclarationEmit8.d.ts.map] +{"version":3,"file":"symbolDeclarationEmit8.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit8.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;IACH,CAAC,MAAM,CAAC,kBAAkB,CAAC;CAC9B,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0OC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0OC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sRGVjbGFyYXRpb25FbWl0OC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLElBQUksR0FBRztJQUNILENBQUMsTUFBTSxDQUFDLGtCQUFrQixDQUFDO0NBQzlCLENBQUEifQ==,dmFyIG9iaiA9IHsKICAgIFtTeW1ib2wuaXNDb25jYXRTcHJlYWRhYmxlXTogMAp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit9.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit9.d.ts.map new file mode 100644 index 0000000000000..7df855c8d594d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit9.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts] //// + +//// [symbolDeclarationEmit9.ts] +var obj = { + [Symbol.isConcatSpreadable](): void { } +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit9.d.ts] +declare var obj: { + [Symbol.isConcatSpreadable](): void; +}; +//# sourceMappingURL=symbolDeclarationEmit9.d.ts.map + +/// [Declarations Maps] //// + + +//// [symbolDeclarationEmit9.d.ts.map] +{"version":3,"file":"symbolDeclarationEmit9.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit9.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;IACH,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,IAAI;CACtC,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdKCk6IHZvaWQ7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0OS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0OS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sRGVjbGFyYXRpb25FbWl0OS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLElBQUksR0FBRztJQUNILENBQUMsTUFBTSxDQUFDLGtCQUFrQixDQUFDLElBQUksSUFBSTtDQUN0QyxDQUFBIn0=,dmFyIG9iaiA9IHsKICAgIFtTeW1ib2wuaXNDb25jYXRTcHJlYWRhYmxlXSgpOiB2b2lkIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts new file mode 100644 index 0000000000000..9f0e53d31e04a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// + +//// [index.ts] +import { styles } from "package-a"; + +export function getStyles() { + return styles; +} + +//// [index.d.ts] +export declare const styles: import("styled-components").InterpolationValue[]; + +//// [package.json] +{ + "name": "styled-components", + "version": "3.3.3", + "typings": "typings/styled-components.d.ts" +} + +//// [styled-components.d.ts] +export interface InterpolationValue {} + +/// [Declarations] //// + + + +//// [Folder/monorepo/core/index.d.ts] +export declare function getStyles(): invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +Folder/monorepo/core/index.ts(3,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + + +==== Folder/monorepo/core/index.ts (1 errors) ==== + import { styles } from "package-a"; + + export function getStyles() { + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 Folder/monorepo/core/index.ts:3:17: Add a return type to the function declaration. + return styles; + } + +==== Folder/monorepo/package-a/index.d.ts (0 errors) ==== + export declare const styles: import("styled-components").InterpolationValue[]; + +==== Folder/node_modules/styled-components/package.json (0 errors) ==== + { + "name": "styled-components", + "version": "3.3.3", + "typings": "typings/styled-components.d.ts" + } + +==== Folder/node_modules/styled-components/typings/styled-components.d.ts (0 errors) ==== + export interface InterpolationValue {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map new file mode 100644 index 0000000000000..57805137636fa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts] //// + +//// [symbolObserverMismatchingPolyfillsWorkTogether.ts] +interface SymbolConstructor { + readonly observer: symbol; +} +interface SymbolConstructor { + readonly observer: unique symbol; +} + +const obj = { + [Symbol.observer]: 0 +}; + +/// [Declarations] //// + + + +//// [symbolObserverMismatchingPolyfillsWorkTogether.d.ts] +interface SymbolConstructor { + readonly observer: symbol; +} +interface SymbolConstructor { + readonly observer: unique symbol; +} +declare const obj: { + [Symbol.observer]: number; +}; +//# sourceMappingURL=symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map + +/// [Declarations Maps] //// + + +//// [symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map] +{"version":3,"file":"symbolObserverMismatchingPolyfillsWorkTogether.d.ts","sourceRoot":"","sources":["symbolObserverMismatchingPolyfillsWorkTogether.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B;AACD,UAAU,iBAAiB;IACvB,QAAQ,CAAC,QAAQ,EAAE,OAAO,MAAM,CAAC;CACpC;AAED,QAAA,MAAM,GAAG;IACL,CAAC,MAAM,CAAC,QAAQ,CAAC;CACpB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsNCiAgICByZWFkb25seSBvYnNlcnZlcjogc3ltYm9sOw0KfQ0KaW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsNCiAgICByZWFkb25seSBvYnNlcnZlcjogdW5pcXVlIHN5bWJvbDsNCn0NCmRlY2xhcmUgY29uc3Qgb2JqOiB7DQogICAgW1N5bWJvbC5vYnNlcnZlcl06IG51bWJlcjsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1zeW1ib2xPYnNlcnZlck1pc21hdGNoaW5nUG9seWZpbGxzV29ya1RvZ2V0aGVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sT2JzZXJ2ZXJNaXNtYXRjaGluZ1BvbHlmaWxsc1dvcmtUb2dldGhlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sT2JzZXJ2ZXJNaXNtYXRjaGluZ1BvbHlmaWxsc1dvcmtUb2dldGhlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxVQUFVLGlCQUFpQjtJQUN2QixRQUFRLENBQUMsUUFBUSxFQUFFLE1BQU0sQ0FBQztDQUM3QjtBQUNELFVBQVUsaUJBQWlCO0lBQ3ZCLFFBQVEsQ0FBQyxRQUFRLEVBQUUsT0FBTyxNQUFNLENBQUM7Q0FDcEM7QUFFRCxRQUFBLE1BQU0sR0FBRztJQUNMLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQztDQUNwQixDQUFDIn0=,aW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsKICAgIHJlYWRvbmx5IG9ic2VydmVyOiBzeW1ib2w7Cn0KaW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsKICAgIHJlYWRvbmx5IG9ic2VydmVyOiB1bmlxdWUgc3ltYm9sOwp9Cgpjb25zdCBvYmogPSB7CiAgICBbU3ltYm9sLm9ic2VydmVyXTogMAp9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts new file mode 100644 index 0000000000000..77f41dcc542f0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts @@ -0,0 +1,790 @@ +//// [tests/cases/conformance/types/literal/templateLiteralTypes4.ts] //// + +//// [templateLiteralTypes4.ts] +// infer from number +type TNumber0 = "100" extends `${infer N extends number}` ? N : never; // 100 +type TNumber1 = "-100" extends `${infer N extends number}` ? N : never; // -100 +type TNumber2 = "1.1" extends `${infer N extends number}` ? N : never; // 1.1 +type TNumber3 = "8e-11" extends `${infer N extends number}` ? N : never; // 8e-11 (0.00000000008) +type TNumber4 = "0x10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) +type TNumber5 = "0o10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) +type TNumber6 = "0b10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) +type TNumber7 = "10e2" extends `${infer N extends number}` ? N : never; // number (not round-trippable) +type TNumber8 = "abcd" extends `${infer N extends number}` ? N : never; // never + +// infer from bigint +type TBigInt0 = "100" extends `${infer N extends bigint}` ? N : never; // 100n +type TBigInt1 = "-100" extends `${infer N extends bigint}` ? N : never; // -100n +type TBigInt2 = "0x10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) +type TBigInt3 = "0o10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) +type TBigInt4 = "0b10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) +type TBigInt5 = "1.1" extends `${infer N extends bigint}` ? N : never; // never +type TBigInt6 = "10e2" extends `${infer N extends bigint}` ? N : never; // never +type TBigInt7 = "abcd" extends `${infer N extends bigint}` ? N : never; // never + +// infer from boolean +type TBoolean0 = "true" extends `${infer T extends boolean}` ? T : never; // true +type TBoolean1 = "false" extends `${infer T extends boolean}` ? T : never; // false +type TBoolean2 = "abcd" extends `${infer T extends boolean}` ? T : never; // never + +// infer from null +type TNull0 = "null" extends `${infer T extends null}` ? T : never; // null +type TNull1 = "abcd" extends `${infer T extends null}` ? T : never; // never + +// infer from undefined +type TUndefined0 = "undefined" extends `${infer T extends undefined}` ? T : never; // undefined +type TUndefined1 = "abcd" extends `${infer T extends undefined}` ? T : never; // never + +// infer from literal enums +const enum StringLiteralEnum { Zero = "0", True = "true", False = "false", Undefined = "undefined", Null = "null" } +type TStringLiteralEnum0 = "0" extends `${infer T extends StringLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + +const enum NumberLiteralEnum { Zero, One } +type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; // NumberLiteralEnum.Zero + +// infer from non-literal enums +const enum NonLiteralEnum { Zero = NumberLiteralEnum.Zero, One = NumberLiteralEnum.One } +type TNonLiteralEnum0 = "0" extends `${infer T extends NonLiteralEnum}` ? T : never; // 0 + +// infer using priority: +// string > template-literal > (string-literal | string-literal-enum) > +// number > enum > (number-literal | number-literal-enum) > +// bigint > bigint-literal > +// boolean > (boolean-literal | undefined | null) + +// #region string +// string > string-literal-enum +type PString00 = "0" extends `${infer T extends string | StringLiteralEnum}` ? T : never; // "0" + +// string > number +type PString01 = "0" extends `${infer T extends string | number}` ? T : never; // "0" + +// string > enum +type PString02 = "0" extends `${infer T extends string | NonLiteralEnum}` ? T : never; // "0" + +// string > (number-literal | number-literal-enum) +type PString03 = "0" extends `${infer T extends string | 0}` ? T : never; // "0" +type PString04 = "0" extends `${infer T extends string | NumberLiteralEnum}` ? T : never; // "0" + +// string > bigint +type PString05 = "0" extends `${infer T extends string | bigint}` ? T : never; // "0" + +// string > bigint-literal +type PString06 = "0" extends `${infer T extends string | 0n}` ? T : never; // "0" + +// string > boolean +type PString07 = "true" extends `${infer T extends string | boolean}` ? T : never; // "true" +type PString08 = "false" extends `${infer T extends string | boolean}` ? T : never; // "false" + +// string > (boolean-literal | undefined | null) +type PString09 = "true" extends `${infer T extends string | true}` ? T : never; // "true" +type PString10 = "false" extends `${infer T extends string | false}` ? T : never; // "false" +type PString11 = "undefined" extends `${infer T extends string | undefined}` ? T : never; // "undefined" +type PString12 = "null" extends `${infer T extends string | null}` ? T : never; // "null" +// #endregion string + +// #region template-literal +// template-literal > number +type PTemplate00 = "10" extends `${infer T extends `1${string}` | number}` ? T : never; // "10" + +// template-literal > enum +type PTemplate01 = "10" extends `${infer T extends `1${string}` | NonLiteralEnum}` ? T : never; // "10" + +// template-literal > (number-literal | number-literal-enum) +type PTemplate02 = "10" extends `${infer T extends `1${string}` | 10}` ? T : never; // "10" +type PTemplate03 = "10" extends `${infer T extends `1${string}` | NumberLiteralEnum}` ? T : never; // "10" + +// template-literal > bigint +type PTemplate04 = "10" extends `${infer T extends `1${string}` | bigint}` ? T : never; // "10" + +// template-literal > bigint-literal +type PTemplate05 = "10" extends `${infer T extends `1${string}` | 10n}` ? T : never; // "10" + +// template-literal > boolean +type PTemplate06 = "true" extends `${infer T extends `${string}e` | boolean}` ? T : never; // "true" +type PTemplate07 = "false" extends `${infer T extends `${string}e` | boolean}` ? T : never; // "false" + +// template-literal > (boolean-literal | undefined | null) +type PTemplate08 = "true" extends `${infer T extends `${"t"}${string}` | true}` ? T : never; // "true" +type PTemplate09 = "false" extends `${infer T extends `${"f"}${string}` | false}` ? T : never; // "false" +type PTemplate10 = "undefined" extends `${infer T extends `${"u"}${string}` | undefined}` ? T : never; // "undefined" +type PTemplate11 = "null" extends `${infer T extends `${"n"}${string}` | null}` ? T : never; // "null" +// #endregion template-literal + +// #region string-literal +// string-literal > number +type PStringLiteral00 = "0" extends `${infer T extends "0" | number}` ? T : never; // "0" + +// string-literal > enum +type PStringLiteral01 = "0" extends `${infer T extends "0" | NonLiteralEnum}` ? T : never; // "0" + +// string-literal > (number-literal | number-literal-enum) +type PStringLiteral02 = "0" extends `${infer T extends "0" | 0}` ? T : never; // "0" +type PStringLiteral03 = "0" extends `${infer T extends "0" | NumberLiteralEnum}` ? T : never; // "0" + +// string-literal > bigint +type PStringLiteral04 = "0" extends `${infer T extends "0" | bigint}` ? T : never; // "0" + +// string-literal > bigint-literal +type PStringLiteral05 = "0" extends `${infer T extends "0" | 0n}` ? T : never; // "0" + +// string-literal > boolean +type PStringLiteral06 = "true" extends `${infer T extends "true" | "false" | boolean}` ? T : never; // "true" +type PStringLiteral07 = "false" extends `${infer T extends "true" | "false" | boolean}` ? T : never; // "false" + +// string-literal > (boolean-literal | undefined | null) +type PStringLiteral08 = "true" extends `${infer T extends "true" | true}` ? T : never; // "true" +type PStringLiteral09 = "false" extends `${infer T extends "false" | false}` ? T : never; // "false" +type PStringLiteral10 = "undefined" extends `${infer T extends "undefined" | undefined}` ? T : never; // "undefined" +type PStringLiteral11 = "null" extends `${infer T extends "null" | null}` ? T : never; // "null" +// #endregion string-literal + +// #region string-literal-enum +// string-literal-enum > number +type PStringLiteralEnum00 = "0" extends `${infer T extends StringLiteralEnum | number}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > enum +type PStringLiteralEnum01 = "0" extends `${infer T extends StringLiteralEnum | NonLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > (number-literal | number-literal-enum) +type PStringLiteralEnum02 = "0" extends `${infer T extends StringLiteralEnum | 0}` ? T : never; // StringLiteralEnum.Zero +type PStringLiteralEnum03 = "0" extends `${infer T extends StringLiteralEnum | NumberLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > bigint +type PStringLiteralEnum04 = "0" extends `${infer T extends StringLiteralEnum | bigint}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > bigint-literal +type PStringLiteralEnum05 = "0" extends `${infer T extends StringLiteralEnum | 0n}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > boolean +type PStringLiteralEnum06 = "true" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; // StringLiteralEnum.True +type PStringLiteralEnum07 = "false" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; // StringLiteralEnum.False + +// string-literal-enum > (boolean-literal | undefined | null) +type PStringLiteralEnum08 = "true" extends `${infer T extends StringLiteralEnum | true}` ? T : never; // StringLiteralEnum.True +type PStringLiteralEnum09 = "false" extends `${infer T extends StringLiteralEnum | false}` ? T : never; // StringLiteralEnum.False +type PStringLiteralEnum10 = "undefined" extends `${infer T extends StringLiteralEnum | undefined}` ? T : never; // StringLiteralEnum.Undefined +type PStringLiteralEnum11 = "null" extends `${infer T extends StringLiteralEnum | null}` ? T : never; // StringLiteralEnum.Null +// #endregion string-literal-enum + +// #region number +// number > enum +type PNumber0 = "0" extends `${infer T extends number | NonLiteralEnum}` ? T : never; // 0 + +// number > number-literal-enum +type PNumber1 = "0" extends `${infer T extends number | NumberLiteralEnum}` ? T : never; // 0 + +// number > bigint +type PNumber2 = "0" extends `${infer T extends number | bigint}` ? T : never; // 0 + +// number > bigint-literal +type PNumber3 = "0" extends `${infer T extends number | 0n}` ? T : never; // 0 +// #endregion number + +// #region enum +// enum > number-literal-enum +type PEnum0 = "0" extends `${infer T extends NonLiteralEnum | NumberLiteralEnum}` ? T : never; // 0 + +// enum > bigint +type PEnum1 = "0" extends `${infer T extends NonLiteralEnum | bigint}` ? T : never; // 0 + +// enum > bigint-literal +type PEnum2 = "0" extends `${infer T extends NonLiteralEnum | 0n}` ? T : never; // 0 +// #endregion enum + +// #region number-literal +// number-literal > bigint +type PNumberLiteral0 = "0" extends `${infer T extends 0 | bigint}` ? T : never; // 0 + +// number-literal > bigint-literal +type PNumberLiteral1 = "0" extends `${infer T extends 0 | 0n}` ? T : never; // 0 +// #endregion number-literal + +// #region number-literal-enum +// number-literal-enum > bigint +type PNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum | bigint}` ? T : never; // NumberLiteralEnum.Zero + +// number-literal-enum > bigint-literal +type PNumberLiteralEnum1 = "0" extends `${infer T extends NumberLiteralEnum | 0n}` ? T : never; // NumberLiteralEnum.Zero +// #endregion number-literal-enum + +// non-matchable constituents are excluded +type PExclude0 = "0" extends `${infer T extends "1" | number}` ? T : never; // 0 +type PExclude1 = "0" extends `${infer T extends `1${string}` | number}` ? T : never; // 0 +type PExclude2 = "0" extends `${infer T extends 1 | bigint}` ? T : never; // 0n +type PExclude3 = "0" extends `${infer T extends NumberLiteralEnum.One | bigint}` ? T : never; // 0n +type PExclude4 = "100000000000000000000000" extends `${infer T extends number | bigint}` ? T : never; // 100000000000000000000000n + +// infer to prefix from string +type TPrefix0 = "100" extends `${infer T extends number}${string}` ? T : never; // 1 +type TPrefix1 = "trueabc" extends `${infer T extends boolean}${string}` ? T : never; // boolean (T only receives 't', not the whole string) +type TPrefix2 = `100:${string}` extends `${infer T extends number}:${string}` ? T : never; // 100 (T receives '100' because it scans until ':') + +// can use union w/multiple branches to extract each possibility +type ExtractPrimitives = + | T + | (T extends `${infer U extends number}` ? U : never) + | (T extends `${infer U extends bigint}` ? U : never) + | (T extends `${infer U extends boolean | null | undefined}` ? U : never) + ; + +type TExtract0 = ExtractPrimitives<"100">; // "100" | 100 | 100n +type TExtract1 = ExtractPrimitives<"1.1">; // "1.1" | 1.1 +type TExtract2 = ExtractPrimitives<"true">; // "true" | true + + + +// example use case (based on old TypedObjects proposal): + +// Use constrained `infer` in template literal to get ordinal indices as numbers: +type IndexFor = S extends `${infer N extends number}` ? N : never; +type IndicesOf = IndexFor>; // ordinal indices as number literals + +interface FieldDefinition { + readonly name: string; + readonly type: "i8" | "i16" | "i32" | "i64" | "u8" | "u16" | "u32" | "u64" | "f32" | "f64"; +} + +type FieldType = + T extends "i8" | "i16" | "i32" | "u8" | "u16" | "u32" | "f32" | "f64" ? number : + T extends "f32" | "f64" ? bigint : + never; + +// Generates named members like `{ x: number, y: bigint }` from `[{ name: "x", type: "i32" }, { name: "y", type: "i64" }]` +type TypedObjectNamedMembers = { + [P in TDef[number]["name"]]: FieldType["type"]>; +}; + +// Generates ordinal members like `{ 0: number, 1: bigint }` from `[{ name: "x", type: "i32" }, { name: "y", type: "i64" }]` +type TypedObjectOrdinalMembers = { + [I in Extract]: FieldType["type"]>; +}; + +// Default members +interface TypedObjectMembers { + // get/set a field by name + get(key: K): FieldType["type"]>; + set(key: K, value: FieldType["type"]>): void; + + // get/set a field by index + getIndex>(index: I): FieldType["type"]>; + setIndex>(index: I, value: FieldType["type"]>): void; +} + +type TypedObject = + & TypedObjectMembers + & TypedObjectNamedMembers + & TypedObjectOrdinalMembers; + +// NOTE: type would normally be created from something like `const Point = TypedObject([...])` from which we would infer the type +type Point = TypedObject<[ + { name: "x", type: "f64" }, + { name: "y", type: "f64" }, +]>; + +declare const p: Point; +p.getIndex(0); // ok, 0 is a valid index +p.getIndex(1); // ok, 1 is a valid index +p.getIndex(2); // error, 2 is not a valid index + +p.setIndex(0, 0); // ok, 0 is a valid index +p.setIndex(1, 0); // ok, 1 is a valid index +p.setIndex(2, 3); // error, 2 is not a valid index + +// function inference +declare function f1(s: `**${T}**`): T; +f1("**123**"); // "123" + +declare function f2(s: `**${T}**`): T; +f2("**123**"); // 123 + +declare function f3(s: `**${T}**`): T; +f3("**123**"); // 123n + +declare function f4(s: `**${T}**`): T; +f4("**true**"); // true | "true" +f4("**false**"); // false | "false" + + +/// [Declarations] //// + + + +//// [templateLiteralTypes4.d.ts] +type TNumber0 = "100" extends `${infer N extends number}` ? N : never; +type TNumber1 = "-100" extends `${infer N extends number}` ? N : never; +type TNumber2 = "1.1" extends `${infer N extends number}` ? N : never; +type TNumber3 = "8e-11" extends `${infer N extends number}` ? N : never; +type TNumber4 = "0x10" extends `${infer N extends number}` ? N : never; +type TNumber5 = "0o10" extends `${infer N extends number}` ? N : never; +type TNumber6 = "0b10" extends `${infer N extends number}` ? N : never; +type TNumber7 = "10e2" extends `${infer N extends number}` ? N : never; +type TNumber8 = "abcd" extends `${infer N extends number}` ? N : never; +type TBigInt0 = "100" extends `${infer N extends bigint}` ? N : never; +type TBigInt1 = "-100" extends `${infer N extends bigint}` ? N : never; +type TBigInt2 = "0x10" extends `${infer N extends bigint}` ? N : never; +type TBigInt3 = "0o10" extends `${infer N extends bigint}` ? N : never; +type TBigInt4 = "0b10" extends `${infer N extends bigint}` ? N : never; +type TBigInt5 = "1.1" extends `${infer N extends bigint}` ? N : never; +type TBigInt6 = "10e2" extends `${infer N extends bigint}` ? N : never; +type TBigInt7 = "abcd" extends `${infer N extends bigint}` ? N : never; +type TBoolean0 = "true" extends `${infer T extends boolean}` ? T : never; +type TBoolean1 = "false" extends `${infer T extends boolean}` ? T : never; +type TBoolean2 = "abcd" extends `${infer T extends boolean}` ? T : never; +type TNull0 = "null" extends `${infer T extends null}` ? T : never; +type TNull1 = "abcd" extends `${infer T extends null}` ? T : never; +type TUndefined0 = "undefined" extends `${infer T extends undefined}` ? T : never; +type TUndefined1 = "abcd" extends `${infer T extends undefined}` ? T : never; +declare const enum StringLiteralEnum { + Zero = "0", + True = "true", + False = "false", + Undefined = "undefined", + Null = "null" +} +type TStringLiteralEnum0 = "0" extends `${infer T extends StringLiteralEnum}` ? T : never; +declare const enum NumberLiteralEnum { + Zero = 0, + One = 1 +} +type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; +declare const enum NonLiteralEnum { + Zero, + One +} +type TNonLiteralEnum0 = "0" extends `${infer T extends NonLiteralEnum}` ? T : never; +type PString00 = "0" extends `${infer T extends string | StringLiteralEnum}` ? T : never; +type PString01 = "0" extends `${infer T extends string | number}` ? T : never; +type PString02 = "0" extends `${infer T extends string | NonLiteralEnum}` ? T : never; +type PString03 = "0" extends `${infer T extends string | 0}` ? T : never; +type PString04 = "0" extends `${infer T extends string | NumberLiteralEnum}` ? T : never; +type PString05 = "0" extends `${infer T extends string | bigint}` ? T : never; +type PString06 = "0" extends `${infer T extends string | 0n}` ? T : never; +type PString07 = "true" extends `${infer T extends string | boolean}` ? T : never; +type PString08 = "false" extends `${infer T extends string | boolean}` ? T : never; +type PString09 = "true" extends `${infer T extends string | true}` ? T : never; +type PString10 = "false" extends `${infer T extends string | false}` ? T : never; +type PString11 = "undefined" extends `${infer T extends string | undefined}` ? T : never; +type PString12 = "null" extends `${infer T extends string | null}` ? T : never; +type PTemplate00 = "10" extends `${infer T extends `1${string}` | number}` ? T : never; +type PTemplate01 = "10" extends `${infer T extends `1${string}` | NonLiteralEnum}` ? T : never; +type PTemplate02 = "10" extends `${infer T extends `1${string}` | 10}` ? T : never; +type PTemplate03 = "10" extends `${infer T extends `1${string}` | NumberLiteralEnum}` ? T : never; +type PTemplate04 = "10" extends `${infer T extends `1${string}` | bigint}` ? T : never; +type PTemplate05 = "10" extends `${infer T extends `1${string}` | 10n}` ? T : never; +type PTemplate06 = "true" extends `${infer T extends `${string}e` | boolean}` ? T : never; +type PTemplate07 = "false" extends `${infer T extends `${string}e` | boolean}` ? T : never; +type PTemplate08 = "true" extends `${infer T extends `${"t"}${string}` | true}` ? T : never; +type PTemplate09 = "false" extends `${infer T extends `${"f"}${string}` | false}` ? T : never; +type PTemplate10 = "undefined" extends `${infer T extends `${"u"}${string}` | undefined}` ? T : never; +type PTemplate11 = "null" extends `${infer T extends `${"n"}${string}` | null}` ? T : never; +type PStringLiteral00 = "0" extends `${infer T extends "0" | number}` ? T : never; +type PStringLiteral01 = "0" extends `${infer T extends "0" | NonLiteralEnum}` ? T : never; +type PStringLiteral02 = "0" extends `${infer T extends "0" | 0}` ? T : never; +type PStringLiteral03 = "0" extends `${infer T extends "0" | NumberLiteralEnum}` ? T : never; +type PStringLiteral04 = "0" extends `${infer T extends "0" | bigint}` ? T : never; +type PStringLiteral05 = "0" extends `${infer T extends "0" | 0n}` ? T : never; +type PStringLiteral06 = "true" extends `${infer T extends "true" | "false" | boolean}` ? T : never; +type PStringLiteral07 = "false" extends `${infer T extends "true" | "false" | boolean}` ? T : never; +type PStringLiteral08 = "true" extends `${infer T extends "true" | true}` ? T : never; +type PStringLiteral09 = "false" extends `${infer T extends "false" | false}` ? T : never; +type PStringLiteral10 = "undefined" extends `${infer T extends "undefined" | undefined}` ? T : never; +type PStringLiteral11 = "null" extends `${infer T extends "null" | null}` ? T : never; +type PStringLiteralEnum00 = "0" extends `${infer T extends StringLiteralEnum | number}` ? T : never; +type PStringLiteralEnum01 = "0" extends `${infer T extends StringLiteralEnum | NonLiteralEnum}` ? T : never; +type PStringLiteralEnum02 = "0" extends `${infer T extends StringLiteralEnum | 0}` ? T : never; +type PStringLiteralEnum03 = "0" extends `${infer T extends StringLiteralEnum | NumberLiteralEnum}` ? T : never; +type PStringLiteralEnum04 = "0" extends `${infer T extends StringLiteralEnum | bigint}` ? T : never; +type PStringLiteralEnum05 = "0" extends `${infer T extends StringLiteralEnum | 0n}` ? T : never; +type PStringLiteralEnum06 = "true" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; +type PStringLiteralEnum07 = "false" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; +type PStringLiteralEnum08 = "true" extends `${infer T extends StringLiteralEnum | true}` ? T : never; +type PStringLiteralEnum09 = "false" extends `${infer T extends StringLiteralEnum | false}` ? T : never; +type PStringLiteralEnum10 = "undefined" extends `${infer T extends StringLiteralEnum | undefined}` ? T : never; +type PStringLiteralEnum11 = "null" extends `${infer T extends StringLiteralEnum | null}` ? T : never; +type PNumber0 = "0" extends `${infer T extends number | NonLiteralEnum}` ? T : never; +type PNumber1 = "0" extends `${infer T extends number | NumberLiteralEnum}` ? T : never; +type PNumber2 = "0" extends `${infer T extends number | bigint}` ? T : never; +type PNumber3 = "0" extends `${infer T extends number | 0n}` ? T : never; +type PEnum0 = "0" extends `${infer T extends NonLiteralEnum | NumberLiteralEnum}` ? T : never; +type PEnum1 = "0" extends `${infer T extends NonLiteralEnum | bigint}` ? T : never; +type PEnum2 = "0" extends `${infer T extends NonLiteralEnum | 0n}` ? T : never; +type PNumberLiteral0 = "0" extends `${infer T extends 0 | bigint}` ? T : never; +type PNumberLiteral1 = "0" extends `${infer T extends 0 | 0n}` ? T : never; +type PNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum | bigint}` ? T : never; +type PNumberLiteralEnum1 = "0" extends `${infer T extends NumberLiteralEnum | 0n}` ? T : never; +type PExclude0 = "0" extends `${infer T extends "1" | number}` ? T : never; +type PExclude1 = "0" extends `${infer T extends `1${string}` | number}` ? T : never; +type PExclude2 = "0" extends `${infer T extends 1 | bigint}` ? T : never; +type PExclude3 = "0" extends `${infer T extends NumberLiteralEnum.One | bigint}` ? T : never; +type PExclude4 = "100000000000000000000000" extends `${infer T extends number | bigint}` ? T : never; +type TPrefix0 = "100" extends `${infer T extends number}${string}` ? T : never; +type TPrefix1 = "trueabc" extends `${infer T extends boolean}${string}` ? T : never; +type TPrefix2 = `100:${string}` extends `${infer T extends number}:${string}` ? T : never; +type ExtractPrimitives = T | (T extends `${infer U extends number}` ? U : never) | (T extends `${infer U extends bigint}` ? U : never) | (T extends `${infer U extends boolean | null | undefined}` ? U : never); +type TExtract0 = ExtractPrimitives<"100">; +type TExtract1 = ExtractPrimitives<"1.1">; +type TExtract2 = ExtractPrimitives<"true">; +type IndexFor = S extends `${infer N extends number}` ? N : never; +type IndicesOf = IndexFor>; +interface FieldDefinition { + readonly name: string; + readonly type: "i8" | "i16" | "i32" | "i64" | "u8" | "u16" | "u32" | "u64" | "f32" | "f64"; +} +type FieldType = T extends "i8" | "i16" | "i32" | "u8" | "u16" | "u32" | "f32" | "f64" ? number : T extends "f32" | "f64" ? bigint : never; +type TypedObjectNamedMembers = { + [P in TDef[number]["name"]]: FieldType["type"]>; +}; +type TypedObjectOrdinalMembers = { + [I in Extract]: FieldType["type"]>; +}; +interface TypedObjectMembers { + get(key: K): FieldType["type"]>; + set(key: K, value: FieldType["type"]>): void; + getIndex>(index: I): FieldType["type"]>; + setIndex>(index: I, value: FieldType["type"]>): void; +} +type TypedObject = TypedObjectMembers & TypedObjectNamedMembers & TypedObjectOrdinalMembers; +type Point = TypedObject<[ + { + name: "x"; + type: "f64"; + }, + { + name: "y"; + type: "f64"; + } +]>; +declare const p: Point; +declare function f1(s: `**${T}**`): T; +declare function f2(s: `**${T}**`): T; +declare function f3(s: `**${T}**`): T; +declare function f4(s: `**${T}**`): T; +//# sourceMappingURL=templateLiteralTypes4.d.ts.map +/// [Errors] //// + +templateLiteralTypes4.ts(43,29): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +templateLiteralTypes4.ts(43,60): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +templateLiteralTypes4.ts(285,12): error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. +templateLiteralTypes4.ts(289,12): error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. + + +==== templateLiteralTypes4.ts (4 errors) ==== + // infer from number + type TNumber0 = "100" extends `${infer N extends number}` ? N : never; // 100 + type TNumber1 = "-100" extends `${infer N extends number}` ? N : never; // -100 + type TNumber2 = "1.1" extends `${infer N extends number}` ? N : never; // 1.1 + type TNumber3 = "8e-11" extends `${infer N extends number}` ? N : never; // 8e-11 (0.00000000008) + type TNumber4 = "0x10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) + type TNumber5 = "0o10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) + type TNumber6 = "0b10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) + type TNumber7 = "10e2" extends `${infer N extends number}` ? N : never; // number (not round-trippable) + type TNumber8 = "abcd" extends `${infer N extends number}` ? N : never; // never + + // infer from bigint + type TBigInt0 = "100" extends `${infer N extends bigint}` ? N : never; // 100n + type TBigInt1 = "-100" extends `${infer N extends bigint}` ? N : never; // -100n + type TBigInt2 = "0x10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) + type TBigInt3 = "0o10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) + type TBigInt4 = "0b10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) + type TBigInt5 = "1.1" extends `${infer N extends bigint}` ? N : never; // never + type TBigInt6 = "10e2" extends `${infer N extends bigint}` ? N : never; // never + type TBigInt7 = "abcd" extends `${infer N extends bigint}` ? N : never; // never + + // infer from boolean + type TBoolean0 = "true" extends `${infer T extends boolean}` ? T : never; // true + type TBoolean1 = "false" extends `${infer T extends boolean}` ? T : never; // false + type TBoolean2 = "abcd" extends `${infer T extends boolean}` ? T : never; // never + + // infer from null + type TNull0 = "null" extends `${infer T extends null}` ? T : never; // null + type TNull1 = "abcd" extends `${infer T extends null}` ? T : never; // never + + // infer from undefined + type TUndefined0 = "undefined" extends `${infer T extends undefined}` ? T : never; // undefined + type TUndefined1 = "abcd" extends `${infer T extends undefined}` ? T : never; // never + + // infer from literal enums + const enum StringLiteralEnum { Zero = "0", True = "true", False = "false", Undefined = "undefined", Null = "null" } + type TStringLiteralEnum0 = "0" extends `${infer T extends StringLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + + const enum NumberLiteralEnum { Zero, One } + type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; // NumberLiteralEnum.Zero + + // infer from non-literal enums + const enum NonLiteralEnum { Zero = NumberLiteralEnum.Zero, One = NumberLiteralEnum.One } + ~~~~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + ~~~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + type TNonLiteralEnum0 = "0" extends `${infer T extends NonLiteralEnum}` ? T : never; // 0 + + // infer using priority: + // string > template-literal > (string-literal | string-literal-enum) > + // number > enum > (number-literal | number-literal-enum) > + // bigint > bigint-literal > + // boolean > (boolean-literal | undefined | null) + + // #region string + // string > string-literal-enum + type PString00 = "0" extends `${infer T extends string | StringLiteralEnum}` ? T : never; // "0" + + // string > number + type PString01 = "0" extends `${infer T extends string | number}` ? T : never; // "0" + + // string > enum + type PString02 = "0" extends `${infer T extends string | NonLiteralEnum}` ? T : never; // "0" + + // string > (number-literal | number-literal-enum) + type PString03 = "0" extends `${infer T extends string | 0}` ? T : never; // "0" + type PString04 = "0" extends `${infer T extends string | NumberLiteralEnum}` ? T : never; // "0" + + // string > bigint + type PString05 = "0" extends `${infer T extends string | bigint}` ? T : never; // "0" + + // string > bigint-literal + type PString06 = "0" extends `${infer T extends string | 0n}` ? T : never; // "0" + + // string > boolean + type PString07 = "true" extends `${infer T extends string | boolean}` ? T : never; // "true" + type PString08 = "false" extends `${infer T extends string | boolean}` ? T : never; // "false" + + // string > (boolean-literal | undefined | null) + type PString09 = "true" extends `${infer T extends string | true}` ? T : never; // "true" + type PString10 = "false" extends `${infer T extends string | false}` ? T : never; // "false" + type PString11 = "undefined" extends `${infer T extends string | undefined}` ? T : never; // "undefined" + type PString12 = "null" extends `${infer T extends string | null}` ? T : never; // "null" + // #endregion string + + // #region template-literal + // template-literal > number + type PTemplate00 = "10" extends `${infer T extends `1${string}` | number}` ? T : never; // "10" + + // template-literal > enum + type PTemplate01 = "10" extends `${infer T extends `1${string}` | NonLiteralEnum}` ? T : never; // "10" + + // template-literal > (number-literal | number-literal-enum) + type PTemplate02 = "10" extends `${infer T extends `1${string}` | 10}` ? T : never; // "10" + type PTemplate03 = "10" extends `${infer T extends `1${string}` | NumberLiteralEnum}` ? T : never; // "10" + + // template-literal > bigint + type PTemplate04 = "10" extends `${infer T extends `1${string}` | bigint}` ? T : never; // "10" + + // template-literal > bigint-literal + type PTemplate05 = "10" extends `${infer T extends `1${string}` | 10n}` ? T : never; // "10" + + // template-literal > boolean + type PTemplate06 = "true" extends `${infer T extends `${string}e` | boolean}` ? T : never; // "true" + type PTemplate07 = "false" extends `${infer T extends `${string}e` | boolean}` ? T : never; // "false" + + // template-literal > (boolean-literal | undefined | null) + type PTemplate08 = "true" extends `${infer T extends `${"t"}${string}` | true}` ? T : never; // "true" + type PTemplate09 = "false" extends `${infer T extends `${"f"}${string}` | false}` ? T : never; // "false" + type PTemplate10 = "undefined" extends `${infer T extends `${"u"}${string}` | undefined}` ? T : never; // "undefined" + type PTemplate11 = "null" extends `${infer T extends `${"n"}${string}` | null}` ? T : never; // "null" + // #endregion template-literal + + // #region string-literal + // string-literal > number + type PStringLiteral00 = "0" extends `${infer T extends "0" | number}` ? T : never; // "0" + + // string-literal > enum + type PStringLiteral01 = "0" extends `${infer T extends "0" | NonLiteralEnum}` ? T : never; // "0" + + // string-literal > (number-literal | number-literal-enum) + type PStringLiteral02 = "0" extends `${infer T extends "0" | 0}` ? T : never; // "0" + type PStringLiteral03 = "0" extends `${infer T extends "0" | NumberLiteralEnum}` ? T : never; // "0" + + // string-literal > bigint + type PStringLiteral04 = "0" extends `${infer T extends "0" | bigint}` ? T : never; // "0" + + // string-literal > bigint-literal + type PStringLiteral05 = "0" extends `${infer T extends "0" | 0n}` ? T : never; // "0" + + // string-literal > boolean + type PStringLiteral06 = "true" extends `${infer T extends "true" | "false" | boolean}` ? T : never; // "true" + type PStringLiteral07 = "false" extends `${infer T extends "true" | "false" | boolean}` ? T : never; // "false" + + // string-literal > (boolean-literal | undefined | null) + type PStringLiteral08 = "true" extends `${infer T extends "true" | true}` ? T : never; // "true" + type PStringLiteral09 = "false" extends `${infer T extends "false" | false}` ? T : never; // "false" + type PStringLiteral10 = "undefined" extends `${infer T extends "undefined" | undefined}` ? T : never; // "undefined" + type PStringLiteral11 = "null" extends `${infer T extends "null" | null}` ? T : never; // "null" + // #endregion string-literal + + // #region string-literal-enum + // string-literal-enum > number + type PStringLiteralEnum00 = "0" extends `${infer T extends StringLiteralEnum | number}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > enum + type PStringLiteralEnum01 = "0" extends `${infer T extends StringLiteralEnum | NonLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > (number-literal | number-literal-enum) + type PStringLiteralEnum02 = "0" extends `${infer T extends StringLiteralEnum | 0}` ? T : never; // StringLiteralEnum.Zero + type PStringLiteralEnum03 = "0" extends `${infer T extends StringLiteralEnum | NumberLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > bigint + type PStringLiteralEnum04 = "0" extends `${infer T extends StringLiteralEnum | bigint}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > bigint-literal + type PStringLiteralEnum05 = "0" extends `${infer T extends StringLiteralEnum | 0n}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > boolean + type PStringLiteralEnum06 = "true" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; // StringLiteralEnum.True + type PStringLiteralEnum07 = "false" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; // StringLiteralEnum.False + + // string-literal-enum > (boolean-literal | undefined | null) + type PStringLiteralEnum08 = "true" extends `${infer T extends StringLiteralEnum | true}` ? T : never; // StringLiteralEnum.True + type PStringLiteralEnum09 = "false" extends `${infer T extends StringLiteralEnum | false}` ? T : never; // StringLiteralEnum.False + type PStringLiteralEnum10 = "undefined" extends `${infer T extends StringLiteralEnum | undefined}` ? T : never; // StringLiteralEnum.Undefined + type PStringLiteralEnum11 = "null" extends `${infer T extends StringLiteralEnum | null}` ? T : never; // StringLiteralEnum.Null + // #endregion string-literal-enum + + // #region number + // number > enum + type PNumber0 = "0" extends `${infer T extends number | NonLiteralEnum}` ? T : never; // 0 + + // number > number-literal-enum + type PNumber1 = "0" extends `${infer T extends number | NumberLiteralEnum}` ? T : never; // 0 + + // number > bigint + type PNumber2 = "0" extends `${infer T extends number | bigint}` ? T : never; // 0 + + // number > bigint-literal + type PNumber3 = "0" extends `${infer T extends number | 0n}` ? T : never; // 0 + // #endregion number + + // #region enum + // enum > number-literal-enum + type PEnum0 = "0" extends `${infer T extends NonLiteralEnum | NumberLiteralEnum}` ? T : never; // 0 + + // enum > bigint + type PEnum1 = "0" extends `${infer T extends NonLiteralEnum | bigint}` ? T : never; // 0 + + // enum > bigint-literal + type PEnum2 = "0" extends `${infer T extends NonLiteralEnum | 0n}` ? T : never; // 0 + // #endregion enum + + // #region number-literal + // number-literal > bigint + type PNumberLiteral0 = "0" extends `${infer T extends 0 | bigint}` ? T : never; // 0 + + // number-literal > bigint-literal + type PNumberLiteral1 = "0" extends `${infer T extends 0 | 0n}` ? T : never; // 0 + // #endregion number-literal + + // #region number-literal-enum + // number-literal-enum > bigint + type PNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum | bigint}` ? T : never; // NumberLiteralEnum.Zero + + // number-literal-enum > bigint-literal + type PNumberLiteralEnum1 = "0" extends `${infer T extends NumberLiteralEnum | 0n}` ? T : never; // NumberLiteralEnum.Zero + // #endregion number-literal-enum + + // non-matchable constituents are excluded + type PExclude0 = "0" extends `${infer T extends "1" | number}` ? T : never; // 0 + type PExclude1 = "0" extends `${infer T extends `1${string}` | number}` ? T : never; // 0 + type PExclude2 = "0" extends `${infer T extends 1 | bigint}` ? T : never; // 0n + type PExclude3 = "0" extends `${infer T extends NumberLiteralEnum.One | bigint}` ? T : never; // 0n + type PExclude4 = "100000000000000000000000" extends `${infer T extends number | bigint}` ? T : never; // 100000000000000000000000n + + // infer to prefix from string + type TPrefix0 = "100" extends `${infer T extends number}${string}` ? T : never; // 1 + type TPrefix1 = "trueabc" extends `${infer T extends boolean}${string}` ? T : never; // boolean (T only receives 't', not the whole string) + type TPrefix2 = `100:${string}` extends `${infer T extends number}:${string}` ? T : never; // 100 (T receives '100' because it scans until ':') + + // can use union w/multiple branches to extract each possibility + type ExtractPrimitives = + | T + | (T extends `${infer U extends number}` ? U : never) + | (T extends `${infer U extends bigint}` ? U : never) + | (T extends `${infer U extends boolean | null | undefined}` ? U : never) + ; + + type TExtract0 = ExtractPrimitives<"100">; // "100" | 100 | 100n + type TExtract1 = ExtractPrimitives<"1.1">; // "1.1" | 1.1 + type TExtract2 = ExtractPrimitives<"true">; // "true" | true + + + + // example use case (based on old TypedObjects proposal): + + // Use constrained `infer` in template literal to get ordinal indices as numbers: + type IndexFor = S extends `${infer N extends number}` ? N : never; + type IndicesOf = IndexFor>; // ordinal indices as number literals + + interface FieldDefinition { + readonly name: string; + readonly type: "i8" | "i16" | "i32" | "i64" | "u8" | "u16" | "u32" | "u64" | "f32" | "f64"; + } + + type FieldType = + T extends "i8" | "i16" | "i32" | "u8" | "u16" | "u32" | "f32" | "f64" ? number : + T extends "f32" | "f64" ? bigint : + never; + + // Generates named members like `{ x: number, y: bigint }` from `[{ name: "x", type: "i32" }, { name: "y", type: "i64" }]` + type TypedObjectNamedMembers = { + [P in TDef[number]["name"]]: FieldType["type"]>; + }; + + // Generates ordinal members like `{ 0: number, 1: bigint }` from `[{ name: "x", type: "i32" }, { name: "y", type: "i64" }]` + type TypedObjectOrdinalMembers = { + [I in Extract]: FieldType["type"]>; + }; + + // Default members + interface TypedObjectMembers { + // get/set a field by name + get(key: K): FieldType["type"]>; + set(key: K, value: FieldType["type"]>): void; + + // get/set a field by index + getIndex>(index: I): FieldType["type"]>; + setIndex>(index: I, value: FieldType["type"]>): void; + } + + type TypedObject = + & TypedObjectMembers + & TypedObjectNamedMembers + & TypedObjectOrdinalMembers; + + // NOTE: type would normally be created from something like `const Point = TypedObject([...])` from which we would infer the type + type Point = TypedObject<[ + { name: "x", type: "f64" }, + { name: "y", type: "f64" }, + ]>; + + declare const p: Point; + p.getIndex(0); // ok, 0 is a valid index + p.getIndex(1); // ok, 1 is a valid index + p.getIndex(2); // error, 2 is not a valid index + ~ +!!! error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. + + p.setIndex(0, 0); // ok, 0 is a valid index + p.setIndex(1, 0); // ok, 1 is a valid index + p.setIndex(2, 3); // error, 2 is not a valid index + ~ +!!! error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. + + // function inference + declare function f1(s: `**${T}**`): T; + f1("**123**"); // "123" + + declare function f2(s: `**${T}**`): T; + f2("**123**"); // 123 + + declare function f3(s: `**${T}**`): T; + f3("**123**"); // 123n + + declare function f4(s: `**${T}**`): T; + f4("**true**"); // true | "true" + f4("**false**"); // false | "false" + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralsInTypes.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralsInTypes.d.ts.map new file mode 100644 index 0000000000000..2f63239bcb4ba --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralsInTypes.d.ts.map @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/templateLiteralsInTypes.ts] //// + +//// [templateLiteralsInTypes.ts] +const f = (hdr: string, val: number): `${string}:\t${number}\r\n` => `${hdr}:\t${val}\r\n` as `${string}:\t${number}\r\n`; + +f("x").foo; + + +/// [Declarations] //// + + + +//// [templateLiteralsInTypes.d.ts] +declare const f: (hdr: string, val: number) => `${string}:\t${number}\r\n`; +//# sourceMappingURL=templateLiteralsInTypes.d.ts.map + +/// [Declarations Maps] //// + + +//// [templateLiteralsInTypes.d.ts.map] +{"version":3,"file":"templateLiteralsInTypes.d.ts","sourceRoot":"","sources":["templateLiteralsInTypes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAI,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAG,GAAG,MAAM,MAAM,MAAM,MAA8D,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmOiAoaGRyOiBzdHJpbmcsIHZhbDogbnVtYmVyKSA9PiBgJHtzdHJpbmd9Olx0JHtudW1iZXJ9XHJcbmA7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZW1wbGF0ZUxpdGVyYWxzSW5UeXBlcy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcGxhdGVMaXRlcmFsc0luVHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlbXBsYXRlTGl0ZXJhbHNJblR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsTUFBTSxDQUFDLEdBQUksR0FBRyxFQUFFLE1BQU0sRUFBRSxHQUFHLEVBQUUsTUFBTSxLQUFHLEdBQUcsTUFBTSxNQUFNLE1BQU0sTUFBOEQsQ0FBQyJ9,Y29uc3QgZiA9IChoZHI6IHN0cmluZywgdmFsOiBudW1iZXIpOiBgJHtzdHJpbmd9Olx0JHtudW1iZXJ9XHJcbmAgPT4gYCR7aGRyfTpcdCR7dmFsfVxyXG5gIGFzIGAke3N0cmluZ306XHQke251bWJlcn1cclxuYDsKCmYoIngiKS5mb287Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisTypeInObjectLiterals2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisTypeInObjectLiterals2.d.ts.map new file mode 100644 index 0000000000000..9c3aeedcd13c0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisTypeInObjectLiterals2.d.ts.map @@ -0,0 +1,367 @@ +//// [tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts] //// + +//// [thisTypeInObjectLiterals2.ts] +// In methods of an object literal with no contextual type, 'this' has the type +// of the object literal. + +let obj1 = { + a: 1, + f(): number { + return this.a; + }, + b: "hello", + c: { + g(): void { + this.g(); + } + }, + get d(): number { + return this.a; + }, + get e(): string { + return this.b; + }, + set e(value) { + this.b = value; + } +}; + +// In methods of an object literal with a contextual type, 'this' has the +// contextual type. + +type Point = { + x: number; + y: number; + z?: number; + moveBy(dx: number, dy: number, dz?: number): void; +} + +let p1: Point = { + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}; + +let p2: Point | null = { + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}; + +let p3: Point | undefined = { + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}; + +let p4: Point | null | undefined = { + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}; + +declare function f1(p: Point): void; + +f1({ + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}); + +declare function f2(p: Point | null | undefined): void; + +f2({ + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}); + +// In methods of an object literal with a contextual type that includes some +// ThisType, 'this' is of type T. + +type ObjectDescriptor = { + data?: D; + methods?: M & ThisType; // Type of 'this' in methods is D & M +} + +declare function makeObject(desc: ObjectDescriptor): D & M; + +let x1: { + x: number; + y: number; +} & { + moveBy(dx: number, dy: number): void; +} = makeObject({ + data: { x: 0, y: 0 }, + methods: { + moveBy(dx: number, dy: number) { + this.x += dx; // Strongly typed this + this.y += dy; // Strongly typed this + } + } +}); + +// In methods contained in an object literal with a contextual type that includes +// some ThisType, 'this' is of type T. + +type ObjectDescriptor2 = ThisType & { + data?: D; + methods?: M; +} + +declare function makeObject2(desc: ObjectDescriptor): D & M; + +let x2: { + x: number; + y: number; +} & { + moveBy(dx: number, dy: number): void; +} = makeObject2({ + data: { x: 0, y: 0 }, + methods: { + moveBy(dx: number, dy: number) { + this.x += dx; // Strongly typed this + this.y += dy; // Strongly typed this + } + } +}); + +// Check pattern similar to Object.defineProperty and Object.defineProperties + +type PropDesc = { + value?: T; + get?(): T; + set?(value: T): void; +} + +type PropDescMap = { + [K in keyof T]: PropDesc; +} + +declare function defineProp(obj: T, name: K, desc: PropDesc & ThisType): T & Record; + +declare function defineProps(obj: T, descs: PropDescMap & ThisType): T & U; + +let p10: Point & Record<"foo", number> = defineProp(p1, "foo", { value: 42 }); +p10.foo = p10.foo + 1; + +let p11: Point & Record<"bar", number> = defineProp(p1, "bar", { + get() { + return this.x; + }, + set(value: number) { + this.x = value; + } +}); +p11.bar = p11.bar + 1; + +let p12: Point & { + foo: number; + bar: number; +} = defineProps(p1, { + foo: { + value: 42 + }, + bar: { + get(): number { + return this.x; + }, + set(value: number) { + this.x = value; + } + } +}); +p12.foo = p12.foo + 1; +p12.bar = p12.bar + 1; + +// Proof of concept for typing of Vue.js + +type Accessors = { [K in keyof T]: (() => T[K]) | Computed }; + +type Dictionary = { [x: string]: T } + +type Computed = { + get?(): T; + set?(value: T): void; +} + +type VueOptions = ThisType & { + data?: D | (() => D); + methods?: M; + computed?: Accessors

; +} + +declare const Vue: new (options: VueOptions) => D & M & P; + +let vue: { + x: number; + y: number; +} & { + f(x: string): number; +} & { + test: number; + hello: string; +} = new Vue({ + data: () => ({ x: 1, y: 2 }), + methods: { + f(x: string) { + return this.x; + } + }, + computed: { + test(): number { + return this.x; + }, + hello: { + get() { + return "hi"; + }, + set(value: string) { + } + } + } +}); + +vue; +vue.x; +vue.f("abc"); +vue.test; +vue.hello; + + +/// [Declarations] //// + + + +//// [thisTypeInObjectLiterals2.d.ts] +declare let obj1: { + a: number; + f(): number; + b: string; + c: { + g(): void; + }; + readonly d: number; + e: string; +}; +type Point = { + x: number; + y: number; + z?: number; + moveBy(dx: number, dy: number, dz?: number): void; +}; +declare let p1: Point; +declare let p2: Point | null; +declare let p3: Point | undefined; +declare let p4: Point | null | undefined; +declare function f1(p: Point): void; +declare function f2(p: Point | null | undefined): void; +type ObjectDescriptor = { + data?: D; + methods?: M & ThisType; +}; +declare function makeObject(desc: ObjectDescriptor): D & M; +declare let x1: { + x: number; + y: number; +} & { + moveBy(dx: number, dy: number): void; +}; +type ObjectDescriptor2 = ThisType & { + data?: D; + methods?: M; +}; +declare function makeObject2(desc: ObjectDescriptor): D & M; +declare let x2: { + x: number; + y: number; +} & { + moveBy(dx: number, dy: number): void; +}; +type PropDesc = { + value?: T; + get?(): T; + set?(value: T): void; +}; +type PropDescMap = { + [K in keyof T]: PropDesc; +}; +declare function defineProp(obj: T, name: K, desc: PropDesc & ThisType): T & Record; +declare function defineProps(obj: T, descs: PropDescMap & ThisType): T & U; +declare let p10: Point & Record<"foo", number>; +declare let p11: Point & Record<"bar", number>; +declare let p12: Point & { + foo: number; + bar: number; +}; +type Accessors = { + [K in keyof T]: (() => T[K]) | Computed; +}; +type Dictionary = { + [x: string]: T; +}; +type Computed = { + get?(): T; + set?(value: T): void; +}; +type VueOptions = ThisType & { + data?: D | (() => D); + methods?: M; + computed?: Accessors

; +}; +declare const Vue: new (options: VueOptions) => D & M & P; +declare let vue: { + x: number; + y: number; +} & { + f(x: string): number; +} & { + test: number; + hello: string; +}; +//# sourceMappingURL=thisTypeInObjectLiterals2.d.ts.map + +/// [Declarations Maps] //// + + +//// [thisTypeInObjectLiterals2.d.ts.map] +{"version":3,"file":"thisTypeInObjectLiterals2.d.ts","sourceRoot":"","sources":["thisTypeInObjectLiterals2.ts"],"names":[],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jAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7C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gICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/trackedSymbolsNoCrash.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/trackedSymbolsNoCrash.d.ts.map new file mode 100644 index 0000000000000..41f869acf44e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/trackedSymbolsNoCrash.d.ts.map @@ -0,0 +1,1048 @@ +//// [tests/cases/compiler/trackedSymbolsNoCrash.ts] //// + +//// [ast.ts] +export enum SyntaxKind { Node0, Node1, Node2, Node3, Node4, Node5, Node6, Node7, Node8, Node9, Node10, Node11, Node12, Node13, Node14, Node15, Node16, Node17, Node18, Node19, Node20, Node21, Node22, Node23, Node24, Node25, Node26, Node27, Node28, Node29, Node30, Node31, Node32, Node33, Node34, Node35, Node36, Node37, Node38, Node39, Node40, Node41, Node42, Node43, Node44, Node45, Node46, Node47, Node48, Node49, Node50, Node51, Node52, Node53, Node54, Node55, Node56, Node57, Node58, Node59, Node60, Node61, Node62, Node63, Node64, Node65, Node66, Node67, Node68, Node69, Node70, Node71, Node72, Node73, Node74, Node75, Node76, Node77, Node78, Node79, Node80, Node81, Node82, Node83, Node84, Node85, Node86, Node87, Node88, Node89, Node90, Node91, Node92, Node93, Node94, Node95, Node96, Node97, Node98, Node99 } + +export interface Node0 { kind: SyntaxKind.Node0; propNode0: number; } +export interface Node1 { kind: SyntaxKind.Node1; propNode1: number; } +export interface Node2 { kind: SyntaxKind.Node2; propNode2: number; } +export interface Node3 { kind: SyntaxKind.Node3; propNode3: number; } +export interface Node4 { kind: SyntaxKind.Node4; propNode4: number; } +export interface Node5 { kind: SyntaxKind.Node5; propNode5: number; } +export interface Node6 { kind: SyntaxKind.Node6; propNode6: number; } +export interface Node7 { kind: SyntaxKind.Node7; propNode7: number; } +export interface Node8 { kind: SyntaxKind.Node8; propNode8: number; } +export interface Node9 { kind: SyntaxKind.Node9; propNode9: number; } +export interface Node10 { kind: SyntaxKind.Node10; propNode10: number; } +export interface Node11 { kind: SyntaxKind.Node11; propNode11: number; } +export interface Node12 { kind: SyntaxKind.Node12; propNode12: number; } +export interface Node13 { kind: SyntaxKind.Node13; propNode13: number; } +export interface Node14 { kind: SyntaxKind.Node14; propNode14: number; } +export interface Node15 { kind: SyntaxKind.Node15; propNode15: number; } +export interface Node16 { kind: SyntaxKind.Node16; propNode16: number; } +export interface Node17 { kind: SyntaxKind.Node17; propNode17: number; } +export interface Node18 { kind: SyntaxKind.Node18; propNode18: number; } +export interface Node19 { kind: SyntaxKind.Node19; propNode19: number; } +export interface Node20 { kind: SyntaxKind.Node20; propNode20: number; } +export interface Node21 { kind: SyntaxKind.Node21; propNode21: number; } +export interface Node22 { kind: SyntaxKind.Node22; propNode22: number; } +export interface Node23 { kind: SyntaxKind.Node23; propNode23: number; } +export interface Node24 { kind: SyntaxKind.Node24; propNode24: number; } +export interface Node25 { kind: SyntaxKind.Node25; propNode25: number; } +export interface Node26 { kind: SyntaxKind.Node26; propNode26: number; } +export interface Node27 { kind: SyntaxKind.Node27; propNode27: number; } +export interface Node28 { kind: SyntaxKind.Node28; propNode28: number; } +export interface Node29 { kind: SyntaxKind.Node29; propNode29: number; } +export interface Node30 { kind: SyntaxKind.Node30; propNode30: number; } +export interface Node31 { kind: SyntaxKind.Node31; propNode31: number; } +export interface Node32 { kind: SyntaxKind.Node32; propNode32: number; } +export interface Node33 { kind: SyntaxKind.Node33; propNode33: number; } +export interface Node34 { kind: SyntaxKind.Node34; propNode34: number; } +export interface Node35 { kind: SyntaxKind.Node35; propNode35: number; } +export interface Node36 { kind: SyntaxKind.Node36; propNode36: number; } +export interface Node37 { kind: SyntaxKind.Node37; propNode37: number; } +export interface Node38 { kind: SyntaxKind.Node38; propNode38: number; } +export interface Node39 { kind: SyntaxKind.Node39; propNode39: number; } +export interface Node40 { kind: SyntaxKind.Node40; propNode40: number; } +export interface Node41 { kind: SyntaxKind.Node41; propNode41: number; } +export interface Node42 { kind: SyntaxKind.Node42; propNode42: number; } +export interface Node43 { kind: SyntaxKind.Node43; propNode43: number; } +export interface Node44 { kind: SyntaxKind.Node44; propNode44: number; } +export interface Node45 { kind: SyntaxKind.Node45; propNode45: number; } +export interface Node46 { kind: SyntaxKind.Node46; propNode46: number; } +export interface Node47 { kind: SyntaxKind.Node47; propNode47: number; } +export interface Node48 { kind: SyntaxKind.Node48; propNode48: number; } +export interface Node49 { kind: SyntaxKind.Node49; propNode49: number; } +export interface Node50 { kind: SyntaxKind.Node50; propNode50: number; } +export interface Node51 { kind: SyntaxKind.Node51; propNode51: number; } +export interface Node52 { kind: SyntaxKind.Node52; propNode52: number; } +export interface Node53 { kind: SyntaxKind.Node53; propNode53: number; } +export interface Node54 { kind: SyntaxKind.Node54; propNode54: number; } +export interface Node55 { kind: SyntaxKind.Node55; propNode55: number; } +export interface Node56 { kind: SyntaxKind.Node56; propNode56: number; } +export interface Node57 { kind: SyntaxKind.Node57; propNode57: number; } +export interface Node58 { kind: SyntaxKind.Node58; propNode58: number; } +export interface Node59 { kind: SyntaxKind.Node59; propNode59: number; } +export interface Node60 { kind: SyntaxKind.Node60; propNode60: number; } +export interface Node61 { kind: SyntaxKind.Node61; propNode61: number; } +export interface Node62 { kind: SyntaxKind.Node62; propNode62: number; } +export interface Node63 { kind: SyntaxKind.Node63; propNode63: number; } +export interface Node64 { kind: SyntaxKind.Node64; propNode64: number; } +export interface Node65 { kind: SyntaxKind.Node65; propNode65: number; } +export interface Node66 { kind: SyntaxKind.Node66; propNode66: number; } +export interface Node67 { kind: SyntaxKind.Node67; propNode67: number; } +export interface Node68 { kind: SyntaxKind.Node68; propNode68: number; } +export interface Node69 { kind: SyntaxKind.Node69; propNode69: number; } +export interface Node70 { kind: SyntaxKind.Node70; propNode70: number; } +export interface Node71 { kind: SyntaxKind.Node71; propNode71: number; } +export interface Node72 { kind: SyntaxKind.Node72; propNode72: number; } +export interface Node73 { kind: SyntaxKind.Node73; propNode73: number; } +export interface Node74 { kind: SyntaxKind.Node74; propNode74: number; } +export interface Node75 { kind: SyntaxKind.Node75; propNode75: number; } +export interface Node76 { kind: SyntaxKind.Node76; propNode76: number; } +export interface Node77 { kind: SyntaxKind.Node77; propNode77: number; } +export interface Node78 { kind: SyntaxKind.Node78; propNode78: number; } +export interface Node79 { kind: SyntaxKind.Node79; propNode79: number; } +export interface Node80 { kind: SyntaxKind.Node80; propNode80: number; } +export interface Node81 { kind: SyntaxKind.Node81; propNode81: number; } +export interface Node82 { kind: SyntaxKind.Node82; propNode82: number; } +export interface Node83 { kind: SyntaxKind.Node83; propNode83: number; } +export interface Node84 { kind: SyntaxKind.Node84; propNode84: number; } +export interface Node85 { kind: SyntaxKind.Node85; propNode85: number; } +export interface Node86 { kind: SyntaxKind.Node86; propNode86: number; } +export interface Node87 { kind: SyntaxKind.Node87; propNode87: number; } +export interface Node88 { kind: SyntaxKind.Node88; propNode88: number; } +export interface Node89 { kind: SyntaxKind.Node89; propNode89: number; } +export interface Node90 { kind: SyntaxKind.Node90; propNode90: number; } +export interface Node91 { kind: SyntaxKind.Node91; propNode91: number; } +export interface Node92 { kind: SyntaxKind.Node92; propNode92: number; } +export interface Node93 { kind: SyntaxKind.Node93; propNode93: number; } +export interface Node94 { kind: SyntaxKind.Node94; propNode94: number; } +export interface Node95 { kind: SyntaxKind.Node95; propNode95: number; } +export interface Node96 { kind: SyntaxKind.Node96; propNode96: number; } +export interface Node97 { kind: SyntaxKind.Node97; propNode97: number; } +export interface Node98 { kind: SyntaxKind.Node98; propNode98: number; } +export interface Node99 { kind: SyntaxKind.Node99; propNode99: number; } + +export type Node = Node0 | Node1 | Node2 | Node3 | Node4 | Node5 | Node6 | Node7 | Node8 | Node9 | Node10 | Node11 | Node12 | Node13 | Node14 | Node15 | Node16 | Node17 | Node18 | Node19 | Node20 | Node21 | Node22 | Node23 | Node24 | Node25 | Node26 | Node27 | Node28 | Node29 | Node30 | Node31 | Node32 | Node33 | Node34 | Node35 | Node36 | Node37 | Node38 | Node39 | Node40 | Node41 | Node42 | Node43 | Node44 | Node45 | Node46 | Node47 | Node48 | Node49 | Node50 | Node51 | Node52 | Node53 | Node54 | Node55 | Node56 | Node57 | Node58 | Node59 | Node60 | Node61 | Node62 | Node63 | Node64 | Node65 | Node66 | Node67 | Node68 | Node69 | Node70 | Node71 | Node72 | Node73 | Node74 | Node75 | Node76 | Node77 | Node78 | Node79 | Node80 | Node81 | Node82 | Node83 | Node84 | Node85 | Node86 | Node87 | Node88 | Node89 | Node90 | Node91 | Node92 | Node93 | Node94 | Node95 | Node96 | Node97 | Node98 | Node99; + +//// [index.ts] +import * as ast from "./ast"; + +export const isNodeOfType = + (nodeType: NodeType): (node: ast.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract => + ( + node: ast.Node | null | undefined, + ): node is Extract => + node?.kind === nodeType; + + + +/// [Declarations] //// + + + +//// [ast.d.ts] +export declare enum SyntaxKind { + Node0 = 0, + Node1 = 1, + Node2 = 2, + Node3 = 3, + Node4 = 4, + Node5 = 5, + Node6 = 6, + Node7 = 7, + Node8 = 8, + Node9 = 9, + Node10 = 10, + Node11 = 11, + Node12 = 12, + Node13 = 13, + Node14 = 14, + Node15 = 15, + Node16 = 16, + Node17 = 17, + Node18 = 18, + Node19 = 19, + Node20 = 20, + Node21 = 21, + Node22 = 22, + Node23 = 23, + Node24 = 24, + Node25 = 25, + Node26 = 26, + Node27 = 27, + Node28 = 28, + Node29 = 29, + Node30 = 30, + Node31 = 31, + Node32 = 32, + Node33 = 33, + Node34 = 34, + Node35 = 35, + Node36 = 36, + Node37 = 37, + Node38 = 38, + Node39 = 39, + Node40 = 40, + Node41 = 41, + Node42 = 42, + Node43 = 43, + Node44 = 44, + Node45 = 45, + Node46 = 46, + Node47 = 47, + Node48 = 48, + Node49 = 49, + Node50 = 50, + Node51 = 51, + Node52 = 52, + Node53 = 53, + Node54 = 54, + Node55 = 55, + Node56 = 56, + Node57 = 57, + Node58 = 58, + Node59 = 59, + Node60 = 60, + Node61 = 61, + Node62 = 62, + Node63 = 63, + Node64 = 64, + Node65 = 65, + Node66 = 66, + Node67 = 67, + Node68 = 68, + Node69 = 69, + Node70 = 70, + Node71 = 71, + Node72 = 72, + Node73 = 73, + Node74 = 74, + Node75 = 75, + Node76 = 76, + Node77 = 77, + Node78 = 78, + Node79 = 79, + Node80 = 80, + Node81 = 81, + Node82 = 82, + Node83 = 83, + Node84 = 84, + Node85 = 85, + Node86 = 86, + Node87 = 87, + Node88 = 88, + Node89 = 89, + Node90 = 90, + Node91 = 91, + Node92 = 92, + Node93 = 93, + Node94 = 94, + Node95 = 95, + Node96 = 96, + Node97 = 97, + Node98 = 98, + Node99 = 99 +} +export interface Node0 { + kind: SyntaxKind.Node0; + propNode0: number; +} +export interface Node1 { + kind: SyntaxKind.Node1; + propNode1: number; +} +export interface Node2 { + kind: SyntaxKind.Node2; + propNode2: number; +} +export interface Node3 { + kind: SyntaxKind.Node3; + propNode3: number; +} +export interface Node4 { + kind: SyntaxKind.Node4; + propNode4: number; +} +export interface Node5 { + kind: SyntaxKind.Node5; + propNode5: number; +} +export interface Node6 { + kind: SyntaxKind.Node6; + propNode6: number; +} +export interface Node7 { + kind: SyntaxKind.Node7; + propNode7: number; +} +export interface Node8 { + kind: SyntaxKind.Node8; + propNode8: number; +} +export interface Node9 { + kind: SyntaxKind.Node9; + propNode9: number; +} +export interface Node10 { + kind: SyntaxKind.Node10; + propNode10: number; +} +export interface Node11 { + kind: SyntaxKind.Node11; + propNode11: number; +} +export interface Node12 { + kind: SyntaxKind.Node12; + propNode12: number; +} +export interface Node13 { + kind: SyntaxKind.Node13; + propNode13: number; +} +export interface Node14 { + kind: SyntaxKind.Node14; + propNode14: number; +} +export interface Node15 { + kind: SyntaxKind.Node15; + propNode15: number; +} +export interface Node16 { + kind: SyntaxKind.Node16; + propNode16: number; +} +export interface Node17 { + kind: SyntaxKind.Node17; + propNode17: number; +} +export interface Node18 { + kind: SyntaxKind.Node18; + propNode18: number; +} +export interface Node19 { + kind: SyntaxKind.Node19; + propNode19: number; +} +export interface Node20 { + kind: SyntaxKind.Node20; + propNode20: number; +} +export interface Node21 { + kind: SyntaxKind.Node21; + propNode21: number; +} +export interface Node22 { + kind: SyntaxKind.Node22; + propNode22: number; +} +export interface Node23 { + kind: SyntaxKind.Node23; + propNode23: number; +} +export interface Node24 { + kind: SyntaxKind.Node24; + propNode24: number; +} +export interface Node25 { + kind: SyntaxKind.Node25; + propNode25: number; +} +export interface Node26 { + kind: SyntaxKind.Node26; + propNode26: number; +} +export interface Node27 { + kind: SyntaxKind.Node27; + propNode27: number; +} +export interface Node28 { + kind: SyntaxKind.Node28; + propNode28: number; +} +export interface Node29 { + kind: SyntaxKind.Node29; + propNode29: number; +} +export interface Node30 { + kind: SyntaxKind.Node30; + propNode30: number; +} +export interface Node31 { + kind: SyntaxKind.Node31; + propNode31: number; +} +export interface Node32 { + kind: SyntaxKind.Node32; + propNode32: number; +} +export interface Node33 { + kind: SyntaxKind.Node33; + propNode33: number; +} +export interface Node34 { + kind: SyntaxKind.Node34; + propNode34: number; +} +export interface Node35 { + kind: SyntaxKind.Node35; + propNode35: number; +} +export interface Node36 { + kind: SyntaxKind.Node36; + propNode36: number; +} +export interface Node37 { + kind: SyntaxKind.Node37; + propNode37: number; +} +export interface Node38 { + kind: SyntaxKind.Node38; + propNode38: number; +} +export interface Node39 { + kind: SyntaxKind.Node39; + propNode39: number; +} +export interface Node40 { + kind: SyntaxKind.Node40; + propNode40: number; +} +export interface Node41 { + kind: SyntaxKind.Node41; + propNode41: number; +} +export interface Node42 { + kind: SyntaxKind.Node42; + propNode42: number; +} +export interface Node43 { + kind: SyntaxKind.Node43; + propNode43: number; +} +export interface Node44 { + kind: SyntaxKind.Node44; + propNode44: number; +} +export interface Node45 { + kind: SyntaxKind.Node45; + propNode45: number; +} +export interface Node46 { + kind: SyntaxKind.Node46; + propNode46: number; +} +export interface Node47 { + kind: SyntaxKind.Node47; + propNode47: number; +} +export interface Node48 { + kind: SyntaxKind.Node48; + propNode48: number; +} +export interface Node49 { + kind: SyntaxKind.Node49; + propNode49: number; +} +export interface Node50 { + kind: SyntaxKind.Node50; + propNode50: number; +} +export interface Node51 { + kind: SyntaxKind.Node51; + propNode51: number; +} +export interface Node52 { + kind: SyntaxKind.Node52; + propNode52: number; +} +export interface Node53 { + kind: SyntaxKind.Node53; + propNode53: number; +} +export interface Node54 { + kind: SyntaxKind.Node54; + propNode54: number; +} +export interface Node55 { + kind: SyntaxKind.Node55; + propNode55: number; +} +export interface Node56 { + kind: SyntaxKind.Node56; + propNode56: number; +} +export interface Node57 { + kind: SyntaxKind.Node57; + propNode57: number; +} +export interface Node58 { + kind: SyntaxKind.Node58; + propNode58: number; +} +export interface Node59 { + kind: SyntaxKind.Node59; + propNode59: number; +} +export interface Node60 { + kind: SyntaxKind.Node60; + propNode60: number; +} +export interface Node61 { + kind: SyntaxKind.Node61; + propNode61: number; +} +export interface Node62 { + kind: SyntaxKind.Node62; + propNode62: number; +} +export interface Node63 { + kind: SyntaxKind.Node63; + propNode63: number; +} +export interface Node64 { + kind: SyntaxKind.Node64; + propNode64: number; +} +export interface Node65 { + kind: SyntaxKind.Node65; + propNode65: number; +} +export interface Node66 { + kind: SyntaxKind.Node66; + propNode66: number; +} +export interface Node67 { + kind: SyntaxKind.Node67; + propNode67: number; +} +export interface Node68 { + kind: SyntaxKind.Node68; + propNode68: number; +} +export interface Node69 { + kind: SyntaxKind.Node69; + propNode69: number; +} +export interface Node70 { + kind: SyntaxKind.Node70; + propNode70: number; +} +export interface Node71 { + kind: SyntaxKind.Node71; + propNode71: number; +} +export interface Node72 { + kind: SyntaxKind.Node72; + propNode72: number; +} +export interface Node73 { + kind: SyntaxKind.Node73; + propNode73: number; +} +export interface Node74 { + kind: SyntaxKind.Node74; + propNode74: number; +} +export interface Node75 { + kind: SyntaxKind.Node75; + propNode75: number; +} +export interface Node76 { + kind: SyntaxKind.Node76; + propNode76: number; +} +export interface Node77 { + kind: SyntaxKind.Node77; + propNode77: number; +} +export interface Node78 { + kind: SyntaxKind.Node78; + propNode78: number; +} +export interface Node79 { + kind: SyntaxKind.Node79; + propNode79: number; +} +export interface Node80 { + kind: SyntaxKind.Node80; + propNode80: number; +} +export interface Node81 { + kind: SyntaxKind.Node81; + propNode81: number; +} +export interface Node82 { + kind: SyntaxKind.Node82; + propNode82: number; +} +export interface Node83 { + kind: SyntaxKind.Node83; + propNode83: number; +} +export interface Node84 { + kind: SyntaxKind.Node84; + propNode84: number; +} +export interface Node85 { + kind: SyntaxKind.Node85; + propNode85: number; +} +export interface Node86 { + kind: SyntaxKind.Node86; + propNode86: number; +} +export interface Node87 { + kind: SyntaxKind.Node87; + propNode87: number; +} +export interface Node88 { + kind: SyntaxKind.Node88; + propNode88: number; +} +export interface Node89 { + kind: SyntaxKind.Node89; + propNode89: number; +} +export interface Node90 { + kind: SyntaxKind.Node90; + propNode90: number; +} +export interface Node91 { + kind: SyntaxKind.Node91; + propNode91: number; +} +export interface Node92 { + kind: SyntaxKind.Node92; + propNode92: number; +} +export interface Node93 { + kind: SyntaxKind.Node93; + propNode93: number; +} +export interface Node94 { + kind: SyntaxKind.Node94; + propNode94: number; +} +export interface Node95 { + kind: SyntaxKind.Node95; + propNode95: number; +} +export interface Node96 { + kind: SyntaxKind.Node96; + propNode96: number; +} +export interface Node97 { + kind: SyntaxKind.Node97; + propNode97: number; +} +export interface Node98 { + kind: SyntaxKind.Node98; + propNode98: number; +} +export interface Node99 { + kind: SyntaxKind.Node99; + propNode99: number; +} +export type Node = Node0 | Node1 | Node2 | Node3 | Node4 | Node5 | Node6 | Node7 | Node8 | Node9 | Node10 | Node11 | Node12 | Node13 | Node14 | Node15 | Node16 | Node17 | Node18 | Node19 | Node20 | Node21 | Node22 | Node23 | Node24 | Node25 | Node26 | Node27 | Node28 | Node29 | Node30 | Node31 | Node32 | Node33 | Node34 | Node35 | Node36 | Node37 | Node38 | Node39 | Node40 | Node41 | Node42 | Node43 | Node44 | Node45 | Node46 | Node47 | Node48 | Node49 | Node50 | Node51 | Node52 | Node53 | Node54 | Node55 | Node56 | Node57 | Node58 | Node59 | Node60 | Node61 | Node62 | Node63 | Node64 | Node65 | Node66 | Node67 | Node68 | Node69 | Node70 | Node71 | Node72 | Node73 | Node74 | Node75 | Node76 | Node77 | Node78 | Node79 | Node80 | Node81 | Node82 | Node83 | Node84 | Node85 | Node86 | Node87 | Node88 | Node89 | Node90 | Node91 | Node92 | Node93 | Node94 | Node95 | Node96 | Node97 | Node98 | Node99; +//# sourceMappingURL=ast.d.ts.map +//// [index.d.ts] +import * as ast from "./ast"; +export declare const isNodeOfType: (nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [ast.d.ts.map] +{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["ast.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAAG,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,M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,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgZW51bSBTeW50YXhLaW5kIHsNCiAgICBOb2RlMCA9IDAsDQogICAgTm9kZTEgPSAxLA0KICAgIE5vZGUyID0gMiwNCiAgICBOb2RlMyA9IDMsDQogICAgTm9kZTQgPSA0LA0KICAgIE5vZGU1ID0gNSwNCiAgICBOb2RlNiA9IDYsDQogICAgTm9kZTcgPSA3LA0KICAgIE5vZGU4ID0gOCwNCiAgICBOb2RlOSA9IDksDQogICAgTm9kZTEwID0gMTAsDQogICAgTm9kZTExID0gMTEsDQogICAgTm9kZTEyID0gMTIsDQogICAgTm9kZTEzID0gMTMsDQogICAgTm9kZTE0ID0gMTQsDQogICAgTm9kZTE1ID0gMTUsDQogICAgTm9kZTE2ID0gMTYsDQogICAgTm9kZTE3ID0gMTcsDQogICAgTm9kZTE4ID0gMTgsDQogICAgTm9kZTE5ID0gMTksDQogICAgTm9kZTIwID0gMjAsDQogICAgTm9kZTIxID0gMjEsDQogICAgTm9kZTIyID0gMjIsDQogICAgTm9kZTIzID0gMjMsDQogICAgTm9kZTI0ID0gMjQsDQogICAgTm9kZTI1ID0gMjUsDQogICAgTm9kZTI2ID0gMjYsDQogICAgTm9kZTI3ID0gMjcsDQogICAgTm9kZTI4ID0gMjgsDQogICAgTm9kZTI5ID0gMjksDQogICAgTm9kZTMwID0gMzAsDQogICAgTm9kZTMxID0gMzEsDQogICAgTm9kZTMyID0gMzIsDQogICAgTm9kZTMzID0gMzMsDQogICAgTm9kZTM0ID0gMzQsDQogICAgTm9kZTM1ID0gMzUsDQogICAgTm9kZTM2ID0gMzYsDQogICAgTm9kZTM3ID0gMzcsDQogICAgTm9kZTM4ID0gMzgsDQogICAgTm9kZTM5ID0gMzksDQogICAgTm9kZTQwID0gNDAsDQogICAgTm9kZTQxID0gNDEsDQogICAgTm9kZTQyID0gNDIsDQogICAgTm9kZTQzID0gNDMsDQogICAgTm9kZTQ0ID0gNDQsDQogICAgTm9kZTQ1ID0gNDUsDQogICAgTm9kZTQ2ID0gNDYsDQogICAgTm9kZTQ3ID0gNDcsDQogICAgTm9kZTQ4ID0gNDgsDQogICAgTm9kZTQ5ID0gNDksDQogICAgTm9kZTUwID0gNTAsDQogICAgTm9kZTUxID0gNTEsDQogICAgTm9kZTUyID0gNTIsDQogICAgTm9kZTUzID0gNTMsDQogICAgTm9kZTU0ID0gNTQsDQogICAgTm9kZTU1ID0gNTUsDQogICAgTm9kZTU2ID0gNTYsDQogICAgTm9kZTU3ID0gNTcsDQogICAgTm9kZTU4ID0gNTgsDQogICAgTm9kZTU5ID0gNTksDQogICAgTm9kZTYwID0gNjAsDQogICAgTm9kZTYxID0gNjEsDQogICAgTm9kZTYyID0gNjIsDQogICAgTm9kZTYzID0gNjMsDQogICAgTm9kZTY0ID0gNjQsDQogICAgTm9kZTY1ID0gNjUsDQogICAgTm9kZTY2ID0gNjYsDQogICAgTm9kZTY3ID0gNjcsDQogICAgTm9kZTY4ID0gNjgsDQogICAgTm9kZTY5ID0gNjksDQogICAgTm9kZTcwID0gNzAsDQogICAgTm9kZTcxID0gNzEsDQogICAgTm9kZTcyID0gNzIsDQogICAgTm9kZTczID0gNzMsDQogICAgTm9kZTc0ID0gNzQsDQogICAgTm9kZTc1ID0gNzUsDQogICAgTm9kZTc2ID0gNzYsDQogICAgTm9kZTc3ID0gNzcsDQogICAgTm9kZTc4ID0gNzgsDQogICAgTm9kZTc5ID0gNzksDQogICAgTm9kZTgwID0gODAsDQogICAgTm9kZTgxID0gODEsDQogICAgTm9kZTgyID0gODIsDQogICAgTm9kZTgzID0gODMsDQogICAgT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HwgRXh0cmFjdDxhc3QuTm9kZTkxLCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTkyLCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTkzLCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk0LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk1LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk2LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk3LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk4LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk5LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+ID0+CiAgKAogICAgbm9kZTogYXN0Lk5vZGUgfCBudWxsIHwgdW5kZWZpbmVkLAogICk6IG5vZGUgaXMgRXh0cmFjdDxhc3QuTm9kZSwgeyBraW5kOiBOb2RlVHlwZSB9PiA9PgogICAgbm9kZT8ua2luZCA9PT0gbm9kZVR5cGU7Cgo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts new file mode 100644 index 0000000000000..eb5251057632e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -0,0 +1,319 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts] //// + +//// [typeFromPropertyAssignment29.ts] +function ExpandoDecl(n: number): string { + return n.toString(); +} +ExpandoDecl.prop = 2 +ExpandoDecl.m = function(n: number) { + return n + 1; +} +var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length + +const ExpandoExpr: { + (n: number): string; + prop: { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; + m(n: number): number; +} = function (n: number): string { + return n.toString(); +} +ExpandoExpr.prop = { x: 2 } +ExpandoExpr.prop = { y: "" } +ExpandoExpr.m = function(n: number) { + return n + 1; +} +var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + +const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; +} = (n: number): string => n.toString(); +ExpandoArrow.prop = 2 +ExpandoArrow.m = function(n: number) { + return n + 1; + +} + +function ExpandoNested(n: number): { + (m: number): number; + total: number; +} { + const nested = function (m: number) { + return n + m; + }; + nested.total = n + 1_000_000; + return nested; +} +ExpandoNested.also = -1; + +function ExpandoMerge(n: number): number { + return n * 100; +} +ExpandoMerge.p1 = 111 +namespace ExpandoMerge { + export var p2 = 222; +} +namespace ExpandoMerge { + export var p3 = 333; +} +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + +namespace Ns { + function ExpandoNamespace(): void {} + ExpandoNamespace.p6 = 42; + export function foo(): typeof ExpandoNamespace { + return ExpandoNamespace; + } +} + +// Should not work in Typescript -- must be const +var ExpandoExpr2 = function (n: number): string { + return n.toString(); +} +ExpandoExpr2.prop = 2 +ExpandoExpr2.m = function(n: number) { + return n + 1; +} +var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length + +// Should not work in typescript -- classes already have statics +class ExpandoClass { + n = 1001; +} +ExpandoClass.prop = 2 +ExpandoClass.m = function(n: number) { + return n + 1; +} +var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n + +// Class expressions shouldn't work in typescript either +var ExpandoExpr3 = class { + n = 10001; +} +ExpandoExpr3.prop = 3 +ExpandoExpr3.m = function(n: number) { + return n + 1; +} +var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n + + + +/// [Declarations] //// + + + +//// [typeFromPropertyAssignment29.d.ts] +declare function ExpandoDecl(n: number): string; +declare var n: number; +declare const ExpandoExpr: { + (n: number): string; + prop: { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; + m(n: number): number; +}; +declare var n: number; +declare const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; +}; +declare function ExpandoNested(n: number): { + (m: number): number; + total: number; +}; +declare function ExpandoMerge(n: number): number; +declare namespace ExpandoMerge { + var p2: number; +} +declare namespace ExpandoMerge { + var p3: number; +} +declare var n: number; +declare namespace Ns { + function ExpandoNamespace(): void; + export function foo(): typeof ExpandoNamespace; + export {}; +} +declare var ExpandoExpr2: (n: number) => string; +declare var n: number; +declare class ExpandoClass { + n: number; +} +declare var n: number; +declare var ExpandoExpr3: invalid; +declare var n: number; +//# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map +/// [Errors] //// + +typeFromPropertyAssignment29.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment29.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment29.ts(51,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment29.ts(56,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment29.ts(67,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment29.ts(77,14): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(78,14): error TS2339: Property 'm' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,22): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,42): error TS2339: Property 'm' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(87,14): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(88,14): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,22): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,42): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(94,20): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. +typeFromPropertyAssignment29.ts(97,14): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(98,14): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,22): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + + +==== typeFromPropertyAssignment29.ts (18 errors) ==== + function ExpandoDecl(n: number): string { + return n.toString(); + } + ExpandoDecl.prop = 2 + ~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoDecl.m = function(n: number) { + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return n + 1; + } + var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length + + const ExpandoExpr: { + (n: number): string; + prop: { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; + m(n: number): number; + } = function (n: number): string { + return n.toString(); + } + ExpandoExpr.prop = { x: 2 } + ExpandoExpr.prop = { y: "" } + ExpandoExpr.m = function(n: number) { + return n + 1; + } + var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + + const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; + } = (n: number): string => n.toString(); + ExpandoArrow.prop = 2 + ExpandoArrow.m = function(n: number) { + return n + 1; + + } + + function ExpandoNested(n: number): { + (m: number): number; + total: number; + } { + const nested = function (m: number) { + return n + m; + }; + nested.total = n + 1_000_000; + return nested; + } + ExpandoNested.also = -1; + ~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + function ExpandoMerge(n: number): number { + return n * 100; + } + ExpandoMerge.p1 = 111 + ~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + namespace ExpandoMerge { + export var p2 = 222; + } + namespace ExpandoMerge { + export var p3 = 333; + } + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + + namespace Ns { + function ExpandoNamespace(): void {} + ExpandoNamespace.p6 = 42; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + export function foo(): typeof ExpandoNamespace { + return ExpandoNamespace; + } + } + + // Should not work in Typescript -- must be const + var ExpandoExpr2 = function (n: number): string { + return n.toString(); + } + ExpandoExpr2.prop = 2 + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type '(n: number) => string'. + ExpandoExpr2.m = function(n: number) { + ~ +!!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. + return n + 1; + } + var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type '(n: number) => string'. + ~ +!!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. + + // Should not work in typescript -- classes already have statics + class ExpandoClass { + n = 1001; + } + ExpandoClass.prop = 2 + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. + ExpandoClass.m = function(n: number) { + ~ +!!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. + return n + 1; + } + var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. + ~ +!!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. + + // Class expressions shouldn't work in typescript either + var ExpandoExpr3 = class { + ~~~~~ +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + n = 10001; + } + ExpandoExpr3.prop = 3 + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. + ExpandoExpr3.m = function(n: number) { + ~ +!!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + return n + 1; + } + var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. + ~ +!!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeGuardFunctionOfFormThis.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeGuardFunctionOfFormThis.d.ts.map new file mode 100644 index 0000000000000..453a1e803e557 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeGuardFunctionOfFormThis.d.ts.map @@ -0,0 +1,218 @@ +//// [tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts] //// + +//// [typeGuardFunctionOfFormThis.ts] +class RoyalGuard { + isLeader(): this is LeadGuard { + return this instanceof LeadGuard; + } + isFollower(): this is FollowerGuard { + return this instanceof FollowerGuard; + } +} + +class LeadGuard extends RoyalGuard { + lead(): void {}; +} + +class FollowerGuard extends RoyalGuard { + follow(): void {}; +} + +let a: RoyalGuard = new FollowerGuard(); +if (a.isLeader()) { + a.lead(); +} +else if (a.isFollower()) { + a.follow(); +} + +interface GuardInterface extends RoyalGuard {} + +let b: GuardInterface; +if (b.isLeader()) { + b.lead(); +} +else if (b.isFollower()) { + b.follow(); +} + +// if (((a.isLeader)())) { +// a.lead(); +// } +// else if (((a).isFollower())) { +// a.follow(); +// } + +// if (((a["isLeader"])())) { +// a.lead(); +// } +// else if (((a)["isFollower"]())) { +// a.follow(); +// } + +var holder2: { + a: RoyalGuard; +} = {a}; + +if (holder2.a.isLeader()) { + holder2.a; +} +else { + holder2.a; +} + +class ArrowGuard { + isElite = (): this is ArrowElite => { + return this instanceof ArrowElite; + } + isMedic = (): this is ArrowMedic => { + return this instanceof ArrowMedic; + } +} + +class ArrowElite extends ArrowGuard { + defend(): void {} +} + +class ArrowMedic extends ArrowGuard { + heal(): void {} +} + +let guard: ArrowGuard = new ArrowGuard(); +if (guard.isElite()) { + guard.defend(); +} +else if (guard.isMedic()) { + guard.heal(); +} + +interface Supplies { + spoiled: boolean; +} + +interface Sundries { + broken: boolean; +} + +interface Crate { + contents: T; + volume: number; + isSupplies(): this is Crate; + isSundries(): this is Crate; +} + +let crate: Crate<{}>; + +if (crate.isSundries()) { + crate.contents.broken = true; +} +else if (crate.isSupplies()) { + crate.contents.spoiled = true; +} + +// Matching guards should be assignable + +a.isFollower = b.isFollower; +a.isLeader = b.isLeader; + +class MimicGuard { + isLeader(): this is MimicLeader { return this instanceof MimicLeader; }; + isFollower(): this is MimicFollower { return this instanceof MimicFollower; }; +} + +class MimicLeader extends MimicGuard { + lead(): void {} +} + +class MimicFollower extends MimicGuard { + follow(): void {} +} + +let mimic: MimicGuard = new MimicGuard(); + +a.isLeader = mimic.isLeader; +a.isFollower = mimic.isFollower; + +if (mimic.isFollower()) { + mimic.follow(); + mimic.isFollower = a.isFollower; +} + + +interface MimicGuardInterface { + isLeader(): this is LeadGuard; + isFollower(): this is FollowerGuard; +} + + +/// [Declarations] //// + + + +//// [typeGuardFunctionOfFormThis.d.ts] +declare class RoyalGuard { + isLeader(): this is LeadGuard; + isFollower(): this is FollowerGuard; +} +declare class LeadGuard extends RoyalGuard { + lead(): void; +} +declare class FollowerGuard extends RoyalGuard { + follow(): void; +} +declare let a: RoyalGuard; +interface GuardInterface extends RoyalGuard { +} +declare let b: GuardInterface; +declare var holder2: { + a: RoyalGuard; +}; +declare class ArrowGuard { + isElite: () => this is ArrowElite; + isMedic: () => this is ArrowMedic; +} +declare class ArrowElite extends ArrowGuard { + defend(): void; +} +declare class ArrowMedic extends ArrowGuard { + heal(): void; +} +declare let guard: ArrowGuard; +interface Supplies { + spoiled: boolean; +} +interface Sundries { + broken: boolean; +} +interface Crate { + contents: T; + volume: number; + isSupplies(): this is Crate; + isSundries(): this is Crate; +} +declare let crate: Crate<{}>; +declare class MimicGuard { + isLeader(): this is MimicLeader; + isFollower(): this is MimicFollower; +} +declare class MimicLeader extends MimicGuard { + lead(): void; +} +declare class MimicFollower extends MimicGuard { + follow(): void; +} +declare let mimic: MimicGuard; +interface MimicGuardInterface { + isLeader(): this is LeadGuard; + isFollower(): this is FollowerGuard; +} +//# sourceMappingURL=typeGuardFunctionOfFormThis.d.ts.map + +/// [Declarations Maps] //// + + +//// [typeGuardFunctionOfFormThis.d.ts.map] +{"version":3,"file":"typeGuardFunctionOfFormThis.d.ts","sourceRoot":"","sources":["typeGuardFunctionOfFormThis.ts"],"names":[],"mappings":"AAAA,cAAM,UAAU;IACZ,QAAQ,IAAI,IAAI,IAAI,SAAS;IAG7B,UAAU,IAAI,IAAI,IAAI,aAAa;CAGtC;AAED,cAAM,SAAU,SAAQ,UAAU;IAC9B,IAAI,IAAI,IAAI;CACf;AAED,cAAM,aAAc,SAAQ,UAAU;IAClC,MAAM,IAAI,IAAI;CACjB;AAED,QAAA,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E1pbWljTGVhZGVyOyB9OwogICAgaXNGb2xsb3dlcigpOiB0aGlzIGlzIE1pbWljRm9sbG93ZXIgeyByZXR1cm4gdGhpcyBpbnN0YW5jZW9mIE1pbWljRm9sbG93ZXI7IH07Cn0KCmNsYXNzIE1pbWljTGVhZGVyIGV4dGVuZHMgTWltaWNHdWFyZCB7CiAgICBsZWFkKCk6IHZvaWQge30KfQoKY2xhc3MgTWltaWNGb2xsb3dlciBleHRlbmRzIE1pbWljR3VhcmQgewogICAgZm9sbG93KCk6IHZvaWQge30KfQoKbGV0IG1pbWljOiBNaW1pY0d1YXJkID0gbmV3IE1pbWljR3VhcmQoKTsKCmEuaXNMZWFkZXIgPSBtaW1pYy5pc0xlYWRlcjsKYS5pc0ZvbGxvd2VyID0gbWltaWMuaXNGb2xsb3dlcjsKCmlmIChtaW1pYy5pc0ZvbGxvd2VyKCkpIHsKICAgIG1pbWljLmZvbGxvdygpOwogICAgbWltaWMuaXNGb2xsb3dlciA9IGEuaXNGb2xsb3dlcjsKfQoKCmludGVyZmFjZSBNaW1pY0d1YXJkSW50ZXJmYWNlIHsKICAgIGlzTGVhZGVyKCk6IHRoaXMgaXMgTGVhZEd1YXJkOwogICAgaXNGb2xsb3dlcigpOiB0aGlzIGlzIEZvbGxvd2VyR3VhcmQ7Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeofImportTypeOnlyExport.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeofImportTypeOnlyExport.d.ts.map new file mode 100644 index 0000000000000..f19271103d853 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeofImportTypeOnlyExport.d.ts.map @@ -0,0 +1,62 @@ +//// [tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts] //// + +//// [button.ts] +import {ClassMapDirective, classMap} from './lit.js'; +export const c: { + directive: ClassMapDirective; +} = classMap(); + +//// [lit.ts] +class ClassMapDirective {} + +export type {ClassMapDirective}; + +export const directive = + (class_: C): () => { + directive: C; + } => + () => ({ + directive: class_, + }); + +export const classMap: () => { + directive: typeof ClassMapDirective; +} = directive(ClassMapDirective); + + +/// [Declarations] //// + + + +//// [button.d.ts] +import { ClassMapDirective } from './lit.js'; +export declare const c: { + directive: ClassMapDirective; +}; +//# sourceMappingURL=button.d.ts.map +//// [/.src/lit.d.ts] +declare class ClassMapDirective { +} +export type { ClassMapDirective }; +export declare const directive: (class_: C) => () => { + directive: C; +}; +export declare const classMap: () => { + directive: typeof ClassMapDirective; +}; +//# sourceMappingURL=lit.d.ts.map + +/// [Declarations Maps] //// + + +//// [button.d.ts.map] +{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAW,MAAM,UAAU,CAAC;AACrD,eAAO,MAAM,CAAC,EAAE;IACZ,SAAS,EAAE,iBAAiB,CAAC;CACnB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgQ2xhc3NNYXBEaXJlY3RpdmUgfSBmcm9tICcuL2xpdC5qcyc7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBjOiB7DQogICAgZGlyZWN0aXZlOiBDbGFzc01hcERpcmVjdGl2ZTsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1idXR0b24uZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJidXR0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGlCQUFpQixFQUFXLE1BQU0sVUFBVSxDQUFDO0FBQ3JELGVBQU8sTUFBTSxDQUFDLEVBQUU7SUFDWixTQUFTLEVBQUUsaUJBQWlCLENBQUM7Q0FDbkIsQ0FBQyJ9,aW1wb3J0IHtDbGFzc01hcERpcmVjdGl2ZSwgY2xhc3NNYXB9IGZyb20gJy4vbGl0LmpzJzsKZXhwb3J0IGNvbnN0IGM6IHsKICAgIGRpcmVjdGl2ZTogQ2xhc3NNYXBEaXJlY3RpdmU7Cn0gPSBjbGFzc01hcCgpOwo= + + +//// [/.src/lit.d.ts.map] +{"version":3,"file":"lit.d.ts","sourceRoot":"","sources":["lit.ts"],"names":[],"mappings":"AAAA,cAAM,iBAAiB;CAAG;AAE1B,YAAY,EAAC,iBAAiB,EAAC,CAAC;AAEhC,eAAO,MAAM,SAAS,GACnB,CAAC,EAAE,MAAM,EAAE,CAAC,KAAG,MAAM;IAClB,SAAS,EAAE,CAAC,CAAC;CAIf,CAAC;AAEL,eAAO,MAAM,QAAQ,EAAE,MAAM;IACzB,SAAS,EAAE,OAAO,iBAAiB,CAAC;CACR,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBDbGFzc01hcERpcmVjdGl2ZSB7DQp9DQpleHBvcnQgdHlwZSB7IENsYXNzTWFwRGlyZWN0aXZlIH07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBkaXJlY3RpdmU6IDxDPihjbGFzc186IEMpID0+ICgpID0+IHsNCiAgICBkaXJlY3RpdmU6IEM7DQp9Ow0KZXhwb3J0IGRlY2xhcmUgY29uc3QgY2xhc3NNYXA6ICgpID0+IHsNCiAgICBkaXJlY3RpdmU6IHR5cGVvZiBDbGFzc01hcERpcmVjdGl2ZTsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1saXQuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGl0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJsaXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxpQkFBaUI7Q0FBRztBQUUxQixZQUFZLEVBQUMsaUJBQWlCLEVBQUMsQ0FBQztBQUVoQyxlQUFPLE1BQU0sU0FBUyxHQUNuQixDQUFDLEVBQUUsTUFBTSxFQUFFLENBQUMsS0FBRyxNQUFNO0lBQ2xCLFNBQVMsRUFBRSxDQUFDLENBQUM7Q0FJZixDQUFDO0FBRUwsZUFBTyxNQUFNLFFBQVEsRUFBRSxNQUFNO0lBQ3pCLFNBQVMsRUFBRSxPQUFPLGlCQUFpQixDQUFDO0NBQ1IsQ0FBQyJ9,Y2xhc3MgQ2xhc3NNYXBEaXJlY3RpdmUge30KCmV4cG9ydCB0eXBlIHtDbGFzc01hcERpcmVjdGl2ZX07CgpleHBvcnQgY29uc3QgZGlyZWN0aXZlID0KICA8Qz4oY2xhc3NfOiBDKTogKCkgPT4gewogICAgICBkaXJlY3RpdmU6IEM7CiAgfSA9PgogICgpID0+ICh7CiAgICBkaXJlY3RpdmU6IGNsYXNzXywKICB9KTsKCmV4cG9ydCBjb25zdCBjbGFzc01hcDogKCkgPT4gewogICAgZGlyZWN0aXZlOiB0eXBlb2YgQ2xhc3NNYXBEaXJlY3RpdmU7Cn0gPSBkaXJlY3RpdmUoQ2xhc3NNYXBEaXJlY3RpdmUpOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFile.d.ts new file mode 100644 index 0000000000000..a1931acaa51ce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFile.d.ts @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts] //// + +//// [main.ts] +import { fa } from "ext"; +import { fb } from "ext/other"; + +export const va = fa(); +export const vb = fb(); + +//// [package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } +} + +//// [index.d.ts] +export interface A {} +export function fa(): A; + +//// [other.d.ts] +export interface B {} +export function fb(): B; + +//// [index.d.ts] +export interface A {} +export function fa(): A; + +//// [other.d.ts] +export interface B {} +export function fb(): B; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: invalid; +export declare const vb: invalid; +//# sourceMappingURL=main.d.ts.map +/// [Errors] //// + +main.ts(4,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +main.ts(5,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== main.ts (2 errors) ==== + import { fa } from "ext"; + import { fb } from "ext/other"; + + export const va = fa(); + ~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:4:14: Add a type annotation to the variable va. + export const vb = fb(); + ~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:5:14: Add a type annotation to the variable vb. + +==== node_modules/ext/package.json (0 errors) ==== + { + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } + } + +==== node_modules/ext/index.d.ts (0 errors) ==== + export interface A {} + export function fa(): A; + +==== node_modules/ext/other.d.ts (0 errors) ==== + export interface B {} + export function fb(): B; + +==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== + export interface A {} + export function fa(): A; + +==== node_modules/ext/ts3.1/other.d.ts (0 errors) ==== + export interface B {} + export function fb(): B; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts new file mode 100644 index 0000000000000..307061f950d4a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts @@ -0,0 +1,84 @@ +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts] //// + +//// [main.ts] +import { fa } from "ext"; +import { fb } from "ext/other"; + +export const va: any = fa(); +export const vb = fb(); + +//// [package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } +} + +//// [index.d.ts] +export interface A {} +export function fa(): A; + +//// [other.d.ts] +export interface B {} +export function fb(): B; + +//// [index.d.ts] +export * from "../"; + +//// [other.d.ts] +export * from "../other"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: any; +export declare const vb: invalid; +//# sourceMappingURL=main.d.ts.map +/// [Errors] //// + +main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. +main.ts(5,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== main.ts (2 errors) ==== + import { fa } from "ext"; + ~~ +!!! error TS2305: Module '"ext"' has no exported member 'fa'. + import { fb } from "ext/other"; + + export const va: any = fa(); + export const vb = fb(); + ~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:5:14: Add a type annotation to the variable vb. + +==== node_modules/ext/package.json (0 errors) ==== + { + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } + } + +==== node_modules/ext/index.d.ts (0 errors) ==== + export interface A {} + export function fa(): A; + +==== node_modules/ext/other.d.ts (0 errors) ==== + export interface B {} + export function fb(): B; + +==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== + export * from "../"; + +==== node_modules/ext/ts3.1/other.d.ts (0 errors) ==== + export * from "../other"; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts new file mode 100644 index 0000000000000..764f67f2bf1ec --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts] //// + +//// [main.ts] +import { fa } from "ext"; +import { fa as fa2 } from "ext/other"; + +export const va = fa(); +export const va2 = fa2(); + +//// [package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { + "index" : ["ts3.1/index"] + } + } +} + +//// [index.d.ts] +export interface A {} +export function fa(): A; + +//// [other.d.ts] +export interface A2 {} +export function fa(): A2; + +//// [index.d.ts] +export * from "../other"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: invalid; +export declare const va2: invalid; +//# sourceMappingURL=main.d.ts.map +/// [Errors] //// + +main.ts(4,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +main.ts(5,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== main.ts (2 errors) ==== + import { fa } from "ext"; + import { fa as fa2 } from "ext/other"; + + export const va = fa(); + ~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:4:14: Add a type annotation to the variable va. + export const va2 = fa2(); + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:5:14: Add a type annotation to the variable va2. + +==== node_modules/ext/package.json (0 errors) ==== + { + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { + "index" : ["ts3.1/index"] + } + } + } + +==== node_modules/ext/index.d.ts (0 errors) ==== + export interface A {} + export function fa(): A; + +==== node_modules/ext/other.d.ts (0 errors) ==== + export interface A2 {} + export function fa(): A2; + +==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== + export * from "../other"; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts new file mode 100644 index 0000000000000..5494c730e535c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts @@ -0,0 +1,181 @@ +//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// + +//// [uniqueSymbolsDeclarationsErrors.ts] +declare const s: unique symbol; +interface I { readonly readonlyType: unique symbol; } + +// not allowed when emitting declarations + +export const obj = { + method1(p: typeof s): typeof s { + return p; + }, + method2(p: I["readonlyType"]): I["readonlyType"] { + return p; + } +}; + +export const classExpression = class { + method1(p: typeof s): typeof s { + return p; + } + method2(p: I["readonlyType"]): I["readonlyType"] { + return p; + } +}; + +export function funcInferredReturnType(obj: { method(p: typeof s): void }): { + method(p: typeof s): void; +} { + return obj; +} + +export interface InterfaceWithPrivateNamedProperties { + [s]: any; +} + +export interface InterfaceWithPrivateNamedMethods { + [s](): any; +} + +export type TypeLiteralWithPrivateNamedProperties = { + [s]: any; +} + +export type TypeLiteralWithPrivateNamedMethods = { + [s](): any; +} + +export class ClassWithPrivateNamedProperties { + [s]: any; + static [s]: any; +} + +export class ClassWithPrivateNamedMethods { + [s](): void {} + static [s](): void {} +} + +export class ClassWithPrivateNamedAccessors { + get [s](): any { return undefined; } + set [s](v: any) { } + static get [s](): any { return undefined; } + static set [s](v: any) { } +} + +/// [Declarations] //// + + + +//// [uniqueSymbolsDeclarationsErrors.d.ts] +declare const s: unique symbol; +interface I { + readonly readonlyType: unique symbol; +} +export declare const obj: { + method1(p: typeof s): typeof s; + method2(p: I["readonlyType"]): I["readonlyType"]; +}; +export declare const classExpression: invalid; +export declare function funcInferredReturnType(obj: { + method(p: typeof s): void; +}): { + method(p: typeof s): void; +}; +export interface InterfaceWithPrivateNamedProperties { + [s]: any; +} +export interface InterfaceWithPrivateNamedMethods { + [s](): any; +} +export type TypeLiteralWithPrivateNamedProperties = { + [s]: any; +}; +export type TypeLiteralWithPrivateNamedMethods = { + [s](): any; +}; +export declare class ClassWithPrivateNamedProperties { + [s]: any; + static [s]: any; +} +export declare class ClassWithPrivateNamedMethods { + [s](): void; + static [s](): void; +} +export declare class ClassWithPrivateNamedAccessors { + get [s](): any; + set [s](v: any); + static get [s](): any; + static set [s](v: any); +} +export {}; +//# sourceMappingURL=uniqueSymbolsDeclarationsErrors.d.ts.map +/// [Errors] //// + +uniqueSymbolsDeclarationsErrors.ts(15,32): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + + +==== uniqueSymbolsDeclarationsErrors.ts (1 errors) ==== + declare const s: unique symbol; + interface I { readonly readonlyType: unique symbol; } + + // not allowed when emitting declarations + + export const obj = { + method1(p: typeof s): typeof s { + return p; + }, + method2(p: I["readonlyType"]): I["readonlyType"] { + return p; + } + }; + + export const classExpression = class { + ~~~~~ +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + method1(p: typeof s): typeof s { + return p; + } + method2(p: I["readonlyType"]): I["readonlyType"] { + return p; + } + }; + + export function funcInferredReturnType(obj: { method(p: typeof s): void }): { + method(p: typeof s): void; + } { + return obj; + } + + export interface InterfaceWithPrivateNamedProperties { + [s]: any; + } + + export interface InterfaceWithPrivateNamedMethods { + [s](): any; + } + + export type TypeLiteralWithPrivateNamedProperties = { + [s]: any; + } + + export type TypeLiteralWithPrivateNamedMethods = { + [s](): any; + } + + export class ClassWithPrivateNamedProperties { + [s]: any; + static [s]: any; + } + + export class ClassWithPrivateNamedMethods { + [s](): void {} + static [s](): void {} + } + + export class ClassWithPrivateNamedAccessors { + get [s](): any { return undefined; } + set [s](v: any) { } + static get [s](): any { return undefined; } + static set [s](v: any) { } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/variadicTuples1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/variadicTuples1.d.ts.map new file mode 100644 index 0000000000000..ebefe005a9c1f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/variadicTuples1.d.ts.map @@ -0,0 +1,645 @@ +//// [tests/cases/conformance/types/tuple/variadicTuples1.ts] //// + +//// [variadicTuples1.ts] +// Variadics in tuple types + +type TV0 = [string, ...T]; +type TV1 = [string, ...T, number]; +type TV2 = [string, ...T, number, ...T]; +type TV3 = [string, ...T, ...number[], ...T]; + +// Normalization + +type TN1 = TV1<[boolean, string]>; +type TN2 = TV1<[]>; +type TN3 = TV1<[boolean?]>; +type TN4 = TV1; +type TN5 = TV1<[boolean] | [symbol, symbol]>; +type TN6 = TV1; +type TN7 = TV1; + +// Variadics in array literals + +function tup2(t: [...T], u: [...U]): readonly [1, ...T, 2, ...U, 3] { + return [1, ...t, 2, ...u, 3] as const; +} + +const t2: readonly [1, string, 2, number, boolean, 3] = tup2(['hello'], [10, true]); + +function concat(t: [...T], u: [...U]): [...T, ...U] { + return [...t, ...u]; +} + +declare const sa: string[]; + +const tc1: [] = concat([], []); +const tc2: [ + string, + number +] = concat(['hello'], [42]); +const tc3: [ + number, + number, + number, + ...string[] +] = concat([1, 2, 3], sa); +const tc4: [ + ...string[], + number, + number, + number +] = concat(sa, [1, 2, 3]); // Ideally would be [...string[], number, number, number] + +function concat2(t: T, u: U): (T[number] | U[number])[] { + return [...t, ...u]; // (T[number] | U[number])[] +} + +const tc5: (2 | 4 | 1 | 3 | 6 | 5)[] = concat2([1, 2, 3] as const, [4, 5, 6] as const); // (1 | 2 | 3 | 4 | 5 | 6)[] + +// Spread arguments + +declare function foo1(a: number, b: string, c: boolean, ...d: number[]): void; + +function foo2(t1: [number, string], t2: [boolean], a1: number[]): void { + foo1(1, 'abc', true, 42, 43, 44); + foo1(...t1, true, 42, 43, 44); + foo1(...t1, ...t2, 42, 43, 44); + foo1(...t1, ...t2, ...a1); + foo1(...t1); // Error + foo1(...t1, 45); // Error +} + +declare function foo3(x: number, ...args: [...T, number]): T; + +function foo4(u: U): void { + foo3(1, 2); + foo3(1, 'hello', true, 2); + foo3(1, ...u, 'hi', 2); + foo3(1); +} + +// Contextual typing of array literals + +declare function ft1(t: T): T; +declare function ft2(t: T): readonly [...T]; +declare function ft3(t: [...T]): T; +declare function ft4(t: [...T]): readonly [...T]; + +ft1(['hello', 42]); // (string | number)[] +ft2(['hello', 42]); // readonly (string | number)[] +ft3(['hello', 42]); // [string, number] +ft4(['hello', 42]); // readonly [string, number] + +// Indexing variadic tuple types + +function f0(t: [string, ...T], n: number): void { + const a = t[0]; // string + const b = t[1]; // [string, ...T][1] + const c = t[2]; // [string, ...T][2] + const d = t[n]; // [string, ...T][number] +} + +function f1(t: [string, ...T, number], n: number): void { + const a = t[0]; // string + const b = t[1]; // number | T[number] + const c = t[2]; // [string, ...T, number][2] + const d = t[n]; // [string, ...T, number][number] +} + +// Destructuring variadic tuple types + +function f2(t: [string, ...T]): void { + let [...ax] = t; // [string, ...T] + let [b1, ...bx] = t; // string, [...T] + let [c1, c2, ...cx] = t; // string, [string, ...T][1], T[number][] +} + +function f3(t: [string, ...T, number]): void { + let [...ax] = t; // [string, ...T, number] + let [b1, ...bx] = t; // string, [...T, number] + let [c1, c2, ...cx] = t; // string, number | T[number], (number | T[number])[] +} + +// Mapped types applied to variadic tuple types + +type Arrayify = { [P in keyof T]: T[P][] }; + +type TM1 = Arrayify; // [string[], (number | undefined)[]?, Arrayify, ...boolean[][]] + +type TP1 = Partial<[string, ...T, number]>; // [string?, Partial, number?] +type TP2 = Partial<[string, ...T, ...number[]]>; // [string?, Partial, ...(number | undefined)[]] + +// Reverse mapping through mapped type applied to variadic tuple type + +declare function fm1(t: Arrayify<[string, number, ...T]>): T; + +let tm1: [ + boolean, + string +] = fm1([['abc'], [42], [true], ['def']]); // [boolean, string] + +// Spread of readonly array-like infers mutable array-like + +declare function fx1(a: string, ...args: T): T; + +function gx1(u: U, v: V): void { + fx1('abc'); // [] + fx1('abc', ...u); // U + fx1('abc', ...v); // [...V] + fx1('abc', ...u); // U + fx1('abc', ...v); // Error +} + +declare function fx2(a: string, ...args: T): T; + +function gx2(u: U, v: V): void { + fx2('abc'); // [] + fx2('abc', ...u); // U + fx2('abc', ...v); // [...V] + fx2('abc', ...u); // U + fx2('abc', ...v); // V +} + +// Relations involving variadic tuple types + +function f10(x: [string, ...unknown[]], y: [string, ...T], z: [string, ...U]): void { + x = y; + x = z; + y = x; // Error + y = z; + z = x; // Error + z = y; // Error +} + +// For a generic type T, [...T] is assignable to T, T is assignable to readonly [...T], and T is assignable +// to [...T] when T is constrained to a mutable array or tuple type. + +function f11(t: T, m: [...T], r: readonly [...T]): void { + t = m; + t = r; // Error + m = t; + m = r; // Error + r = t; + r = m; +} + +function f12(t: T, m: [...T], r: readonly [...T]): void { + t = m; + t = r; // Error + m = t; // Error + m = r; // Error + r = t; + r = m; +} + +function f13(t0: T, t1: [...T], t2: [...U]): void { + t0 = t1; + t0 = t2; + t1 = t0; + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} + +function f14(t0: T, t1: [...T], t2: [...U]): void { + t0 = t1; + t0 = t2; + t1 = t0; // Error + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} + +function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]): void { + k0 = 'length'; + k1 = 'length'; + k2 = 'length'; + k0 = 'slice'; + k1 = 'slice'; + k2 = 'slice'; + k3 = '0'; + k3 = '1'; + k3 = '2'; // Error +} + +// Constraints of variadic tuple types + +function ft16(x: [unknown, unknown], y: [...T, ...T]): void { + x = y; +} + +function ft17(x: [unknown, unknown], y: [...T, ...T]): void { + x = y; +} + +function ft18(x: [unknown, unknown], y: [...T, ...T]): void { + x = y; +} + +// Inference between variadic tuple types + +type First = + T extends readonly [unknown, ...unknown[]] ? T[0] : + T[0] | undefined; + +type DropFirst = T extends readonly [unknown?, ...infer U] ? U : [...T]; + +type Last = + T extends readonly [...unknown[], infer U] ? U : + T extends readonly [unknown, ...unknown[]] ? T[number] : + T[number] | undefined; + +type DropLast = T extends readonly [...infer U, unknown] ? U : [...T]; + +type T00 = First<[number, symbol, string]>; +type T01 = First<[symbol, string]>; +type T02 = First<[string]>; +type T03 = First<[number, symbol, ...string[]]>; +type T04 = First<[symbol, ...string[]]>; +type T05 = First<[string?]>; +type T06 = First; +type T07 = First<[]>; +type T08 = First; +type T09 = First; + +type T10 = DropFirst<[number, symbol, string]>; +type T11 = DropFirst<[symbol, string]>; +type T12 = DropFirst<[string]>; +type T13 = DropFirst<[number, symbol, ...string[]]>; +type T14 = DropFirst<[symbol, ...string[]]>; +type T15 = DropFirst<[string?]>; +type T16 = DropFirst; +type T17 = DropFirst<[]>; +type T18 = DropFirst; +type T19 = DropFirst; + +type T20 = Last<[number, symbol, string]>; +type T21 = Last<[symbol, string]>; +type T22 = Last<[string]>; +type T23 = Last<[number, symbol, ...string[]]>; +type T24 = Last<[symbol, ...string[]]>; +type T25 = Last<[string?]>; +type T26 = Last; +type T27 = Last<[]>; +type T28 = Last; +type T29 = Last; + +type T30 = DropLast<[number, symbol, string]>; +type T31 = DropLast<[symbol, string]>; +type T32 = DropLast<[string]>; +type T33 = DropLast<[number, symbol, ...string[]]>; +type T34 = DropLast<[symbol, ...string[]]>; +type T35 = DropLast<[string?]>; +type T36 = DropLast; +type T37 = DropLast<[]>; // unknown[], maybe should be [] +type T38 = DropLast; +type T39 = DropLast; + +type R00 = First; +type R01 = First; +type R02 = First; +type R03 = First; +type R04 = First; +type R05 = First; +type R06 = First; + +type R10 = DropFirst; +type R11 = DropFirst; +type R12 = DropFirst; +type R13 = DropFirst; +type R14 = DropFirst; +type R15 = DropFirst; +type R16 = DropFirst; + +type R20 = Last; +type R21 = Last; +type R22 = Last; +type R23 = Last; +type R24 = Last; +type R25 = Last; +type R26 = Last; + +type R30 = DropLast; +type R31 = DropLast; +type R32 = DropLast; +type R33 = DropLast; +type R34 = DropLast; +type R35 = DropLast; +type R36 = DropLast; + +// Inference to [...T, ...U] with implied arity for T + +function curry(f: (...args: [...T, ...U]) => R, ...a: T): (...b: U) => R { + return (...b: U) => f(...a, ...b); +} + +const fn1 = (a: number, b: string, c: boolean, d: string[]): number => 0; + +const c0: (a: number, b: string, c: boolean, d: string[]) => number = curry(fn1); // (a: number, b: string, c: boolean, d: string[]) => number +const c1: (b: string, c: boolean, d: string[]) => number = curry(fn1, 1); // (b: string, c: boolean, d: string[]) => number +const c2: (c: boolean, d: string[]) => number = curry(fn1, 1, 'abc'); // (c: boolean, d: string[]) => number +const c3: (d: string[]) => number = curry(fn1, 1, 'abc', true); // (d: string[]) => number +const c4: () => number = curry(fn1, 1, 'abc', true, ['x', 'y']); // () => number + +const fn2 = (x: number, b: boolean, ...args: string[]): number => 0; + +const c10: (x: number, b: boolean, ...args: string[]) => number = curry(fn2); // (x: number, b: boolean, ...args: string[]) => number +const c11: (b: boolean, ...args: string[]) => number = curry(fn2, 1); // (b: boolean, ...args: string[]) => number +const c12: (...b: string[]) => number = curry(fn2, 1, true); // (...args: string[]) => number +const c13: (...b: string[]) => number = curry(fn2, 1, true, 'abc', 'def'); // (...args: string[]) => number + +const fn3 = (...args: string[]): number => 0; + +const c20: (...b: string[]) => number = curry(fn3); // (...args: string[]) => number +const c21: (...b: string[]) => number = curry(fn3, 'abc', 'def'); // (...args: string[]) => number +const c22: (...b: string[]) => number = curry(fn3, ...sa); // (...args: string[]) => number + +// No inference to [...T, ...U] when there is no implied arity + +function curry2(f: (...args: [...T, ...U]) => R, t: [...T], u: [...U]): R { + return f(...t, ...u); +} + +declare function fn10(a: string, b: number, c: boolean): string[]; + +curry2(fn10, ['hello', 42], [true]); +curry2(fn10, ['hello'], [42, true]); + +// Inference to [...T] has higher priority than inference to [...T, number?] + +declare function ft(t1: [...T], t2: [...T, number?]): T; + +ft([1, 2, 3], [1, 2, 3]); +ft([1, 2], [1, 2, 3]); +ft(['a', 'b'], ['c', 'd']) +ft(['a', 'b'], ['c', 'd', 42]) + +// Last argument is contextually typed + +declare function call(...args: [...T, (...args: T) => R]): [T, R]; + +call('hello', 32, (a, b) => 42); +call(...sa, (...x) => 42); + +// No inference to ending optional elements (except with identical structure) + +declare function f20(args: [...T, number?]): T; + +function f21(args: [...U, number?]): void { + let v1 = f20(args); // U + let v2 = f20(["foo", "bar"]); // [string] + let v3 = f20(["foo", 42]); // [string] +} + +declare function f22(args: [...T, number]): T; +declare function f22(args: [...T]): T; + +function f23(args: [...U, number]): void { + let v1 = f22(args); // U + let v2 = f22(["foo", "bar"]); // [string, string] + let v3 = f22(["foo", 42]); // [string] +} + +// Repro from #39327 + +interface Desc { + readonly f: (...args: A) => T; + bind(this: Desc<[...T, ...U], R>, ...args: T): Desc<[...U], R>; +} + +declare const a: Desc<[string, number, boolean], object>; +const b: Desc<[boolean], object> = a.bind("", 1); // Desc<[boolean], object> + +// Repro from #39607 + +declare function getUser(id: string, options?: { x?: string }): string; + +declare function getOrgUser(id: string, orgId: number, options?: { y?: number, z?: boolean }): void; + +function callApi(method: (...args: [...T, object]) => U): (...args_0: T) => U { + return (...args: [...T]) => method(...args, {}); +} + +callApi(getUser); +callApi(getOrgUser); + +// Repro from #40235 + +type Numbers = number[]; +type Unbounded = [...Numbers, boolean]; +const data: Unbounded = [false, false]; // Error + +type U1 = [string, ...Numbers, boolean]; +type U2 = [...[string, ...Numbers], boolean]; +type U3 = [...[string, number], boolean]; + +// Repro from #53563 + +type ToStringLength1 = `${T['length']}`; +type ToStringLength2 = `${[...T]['length']}`; + + +/// [Declarations] //// + + + +//// [variadicTuples1.d.ts] +type TV0 = [string, ...T]; +type TV1 = [string, ...T, number]; +type TV2 = [string, ...T, number, ...T]; +type TV3 = [string, ...T, ...number[], ...T]; +type TN1 = TV1<[boolean, string]>; +type TN2 = TV1<[]>; +type TN3 = TV1<[boolean?]>; +type TN4 = TV1; +type TN5 = TV1<[boolean] | [symbol, symbol]>; +type TN6 = TV1; +type TN7 = TV1; +declare function tup2(t: [...T], u: [...U]): readonly [1, ...T, 2, ...U, 3]; +declare const t2: readonly [1, string, 2, number, boolean, 3]; +declare function concat(t: [...T], u: [...U]): [...T, ...U]; +declare const sa: string[]; +declare const tc1: []; +declare const tc2: [ + string, + number +]; +declare const tc3: [ + number, + number, + number, + ...string[] +]; +declare const tc4: [ + ...string[], + number, + number, + number +]; +declare function concat2(t: T, u: U): (T[number] | U[number])[]; +declare const tc5: (2 | 4 | 1 | 3 | 6 | 5)[]; +declare function foo1(a: number, b: string, c: boolean, ...d: number[]): void; +declare function foo2(t1: [number, string], t2: [boolean], a1: number[]): void; +declare function foo3(x: number, ...args: [...T, number]): T; +declare function foo4(u: U): void; +declare function ft1(t: T): T; +declare function ft2(t: T): readonly [...T]; +declare function ft3(t: [...T]): T; +declare function ft4(t: [...T]): readonly [...T]; +declare function f0(t: [string, ...T], n: number): void; +declare function f1(t: [string, ...T, number], n: number): void; +declare function f2(t: [string, ...T]): void; +declare function f3(t: [string, ...T, number]): void; +type Arrayify = { + [P in keyof T]: T[P][]; +}; +type TM1 = Arrayify; +type TP1 = Partial<[string, ...T, number]>; +type TP2 = Partial<[string, ...T, ...number[]]>; +declare function fm1(t: Arrayify<[string, number, ...T]>): T; +declare let tm1: [ + boolean, + string +]; +declare function fx1(a: string, ...args: T): T; +declare function gx1(u: U, v: V): void; +declare function fx2(a: string, ...args: T): T; +declare function gx2(u: U, v: V): void; +declare function f10(x: [string, ...unknown[]], y: [string, ...T], z: [string, ...U]): void; +declare function f11(t: T, m: [...T], r: readonly [...T]): void; +declare function f12(t: T, m: [...T], r: readonly [...T]): void; +declare function f13(t0: T, t1: [...T], t2: [...U]): void; +declare function f14(t0: T, t1: [...T], t2: [...U]): void; +declare function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]): void; +declare function ft16(x: [unknown, unknown], y: [...T, ...T]): void; +declare function ft17(x: [unknown, unknown], y: [...T, ...T]): void; +declare function ft18(x: [unknown, unknown], y: [...T, ...T]): void; +type First = T extends readonly [unknown, ...unknown[]] ? T[0] : T[0] | undefined; +type DropFirst = T extends readonly [unknown?, ...infer U] ? U : [...T]; +type Last = T extends readonly [...unknown[], infer U] ? U : T extends readonly [unknown, ...unknown[]] ? T[number] : T[number] | undefined; +type DropLast = T extends readonly [...infer U, unknown] ? U : [...T]; +type T00 = First<[number, symbol, string]>; +type T01 = First<[symbol, string]>; +type T02 = First<[string]>; +type T03 = First<[number, symbol, ...string[]]>; +type T04 = First<[symbol, ...string[]]>; +type T05 = First<[string?]>; +type T06 = First; +type T07 = First<[]>; +type T08 = First; +type T09 = First; +type T10 = DropFirst<[number, symbol, string]>; +type T11 = DropFirst<[symbol, string]>; +type T12 = DropFirst<[string]>; +type T13 = DropFirst<[number, symbol, ...string[]]>; +type T14 = DropFirst<[symbol, ...string[]]>; +type T15 = DropFirst<[string?]>; +type T16 = DropFirst; +type T17 = DropFirst<[]>; +type T18 = DropFirst; +type T19 = DropFirst; +type T20 = Last<[number, symbol, string]>; +type T21 = Last<[symbol, string]>; +type T22 = Last<[string]>; +type T23 = Last<[number, symbol, ...string[]]>; +type T24 = Last<[symbol, ...string[]]>; +type T25 = Last<[string?]>; +type T26 = Last; +type T27 = Last<[]>; +type T28 = Last; +type T29 = Last; +type T30 = DropLast<[number, symbol, string]>; +type T31 = DropLast<[symbol, string]>; +type T32 = DropLast<[string]>; +type T33 = DropLast<[number, symbol, ...string[]]>; +type T34 = DropLast<[symbol, ...string[]]>; +type T35 = DropLast<[string?]>; +type T36 = DropLast; +type T37 = DropLast<[]>; +type T38 = DropLast; +type T39 = DropLast; +type R00 = First; +type R01 = First; +type R02 = First; +type R03 = First; +type R04 = First; +type R05 = First; +type R06 = First; +type R10 = DropFirst; +type R11 = DropFirst; +type R12 = DropFirst; +type R13 = DropFirst; +type R14 = DropFirst; +type R15 = DropFirst; +type R16 = DropFirst; +type R20 = Last; +type R21 = Last; +type R22 = Last; +type R23 = Last; +type R24 = Last; +type R25 = Last; +type R26 = Last; +type R30 = DropLast; +type R31 = DropLast; +type R32 = DropLast; +type R33 = DropLast; +type R34 = DropLast; +type R35 = DropLast; +type R36 = DropLast; +declare function curry(f: (...args: [...T, ...U]) => R, ...a: T): (...b: U) => R; +declare const fn1: (a: number, b: string, c: boolean, d: string[]) => number; +declare const c0: (a: number, b: string, c: boolean, d: string[]) => number; +declare const c1: (b: string, c: boolean, d: string[]) => number; +declare const c2: (c: boolean, d: string[]) => number; +declare const c3: (d: string[]) => number; +declare const c4: () => number; +declare const fn2: (x: number, b: boolean, ...args: string[]) => number; +declare const c10: (x: number, b: boolean, ...args: string[]) => number; +declare const c11: (b: boolean, ...args: string[]) => number; +declare const c12: (...b: string[]) => number; +declare const c13: (...b: string[]) => number; +declare const fn3: (...args: string[]) => number; +declare const c20: (...b: string[]) => number; +declare const c21: (...b: string[]) => number; +declare const c22: (...b: string[]) => number; +declare function curry2(f: (...args: [...T, ...U]) => R, t: [...T], u: [...U]): R; +declare function fn10(a: string, b: number, c: boolean): string[]; +declare function ft(t1: [...T], t2: [...T, number?]): T; +declare function call(...args: [...T, (...args: T) => R]): [T, R]; +declare function f20(args: [...T, number?]): T; +declare function f21(args: [...U, number?]): void; +declare function f22(args: [...T, number]): T; +declare function f22(args: [...T]): T; +declare function f23(args: [...U, number]): void; +interface Desc { + readonly f: (...args: A) => T; + bind(this: Desc<[...T, ...U], R>, ...args: T): Desc<[...U], R>; +} +declare const a: Desc<[string, number, boolean], object>; +declare const b: Desc<[boolean], object>; +declare function getUser(id: string, options?: { + x?: string; +}): string; +declare function getOrgUser(id: string, orgId: number, options?: { + y?: number; + z?: boolean; +}): void; +declare function callApi(method: (...args: [...T, object]) => U): (...args_0: T) => U; +type Numbers = number[]; +type Unbounded = [...Numbers, boolean]; +declare const data: Unbounded; +type U1 = [string, ...Numbers, boolean]; +type U2 = [...[string, ...Numbers], boolean]; +type U3 = [...[string, number], boolean]; +type ToStringLength1 = `${T['length']}`; +type ToStringLength2 = `${[...T]['length']}`; +//# sourceMappingURL=variadicTuples1.d.ts.map + +/// [Declarations Maps] //// + + +//// [variadicTuples1.d.ts.map] +{"version":3,"file":"variadicTuples1.d.ts","sourceRoot":"","sources":["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Li5hcmdzXzA6IFQpID0+IFUgewogICAgcmV0dXJuICguLi5hcmdzOiBbLi4uVF0pID0+IG1ldGhvZCguLi5hcmdzLCB7fSk7Cn0KCmNhbGxBcGkoZ2V0VXNlcik7CmNhbGxBcGkoZ2V0T3JnVXNlcik7CgovLyBSZXBybyBmcm9tICM0MDIzNQoKdHlwZSBOdW1iZXJzID0gbnVtYmVyW107CnR5cGUgVW5ib3VuZGVkID0gWy4uLk51bWJlcnMsIGJvb2xlYW5dOwpjb25zdCBkYXRhOiBVbmJvdW5kZWQgPSBbZmFsc2UsIGZhbHNlXTsgIC8vIEVycm9yCgp0eXBlIFUxID0gW3N0cmluZywgLi4uTnVtYmVycywgYm9vbGVhbl07CnR5cGUgVTIgPSBbLi4uW3N0cmluZywgLi4uTnVtYmVyc10sIGJvb2xlYW5dOwp0eXBlIFUzID0gWy4uLltzdHJpbmcsIG51bWJlcl0sIGJvb2xlYW5dOwoKLy8gUmVwcm8gZnJvbSAjNTM1NjMKCnR5cGUgVG9TdHJpbmdMZW5ndGgxPFQgZXh0ZW5kcyBhbnlbXT4gPSBgJHtUWydsZW5ndGgnXX1gOwp0eXBlIFRvU3RyaW5nTGVuZ3RoMjxUIGV4dGVuZHMgYW55W10+ID0gYCR7Wy4uLlRdWydsZW5ndGgnXX1gOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/varianceAnnotations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/varianceAnnotations.d.ts new file mode 100644 index 0000000000000..163f00136a5a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/varianceAnnotations.d.ts @@ -0,0 +1,640 @@ +//// [tests/cases/conformance/types/typeParameters/typeParameterLists/varianceAnnotations.ts] //// + +//// [varianceAnnotations.ts] +type Covariant = { + x: T; +} + +declare let super_covariant: Covariant; +declare let sub_covariant: Covariant; + +super_covariant = sub_covariant; +sub_covariant = super_covariant; // Error + +type Contravariant = { + f: (x: T) => void; +} + +declare let super_contravariant: Contravariant; +declare let sub_contravariant: Contravariant; + +super_contravariant = sub_contravariant; // Error +sub_contravariant = super_contravariant; + +type Invariant = { + f: (x: T) => T; +} + +declare let super_invariant: Invariant; +declare let sub_invariant: Invariant; + +super_invariant = sub_invariant; // Error +sub_invariant = super_invariant; // Error + +// Variance of various type constructors + +type T10 = T; +type T11 = keyof T; +type T12 = T[K]; +type T13 = T[keyof T]; + +// Variance annotation errors + +type Covariant1 = { // Error + x: T; +} + +type Contravariant1 = keyof T; // Error + +type Contravariant2 = { // Error + f: (x: T) => void; +} + +type Invariant1 = { // Error + f: (x: T) => T; +} + +type Invariant2 = { // Error + f: (x: T) => T; +} + +// Variance in circular types + +type Foo1 = { // Error + x: T; + f: FooFn1; +} + +type FooFn1 = (foo: Bar1) => void; + +type Bar1 = { + value: Foo1; +} + +type Foo2 = { // Error + x: T; + f: FooFn2; +} + +type FooFn2 = (foo: Bar2) => void; + +type Bar2 = { + value: Foo2; +} + +type Foo3 = { + x: T; + f: FooFn3; +} + +type FooFn3 = (foo: Bar3) => void; + +type Bar3 = { + value: Foo3; +} + +// Wrong modifier usage + +type T20 = T; // Error +type T21 = T; // Error +type T22 = T; // Error +type T23 = T; // Error + +declare function f1(x: T): void; // Error +declare function f2(): T; // Error + +class C { + in a = 0; // Error + out b = 0; // Error +} + +// Interface merging + +interface Baz {} +interface Baz {} + +declare let baz1: Baz; +declare let baz2: Baz; + +baz1 = baz2; // Error +baz2 = baz1; // Error + +// Repro from #44572 + +interface Parent { + child: Child | null; + parent: Parent | null; +} + +interface Child extends Parent { + readonly a: A; + readonly b: B; +} + +function fn(inp: Child): void { + const a: Child = inp; +} + +const pu: Parent = { child: { a: 0, b: 0, child: null, parent: null }, parent: null }; +const notString: Parent = pu; // Error + +// Repro from comment in #44572 + +declare class StateNode { + _storedEvent: TEvent; + _action: ActionObject; + _state: StateNode; +} + +interface ActionObject { + exec: (meta: StateNode) => void; +} + +declare function createMachine(action: ActionObject): StateNode; + +declare function interpret(machine: StateNode): void; + +const machine: StateNode = createMachine({} as any); + +interpret(machine); + +declare const qq: ActionObject<{ type: "PLAY"; value: number }>; + +createMachine<{ type: "PLAY"; value: number } | { type: "RESET" }>(qq); // Error + +// Repros from #48618 + +let Anon = class { + foo(): InstanceType<(typeof Anon)> { + return this; + } +} + +let OuterC = class C { + foo(): C { + return this; + } +} + + +/// [Declarations] //// + + + +//// [varianceAnnotations.d.ts] +type Covariant = { + x: T; +}; +declare let super_covariant: Covariant; +declare let sub_covariant: Covariant; +type Contravariant = { + f: (x: T) => void; +}; +declare let super_contravariant: Contravariant; +declare let sub_contravariant: Contravariant; +type Invariant = { + f: (x: T) => T; +}; +declare let super_invariant: Invariant; +declare let sub_invariant: Invariant; +type T10 = T; +type T11 = keyof T; +type T12 = T[K]; +type T13 = T[keyof T]; +type Covariant1 = { + x: T; +}; +type Contravariant1 = keyof T; +type Contravariant2 = { + f: (x: T) => void; +}; +type Invariant1 = { + f: (x: T) => T; +}; +type Invariant2 = { + f: (x: T) => T; +}; +type Foo1 = { + x: T; + f: FooFn1; +}; +type FooFn1 = (foo: Bar1) => void; +type Bar1 = { + value: Foo1; +}; +type Foo2 = { + x: T; + f: FooFn2; +}; +type FooFn2 = (foo: Bar2) => void; +type Bar2 = { + value: Foo2; +}; +type Foo3 = { + x: T; + f: FooFn3; +}; +type FooFn3 = (foo: Bar3) => void; +type Bar3 = { + value: Foo3; +}; +type T20 = T; +type T21 = T; +type T22 = T; +type T23 = T; +declare function f1(x: T): void; +declare function f2(): T; +declare class C { + in a: number; + out b: number; +} +interface Baz { +} +interface Baz { +} +declare let baz1: Baz; +declare let baz2: Baz; +interface Parent { + child: Child | null; + parent: Parent | null; +} +interface Child extends Parent { + readonly a: A; + readonly b: B; +} +declare function fn(inp: Child): void; +declare const pu: Parent; +declare const notString: Parent; +declare class StateNode { + _storedEvent: TEvent; + _action: ActionObject; + _state: StateNode; +} +interface ActionObject { + exec: (meta: StateNode) => void; +} +declare function createMachine(action: ActionObject): StateNode; +declare function interpret(machine: StateNode): void; +declare const machine: StateNode; +declare const qq: ActionObject<{ + type: "PLAY"; + value: number; +}>; +declare let Anon: invalid; +declare let OuterC: invalid; +//# sourceMappingURL=varianceAnnotations.d.ts.map +/// [Errors] //// + +varianceAnnotations.ts(9,1): error TS2322: Type 'Covariant' is not assignable to type 'Covariant'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(18,1): error TS2322: Type 'Contravariant' is not assignable to type 'Contravariant'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(28,1): error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. + Types of property 'f' are incompatible. + Type '(x: string) => string' is not assignable to type '(x: unknown) => unknown'. + Types of parameters 'x' and 'x' are incompatible. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(29,1): error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. + The types returned by 'f(...)' are incompatible between these types. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(33,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(34,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(35,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(35,17): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(36,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(40,17): error TS2636: Type 'Covariant1' is not assignable to type 'Covariant1' as implied by variance annotation. + Types of property 'x' are incompatible. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(44,21): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(46,21): error TS2636: Type 'Contravariant2' is not assignable to type 'Contravariant2' as implied by variance annotation. + Types of property 'f' are incompatible. + Type '(x: sub-T) => void' is not assignable to type '(x: super-T) => void'. + Types of parameters 'x' and 'x' are incompatible. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(50,17): error TS2636: Type 'Invariant1' is not assignable to type 'Invariant1' as implied by variance annotation. + The types returned by 'f(...)' are incompatible between these types. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(54,17): error TS2636: Type 'Invariant2' is not assignable to type 'Invariant2' as implied by variance annotation. + Types of property 'f' are incompatible. + Type '(x: sub-T) => sub-T' is not assignable to type '(x: super-T) => super-T'. + Types of parameters 'x' and 'x' are incompatible. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(60,11): error TS2636: Type 'Foo1' is not assignable to type 'Foo1' as implied by variance annotation. + Types of property 'x' are incompatible. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(71,11): error TS2636: Type 'Foo2' is not assignable to type 'Foo2' as implied by variance annotation. + Types of property 'f' are incompatible. + Type 'FooFn2' is not assignable to type 'FooFn2'. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(95,10): error TS1273: 'public' modifier cannot appear on a type parameter +varianceAnnotations.ts(96,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(96,17): error TS1030: 'in' modifier already seen. +varianceAnnotations.ts(97,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(97,17): error TS1030: 'out' modifier already seen. +varianceAnnotations.ts(98,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(98,14): error TS1029: 'in' modifier must precede 'out' modifier. +varianceAnnotations.ts(100,21): error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias +varianceAnnotations.ts(101,21): error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias +varianceAnnotations.ts(104,5): error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias +varianceAnnotations.ts(105,5): error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias +varianceAnnotations.ts(116,1): error TS2322: Type 'Baz' is not assignable to type 'Baz'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(117,1): error TS2322: Type 'Baz' is not assignable to type 'Baz'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(136,7): error TS2322: Type 'Parent' is not assignable to type 'Parent'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(160,68): error TS2345: Argument of type 'ActionObject<{ type: "PLAY"; value: number; }>' is not assignable to parameter of type 'ActionObject<{ type: "PLAY"; value: number; } | { type: "RESET"; }>'. + Types of property 'exec' are incompatible. + Type '(meta: StateNode) => void' is not assignable to type '(meta: StateNode) => void'. + Types of parameters 'meta' and 'meta' are incompatible. + Type 'StateNode' is not assignable to type 'StateNode'. + Types of property '_storedEvent' are incompatible. + Type '{ type: "PLAY"; value: number; } | { type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. + Type '{ type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. +varianceAnnotations.ts(164,12): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. +varianceAnnotations.ts(170,20): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + + +==== varianceAnnotations.ts (33 errors) ==== + type Covariant = { + x: T; + } + + declare let super_covariant: Covariant; + declare let sub_covariant: Covariant; + + super_covariant = sub_covariant; + sub_covariant = super_covariant; // Error + ~~~~~~~~~~~~~ +!!! error TS2322: Type 'Covariant' is not assignable to type 'Covariant'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + + type Contravariant = { + f: (x: T) => void; + } + + declare let super_contravariant: Contravariant; + declare let sub_contravariant: Contravariant; + + super_contravariant = sub_contravariant; // Error + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'Contravariant' is not assignable to type 'Contravariant'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + sub_contravariant = super_contravariant; + + type Invariant = { + f: (x: T) => T; + } + + declare let super_invariant: Invariant; + declare let sub_invariant: Invariant; + + super_invariant = sub_invariant; // Error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. +!!! error TS2322: Types of property 'f' are incompatible. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: unknown) => unknown'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + sub_invariant = super_invariant; // Error + ~~~~~~~~~~~~~ +!!! error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. +!!! error TS2322: The types returned by 'f(...)' are incompatible between these types. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + + // Variance of various type constructors + + type T10 = T; + ~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + type T11 = keyof T; + ~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + type T12 = T[K]; + ~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + type T13 = T[keyof T]; + ~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + + // Variance annotation errors + + type Covariant1 = { // Error + ~~~~ +!!! error TS2636: Type 'Covariant1' is not assignable to type 'Covariant1' as implied by variance annotation. +!!! error TS2636: Types of property 'x' are incompatible. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + x: T; + } + + type Contravariant1 = keyof T; // Error + ~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + + type Contravariant2 = { // Error + ~~~~~ +!!! error TS2636: Type 'Contravariant2' is not assignable to type 'Contravariant2' as implied by variance annotation. +!!! error TS2636: Types of property 'f' are incompatible. +!!! error TS2636: Type '(x: sub-T) => void' is not assignable to type '(x: super-T) => void'. +!!! error TS2636: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + f: (x: T) => void; + } + + type Invariant1 = { // Error + ~~~~ +!!! error TS2636: Type 'Invariant1' is not assignable to type 'Invariant1' as implied by variance annotation. +!!! error TS2636: The types returned by 'f(...)' are incompatible between these types. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + f: (x: T) => T; + } + + type Invariant2 = { // Error + ~~~~~ +!!! error TS2636: Type 'Invariant2' is not assignable to type 'Invariant2' as implied by variance annotation. +!!! error TS2636: Types of property 'f' are incompatible. +!!! error TS2636: Type '(x: sub-T) => sub-T' is not assignable to type '(x: super-T) => super-T'. +!!! error TS2636: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + f: (x: T) => T; + } + + // Variance in circular types + + type Foo1 = { // Error + ~~~~ +!!! error TS2636: Type 'Foo1' is not assignable to type 'Foo1' as implied by variance annotation. +!!! error TS2636: Types of property 'x' are incompatible. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + x: T; + f: FooFn1; + } + + type FooFn1 = (foo: Bar1) => void; + + type Bar1 = { + value: Foo1; + } + + type Foo2 = { // Error + ~~~~~ +!!! error TS2636: Type 'Foo2' is not assignable to type 'Foo2' as implied by variance annotation. +!!! error TS2636: Types of property 'f' are incompatible. +!!! error TS2636: Type 'FooFn2' is not assignable to type 'FooFn2'. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + x: T; + f: FooFn2; + } + + type FooFn2 = (foo: Bar2) => void; + + type Bar2 = { + value: Foo2; + } + + type Foo3 = { + x: T; + f: FooFn3; + } + + type FooFn3 = (foo: Bar3) => void; + + type Bar3 = { + value: Foo3; + } + + // Wrong modifier usage + + type T20 = T; // Error + ~~~~~~ +!!! error TS1273: 'public' modifier cannot appear on a type parameter + type T21 = T; // Error + ~~~~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + ~~ +!!! error TS1030: 'in' modifier already seen. + type T22 = T; // Error + ~~~~~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + ~~~ +!!! error TS1030: 'out' modifier already seen. + type T23 = T; // Error + ~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + ~~ +!!! error TS1029: 'in' modifier must precede 'out' modifier. + + declare function f1(x: T): void; // Error + ~~ +!!! error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias + declare function f2(): T; // Error + ~~~ +!!! error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias + + class C { + in a = 0; // Error + ~~ +!!! error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias + out b = 0; // Error + ~~~ +!!! error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias + } + + // Interface merging + + interface Baz {} + interface Baz {} + + declare let baz1: Baz; + declare let baz2: Baz; + + baz1 = baz2; // Error + ~~~~ +!!! error TS2322: Type 'Baz' is not assignable to type 'Baz'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + baz2 = baz1; // Error + ~~~~ +!!! error TS2322: Type 'Baz' is not assignable to type 'Baz'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + + // Repro from #44572 + + interface Parent { + child: Child | null; + parent: Parent | null; + } + + interface Child extends Parent { + readonly a: A; + readonly b: B; + } + + function fn(inp: Child): void { + const a: Child = inp; + } + + const pu: Parent = { child: { a: 0, b: 0, child: null, parent: null }, parent: null }; + const notString: Parent = pu; // Error + ~~~~~~~~~ +!!! error TS2322: Type 'Parent' is not assignable to type 'Parent'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + + // Repro from comment in #44572 + + declare class StateNode { + _storedEvent: TEvent; + _action: ActionObject; + _state: StateNode; + } + + interface ActionObject { + exec: (meta: StateNode) => void; + } + + declare function createMachine(action: ActionObject): StateNode; + + declare function interpret(machine: StateNode): void; + + const machine: StateNode = createMachine({} as any); + + interpret(machine); + + declare const qq: ActionObject<{ type: "PLAY"; value: number }>; + + createMachine<{ type: "PLAY"; value: number } | { type: "RESET" }>(qq); // Error + ~~ +!!! error TS2345: Argument of type 'ActionObject<{ type: "PLAY"; value: number; }>' is not assignable to parameter of type 'ActionObject<{ type: "PLAY"; value: number; } | { type: "RESET"; }>'. +!!! error TS2345: Types of property 'exec' are incompatible. +!!! error TS2345: Type '(meta: StateNode) => void' is not assignable to type '(meta: StateNode) => void'. +!!! error TS2345: Types of parameters 'meta' and 'meta' are incompatible. +!!! error TS2345: Type 'StateNode' is not assignable to type 'StateNode'. +!!! error TS2345: Types of property '_storedEvent' are incompatible. +!!! error TS2345: Type '{ type: "PLAY"; value: number; } | { type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. +!!! error TS2345: Type '{ type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. + + // Repros from #48618 + + let Anon = class { + ~~~~~ +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + foo(): InstanceType<(typeof Anon)> { + return this; + } + } + + let OuterC = class C { + ~ +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + foo(): C { + return this; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/weakTypesAndLiterals01.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/weakTypesAndLiterals01.d.ts.map new file mode 100644 index 0000000000000..f703ffa49bc1c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/weakTypesAndLiterals01.d.ts.map @@ -0,0 +1,81 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts] //// + +//// [weakTypesAndLiterals01.ts] +type WeakTypes = + | { optional?: true; } + | { toLowerCase?(): string } + | { toUpperCase?(): string, otherOptionalProp?: number }; + +type LiteralsOrWeakTypes = + | "A" + | "B" + | WeakTypes; + +declare let aOrB: "A" | "B"; + +const f = (arg: LiteralsOrWeakTypes): WeakTypes | "A" | "B" => { + if (arg === "A") { + return arg; + } + else { + return arg; + } +} + +const g = (arg: WeakTypes): WeakTypes => { + if (arg === "A") { + return arg; + } + else { + return arg; + } +} + +const h = (arg: LiteralsOrWeakTypes): LiteralsOrWeakTypes => { + if (arg === aOrB) { + return arg; + } + else { + return arg; + } +} + +const i = (arg: WeakTypes): WeakTypes => { + if (arg === aOrB) { + return arg; + } + else { + return arg; + } +} + + +/// [Declarations] //// + + + +//// [weakTypesAndLiterals01.d.ts] +type WeakTypes = { + optional?: true; +} | { + toLowerCase?(): string; +} | { + toUpperCase?(): string; + otherOptionalProp?: number; +}; +type LiteralsOrWeakTypes = "A" | "B" | WeakTypes; +declare let aOrB: "A" | "B"; +declare const f: (arg: LiteralsOrWeakTypes) => WeakTypes | "A" | "B"; +declare const g: (arg: WeakTypes) => WeakTypes; +declare const h: (arg: LiteralsOrWeakTypes) => LiteralsOrWeakTypes; +declare const i: (arg: WeakTypes) => WeakTypes; +//# sourceMappingURL=weakTypesAndLiterals01.d.ts.map + +/// [Declarations Maps] //// + + +//// [weakTypesAndLiterals01.d.ts.map] +{"version":3,"file":"weakTypesAndLiterals01.d.ts","sourceRoot":"","sources":["weakTypesAndLiterals01.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GACR;IAAE,QAAQ,CAAC,EAAE,IAAI,CAAC;CAAE,GACpB;IAAE,WAAW,CAAC,IAAI,MAAM,CAAA;CAAE,GAC1B;IAAE,WAAW,CAAC,IAAI,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,KAAK,mBAAmB,GAClB,GAAG,GACH,GAAG,GACH,SAAS,CAAC;AAEhB,OAAO,CAAC,IAAI,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;AAE5B,QAAA,MAAM,CAAC,GAAI,GAAG,EAAE,mBAAmB,KAAG,SAAS,GAAG,GAAG,GAAG,GAOvD,CAAA;AAED,QAAA,MAAM,CAAC,G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ogV2Vha1R5cGVzIHwgIkEiIHwgIkIiID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBnID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBoID0gKGFyZzogTGl0ZXJhbHNPcldlYWtUeXBlcyk6IExpdGVyYWxzT3JXZWFrVHlwZXMgPT4gewogICAgaWYgKGFyZyA9PT0gYU9yQikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBpID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09IGFPckIpIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgcmV0dXJuIGFyZzsKICAgIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorDeclarationEmitVisibilityErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorDeclarationEmitVisibilityErrors.d.ts new file mode 100644 index 0000000000000..fd0820fda5eaf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorDeclarationEmitVisibilityErrors.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts] //// + +//// [accessorDeclarationEmitVisibilityErrors.ts] +export class Q { + set bet(arg: DoesNotExist) {} +} + +/// [Declarations] //// + + +/// [Errors] //// + +accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS2304: Cannot find name 'DoesNotExist'. +accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS4106: Parameter 'arg' of accessor has or is using private name 'DoesNotExist'. + + +==== accessorDeclarationEmitVisibilityErrors.ts (2 errors) ==== + export class Q { + set bet(arg: DoesNotExist) {} + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'DoesNotExist'. + ~~~~~~~~~~~~ +!!! error TS4106: Parameter 'arg' of accessor has or is using private name 'DoesNotExist'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map new file mode 100644 index 0000000000000..e0328d6992cd2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts] //// + +//// [accessorInferredReturnTypeErrorInReturnStatement.ts] +export var basePrototype = { + get primaryPath(): any { + var _this = this; + return _this.collection.schema.primaryPath; + }, +}; + + +/// [Declarations] //// + + + +//// [accessorInferredReturnTypeErrorInReturnStatement.d.ts] +export declare var basePrototype: { + readonly primaryPath: any; +}; +//# sourceMappingURL=accessorInferredReturnTypeErrorInReturnStatement.d.ts.map + +/// [Declarations Maps] //// + + +//// [accessorInferredReturnTypeErrorInReturnStatement.d.ts.map] +{"version":3,"file":"accessorInferredReturnTypeErrorInReturnStatement.d.ts","sourceRoot":"","sources":["accessorInferredReturnTypeErrorInReturnStatement.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,aAAa;;CAKvB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7O0NBS3ZCLENBQUMifQ==,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientConstLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientConstLiterals.d.ts new file mode 100644 index 0000000000000..4b5749caa3f08 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientConstLiterals.d.ts @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/ambientConstLiterals.ts] //// + +//// [ambientConstLiterals.ts] +function f(x: T): T { + return x; +} + +enum E { A, B, C, "non identifier" } + +const c1 = "abc"; +const c2 = 123; +const c3: "abc" = c1; +const c4: 123 = c2; +const c5: 123 = f(123); +const c6: -123 = f(-123); +const c7 = true; +const c8: E.A = E.A; +const c8b: (typeof E)["non identifier"] = E["non identifier"]; +const c9 = { x: "abc" }; +const c10: number[] = [123]; +const c11: string = "abc" + "def"; +const c12: number = 123 + 456; +const c13: "abc" | "def" = Math.random() > 0.5 ? "abc" : "def"; +const c14: 123 | 456 = Math.random() > 0.5 ? 123 : 456; + +/// [Declarations] //// + + + +//// [ambientConstLiterals.d.ts] +declare function f(x: T): T; +declare enum E { + A = 0, + B = 1, + C = 2, + "non identifier" = 3 +} +declare const c1 = "abc"; +declare const c2 = 123; +declare const c3: "abc"; +declare const c4: 123; +declare const c5: 123; +declare const c6: -123; +declare const c7 = true; +declare const c8: E.A; +declare const c8b = E["non identifier"]; +declare const c9: { + x: string; +}; +declare const c10: number[]; +declare const c11: string; +declare const c12: number; +declare const c13: "abc" | "def"; +declare const c14: 123 | 456; +//# sourceMappingURL=ambientConstLiterals.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts new file mode 100644 index 0000000000000..faa43903873cb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts] //// + +//// [arrayFakeFlatNoCrashInferenceDeclarations.ts] +type BadFlatArray = {obj: { + "done": Arr, + "recur": Arr extends ReadonlyArray + ? BadFlatArray + : Arr +}[Depth extends -1 ? "done" : "recur"]}["obj"]; + +declare function flat( + arr: A, + depth?: D +): BadFlatArray[] + +function foo(arr: T[], depth: number) { + return flat(arr, depth); +} + +/// [Declarations] //// + + +/// [Errors] //// + +arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary. + + +==== arrayFakeFlatNoCrashInferenceDeclarations.ts (1 errors) ==== + type BadFlatArray = {obj: { + "done": Arr, + "recur": Arr extends ReadonlyArray + ? BadFlatArray + : Arr + }[Depth extends -1 ? "done" : "recur"]}["obj"]; + + declare function flat( + arr: A, + depth?: D + ): BadFlatArray[] + + function foo(arr: T[], depth: number) { + ~~~ +!!! error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary. + return flat(arr, depth); + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/coAndContraVariantInferences.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/coAndContraVariantInferences.d.ts.map new file mode 100644 index 0000000000000..fa65fca8e7055 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/coAndContraVariantInferences.d.ts.map @@ -0,0 +1,76 @@ +//// [tests/cases/compiler/coAndContraVariantInferences.ts] //// + +//// [coAndContraVariantInferences.ts] +type A = { kind: 'a' }; +type B = { kind: 'b' }; + +declare const a: A; +declare const b: B; + +declare function fab(arg: A | B): void; + +declare function foo(x: { kind: T }, f: (arg: { kind: T }) => void): void; + +foo(a, fab); +foo(b, fab); + +// Repro from #45603 + +interface Action { + name: TName, + payload: TPayload +} + +const actionA = { payload: 'any-string' } as Action<'ACTION_A', string>; +const actionB = { payload: true } as Action<'ACTION_B', boolean>; + +function call( + action: Action, + fn: (action: Action)=> any, +): void { + fn(action); +} + +const printFn = (action: typeof actionA | typeof actionB): void=> console.log(action); + +call(actionA, printFn); +call(actionB, printFn); + + +/// [Declarations] //// + + + +//// [coAndContraVariantInferences.d.ts] +type A = { + kind: 'a'; +}; +type B = { + kind: 'b'; +}; +declare const a: A; +declare const b: B; +declare function fab(arg: A | B): void; +declare function foo(x: { + kind: T; +}, f: (arg: { + kind: T; +}) => void): void; +interface Action { + name: TName; + payload: TPayload; +} +declare const actionA: Action<"ACTION_A", string>; +declare const actionB: Action<"ACTION_B", boolean>; +declare function call(action: Action, fn: (action: Action) => any): void; +declare const printFn: (action: typeof actionA | typeof actionB) => void; +//# sourceMappingURL=coAndContraVariantInferences.d.ts.map + +/// [Declarations Maps] //// + + +//// [coAndContraVariantInferences.d.ts.map] +{"version":3,"file":"coAndContraVariantInferences.d.ts","sourceRoot":"","sources":["coAndContraVariantInferences.ts"],"names":[],"mappings":"AAAA,KAAK,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC;AACvB,KAAK,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC;AAEvB,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACnB,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEnB,OAAO,UAAU,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAEvC,OAAO,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,KAAK,IAAI,GAAG,IAAI,CAAC;AAO7E,UAAU,MAAM,CAAC,KAAK,SAAS,MAAM,EAAC,QAAQ;IAC1C,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,QAAQ,CAAA;CACpB;AAED,QAAA,MAAM,OAAO,4BAA0D,CAAC;AACxE,QAAA,MAAM,OAAO,6BAAmD,CAAC;AAEjE,iBAAS,IAAI,CAAC,KAAK,SAAS,MAAM,EAAC,QAAQ,EACzC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAC,QAAQ,CAAC,EAC9B,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAC,QAAQ,CAAC,KAAI,GAAG,GACzC,IAAI,CAEN;AAED,QAAA,MAAM,OAAO,WAAY,cAAc,GAAG,cAAc,KAAG,IAA0B,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBBID0gew0KICAgIGtpbmQ6ICdhJzsNCn07DQp0eXBlIEIgPSB7DQogICAga2luZDogJ2InOw0KfTsNCmRlY2xhcmUgY29uc3QgYTogQTsNCmRlY2xhcmUgY29uc3QgYjogQjsNC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nYScgfTsKdHlwZSBCID0geyBraW5kOiAnYicgfTsKCmRlY2xhcmUgY29uc3QgYTogQTsKZGVjbGFyZSBjb25zdCBiOiBCOwoKZGVjbGFyZSBmdW5jdGlvbiBmYWIoYXJnOiBBIHwgQik6IHZvaWQ7CgpkZWNsYXJlIGZ1bmN0aW9uIGZvbzxUPih4OiB7IGtpbmQ6IFQgfSwgZjogKGFyZzogeyBraW5kOiBUIH0pID0+IHZvaWQpOiB2b2lkOwoKZm9vKGEsIGZhYik7CmZvbyhiLCBmYWIpOwoKLy8gUmVwcm8gZnJvbSAjNDU2MDMKCmludGVyZmFjZSBBY3Rpb248VE5hbWUgZXh0ZW5kcyBzdHJpbmcsVFBheWxvYWQ+IHsKICAgIG5hbWU6IFROYW1lLAogICAgcGF5bG9hZDogVFBheWxvYWQKfQoKY29uc3QgYWN0aW9uQSA9IHsgcGF5bG9hZDogJ2FueS1zdHJpbmcnIH0gYXMgQWN0aW9uPCdBQ1RJT05fQScsIHN0cmluZz47CmNvbnN0IGFjdGlvbkIgPSB7IHBheWxvYWQ6IHRydWUgfSBhcyBBY3Rpb248J0FDVElPTl9CJywgYm9vbGVhbj47CgpmdW5jdGlvbiBjYWxsPFROYW1lIGV4dGVuZHMgc3RyaW5nLFRQYXlsb2FkPigKICBhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4sCiAgZm46IChhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4pPT4gYW55LAopOiB2b2lkIHsKICBmbihhY3Rpb24pOwp9Cgpjb25zdCBwcmludEZuID0gKGFjdGlvbjogdHlwZW9mIGFjdGlvbkEgfCB0eXBlb2YgYWN0aW9uQik6IHZvaWQ9PiBjb25zb2xlLmxvZyhhY3Rpb24pOwoKY2FsbChhY3Rpb25BLCBwcmludEZuKTsKY2FsbChhY3Rpb25CLCBwcmludEZuKTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsFunction.d.ts new file mode 100644 index 0000000000000..6e962a1c200c6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsFunction.d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/compiler/commentsFunction.ts] //// + +//// [commentsFunction.ts] +/** This comment should appear for foo*/ +function foo(): void { +} /* trailing comment of function */ +foo(); +/** This is comment for function signature*/ +function fooWithParameters(/** this is comment about a*/a: string, + /** this is comment for b*/ + b: number): void { + var d = a; +} // trailing comment of function +fooWithParameters("a", 10); +/** fooFunc + * comment + */ +var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b: string): string { + return b; +} + +/// lamdaFoo var comment +var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number): number => a + b; +var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number): number => a * b; +lambdaFoo(10, 20); +lambddaNoVarComment(10, 20); + +function blah(a: string /* multiline trailing comment +multiline */): void { +} + +function blah2(a: string /* single line multiple trailing comments */ /* second */): void { +} + +function blah3(a: string // trailing commen single line + ): void { +} + +lambdaFoo = (a, b) => a * b; // This is trailing comment + +/*leading comment*/() => 0; // Needs to be wrapped in parens to be a valid expression (not declaration) +/*leading comment*/(() => 0); //trailing comment + +function blah4(/*1*/a: string/*2*/,/*3*/b: string/*4*/): void { +} + +function foo1(): void { + + // should emit this +} + +function foo2(): void { + /// This is some detached comment + + // should emit this leading comment of } too +} + + +/// [Declarations] //// + + + +//// [commentsFunction.d.ts] +/** This comment should appear for foo*/ +declare function foo(): void; +/** This is comment for function signature*/ +declare function fooWithParameters(/** this is comment about a*/ a: string, +/** this is comment for b*/ +b: number): void; +/** fooFunc + * comment + */ +declare var fooFunc: (b: string) => string; +declare var lambdaFoo: (a: number, b: number) => number; +declare var lambddaNoVarComment: (a: number, b: number) => number; +declare function blah(a: string): void; +declare function blah2(a: string): void; +declare function blah3(a: string): void; +declare function blah4(/*1*/ a: string, /*3*/ b: string): void; +declare function foo1(): void; +declare function foo2(): void; +//# sourceMappingURL=commentsFunction.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsVarDecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsVarDecl.d.ts.map new file mode 100644 index 0000000000000..e0bc4717bbd9e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsVarDecl.d.ts.map @@ -0,0 +1,84 @@ +//// [tests/cases/compiler/commentsVarDecl.ts] //// + +//// [commentsVarDecl.ts] +/** Variable comments*/ +var myVariable = 10; // This trailing Comment1 + +/** This is another variable comment*/ +var anotherVariable = 30; + +// shouldn't appear +var aVar = ""; + +/** this is multiline comment + * All these variables are of number type */ +var anotherAnotherVariable = 70; /* these are multiple trailing comments */ /* multiple trailing comments */ + +/** Triple slash multiline comment*/ +/** another line in the comment*/ +/** comment line 2*/ +var x = 70; /* multiline trailing comment +this is multiline trailing comment */ +/** Triple slash comment on the assignment shouldnt be in .d.ts file*/ +x = myVariable; + +/** triple slash comment1*/ +/** jsdocstyle comment - only this comment should be in .d.ts file*/ +var n = 30; + +/** var deckaration with comment on type as well*/ +var y = /** value comment */ 20; + +/// var deckaration with comment on type as well +var yy = + /// value comment + 20; + +/** comment2 */ +var z = /** lambda comment */ (x: number, y: number): number => x + y; + +var z2: /** type comment*/ (x: number) => string; + +var x2: (x: number) => string = z2; + +var n4: (x: number) => string; +n4 = z2; + +/// [Declarations] //// + + + +//// [commentsVarDecl.d.ts] +/** Variable comments*/ +declare var myVariable: number; +/** This is another variable comment*/ +declare var anotherVariable: number; +declare var aVar: string; +/** this is multiline comment + * All these variables are of number type */ +declare var anotherAnotherVariable: number; +/** Triple slash multiline comment*/ +/** another line in the comment*/ +/** comment line 2*/ +declare var x: number; +/** triple slash comment1*/ +/** jsdocstyle comment - only this comment should be in .d.ts file*/ +declare var n: number; +/** var deckaration with comment on type as well*/ +declare var y: number; +declare var yy: number; +/** comment2 */ +declare var z: (x: number, y: number) => number; +declare var z2: (x: number) => string; +declare var x2: (x: number) => string; +declare var n4: (x: number) => string; +//# sourceMappingURL=commentsVarDecl.d.ts.map + +/// [Declarations Maps] //// + + +//// [commentsVarDecl.d.ts.map] +{"version":3,"file":"commentsVarDecl.d.ts","sourceRoot":"","sources":["commentsVarDecl.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,QAAA,IAAI,UAAU,QAAK,CAAC;AAEpB,sCAAsC;AACtC,QAAA,IAAI,eAAe,QAAK,CAAC;AAGzB,QAAA,IAAI,IAAI,QAAK,CAAC;AAEd;6CAC6C;AAC7C,QAAA,IAAI,sBAAsB,QAAK,CAAC;AAEhC,oCAAoC;AACpC,iCAAiC;AACjC,oBAAoB;AACpB,QAAA,IAAI,CAAC,QAAK,CAAC;AAKX,2BAA2B;AAC3B,oEAAoE;AACpE,QAAA,IAAI,CAAC,QAAK,CAAC;AAEX,kDAAkD;AAClD,QAAA,IAAI,CAAC,QAA0B,CAAC;AAGhC,QAAA,IAAI,EAAE,QAEA,CAAC;AAEP,eAAe;AACf,QAAA,IAAI,CAAC,MAA6B,MAAM,KAAK,MAAM,KAAG,MAAe,CAAC;AAEtE,QAAA,IAAI,EAAE,EAAqB,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AAEjD,QAAA,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAW,CAAC;AAEnC,QAAA,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,LyoqIFZhcmlhYmxlIGNvbW1lbnRzKi8NCmRlY2xhcmUgdmFyIG15VmFyaWFibGU6IG51bWJlcjsNCi8qKiBUaGlzIGlzIGFub3RoZXIgdmFyaWFibGUgY29tbWVudCovDQpkZWNsYXJlIHZhciBhbm90aGVyVmFyaWFibGU6IG51bWJlcjsNCmRlY2xhcmU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mVyID0+IHggKyB5OwoKdmFyIHoyOiAvKiogdHlwZSBjb21tZW50Ki8gKHg6IG51bWJlcikgPT4gc3RyaW5nOwoKdmFyIHgyOiAoeDogbnVtYmVyKSA9PiBzdHJpbmcgPSB6MjsKCnZhciBuNDogKHg6IG51bWJlcikgPT4gc3RyaW5nOwpuNCA9IHoyOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts new file mode 100644 index 0000000000000..1595c678dca9d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts @@ -0,0 +1,126 @@ +//// [tests/cases/compiler/computedEnumTypeWidening.ts] //// + +//// [computedEnumTypeWidening.ts] +declare function computed(x: number): number; + +enum E { + A = computed(0), + B = computed(1), + C = computed(2), + D = computed(3), +} + +function f1(): void { + const c1 = E.B; // Fresh E.B + let v1 = c1; // E + const c2 = c1; // Fresh E.B + let v2 = c2; // E + const c3: E.B = E.B; // E.B + let v3 = c3; // E.B + const c4: E.B = c1; // E.B + let v4 = c4; // E.B +} + +function f2(cond: boolean): void { + const c1 = cond ? E.A : E.B; // Fresh E.A | fresh E.B + const c2: E.A | E.B = c1; // E.A | E.B + const c3 = cond ? c1 : c2; // E.A | E.B + const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C + const c5: E.A | E.B | E.C = c4; // E.A | E.B | E.C + let v1 = c1; // E + let v2 = c2; // E.A | E.B + let v3 = c3; // E.A | E.B + let v4 = c4; // E + let v5 = c5; // E.A | E.B | E.C +} + +function f3(): void { + const c1 = E.B; + let v1 = c1; // E + const c2: E.B = E.B; + let v2 = c2; // E.B + const c3 = E.B as E.B; + let v3 = c3; // E.B + const c4 = E.B; + let v4 = c4; // E.B + const c5 = E.B as const; + let v5 = c5; // E.B +} + +declare enum E2 { A, B, C, D } + +function f4(): void { + const c1 = E2.B; // Fresh E2.B + let v1 = E.B; // E2 +} + +const c1: E.B = E.B; +const c2: E.B = E.B as const; +let v1: E = E.B; +let v2: E.B = E.B as const; + +class C { + p1: E = E.B; + p2: E.B = E.B as const; + readonly p3: E.B = E.B; + readonly p4: E.B = E.B as const; +} + +// Repro from #52531 + +enum MyEnum { A, B, C } + +let val1: MyEnum = MyEnum.A; +val1 = MyEnum.B; + +declare enum MyDeclaredEnum { A, B, C } + +let val2: MyDeclaredEnum = MyDeclaredEnum.A; +val2 = MyDeclaredEnum.B; + + +/// [Declarations] //// + + + +//// [computedEnumTypeWidening.d.ts] +declare function computed(x: number): number; +declare enum E { + A, + B, + C, + D +} +declare function f1(): void; +declare function f2(cond: boolean): void; +declare function f3(): void; +declare enum E2 { + A, + B, + C, + D +} +declare function f4(): void; +declare const c1: E.B; +declare const c2: E.B; +declare let v1: E; +declare let v2: E.B; +declare class C { + p1: E; + p2: E.B; + readonly p3: E.B; + readonly p4: E.B; +} +declare enum MyEnum { + A = 0, + B = 1, + C = 2 +} +declare let val1: MyEnum; +declare enum MyDeclaredEnum { + A, + B, + C +} +declare let val2: MyDeclaredEnum; +//# sourceMappingURL=computedEnumTypeWidening.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertiesNarrowed.d.ts new file mode 100644 index 0000000000000..550c47851d72f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertiesNarrowed.d.ts @@ -0,0 +1,107 @@ +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +//// [computedPropertiesNarrowed.ts] +const x: 0 | 1 = Math.random()? 0: 1; +declare function assert(n: number): asserts n is 1; +assert(x); +export let o: { + [x]: number; // error narrow type !== declared type +} = { + [x]: 1 // error narrow type !== declared type +} + + +const y: 0 = 0 +export let o2 = { + [y]: 1 // ok literal computed type +} + +// literals are ok +export let o3 = { [1]: 1 } +export let o31 = { [-1]: 1 } + +export let o32: { + [x: number]: number; +} = { [1-1]: 1 } // error number + +let u = Symbol(); +export let o4: { + [x: symbol]: number; +} = { + [u]: 1 // Should error, nut a unique symbol +} + +export let o5: { + [x: symbol]: number; +} ={ + [Symbol()]: 1 // Should error +} + +const uu: unique symbol = Symbol(); +export let o6 = { + [uu]: 1 // Should be ok +} + + +function foo (): 1 { return 1; } +export let o7: { + 1: number; // Should error +} = { + [foo()]: 1 // Should error +}; + +let E = { A: 1 } as const +export const o8 = { + [E.A]: 1 // Fresh +} + +function ns() { return { v: 0 } as const } +export const o9: { + 0: number; +} = { + [ns().v]: 1 +} + + +/// [Declarations] //// + + + +//// [computedPropertiesNarrowed.d.ts] +declare const x: 0 | 1; +export declare let o: { + [x]: number; +}; +export declare let o2: { + 0: number; +}; +export declare let o3: { + 1: number; +}; +export declare let o31: { + [-1]: number; +}; +export declare let o32: { + [x: number]: number; +}; +export declare let o4: { + [x: symbol]: number; +}; +export declare let o5: { + [x: symbol]: number; +}; +declare const uu: unique symbol; +export declare let o6: { + [uu]: number; +}; +export declare let o7: { + 1: number; +}; +export declare const o8: { + 1: number; +}; +export declare const o9: { + 0: number; +}; +export {}; +//# sourceMappingURL=computedPropertiesNarrowed.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/conditionalTypes1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/conditionalTypes1.d.ts.map new file mode 100644 index 0000000000000..a539e47bfc0f7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/conditionalTypes1.d.ts.map @@ -0,0 +1,655 @@ +//// [tests/cases/conformance/types/conditional/conditionalTypes1.ts] //// + +//// [conditionalTypes1.ts] +type T00 = Exclude<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "b" | "d" +type T01 = Extract<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "a" | "c" + +type T02 = Exclude void), Function>; // string | number +type T03 = Extract void), Function>; // () => void + +type T04 = NonNullable; // string | number +type T05 = NonNullable<(() => string) | string[] | null | undefined>; // (() => string) | string[] + +function f1(x: T, y: NonNullable): void { + x = y; + y = x; // Error +} + +function f2(x: T, y: NonNullable): void { + x = y; + y = x; // Error + let s1: string = x; // Error + let s2: string = y; +} + +function f3(x: Partial[keyof T], y: NonNullable[keyof T]>): void { + x = y; + y = x; // Error +} + +function f4(x: T["x"], y: NonNullable): void { + x = y; + y = x; // Error + let s1: string = x; // Error + let s2: string = y; +} + +type Options = { k: "a", a: number } | { k: "b", b: string } | { k: "c", c: boolean }; + +type T10 = Exclude; // { k: "c", c: boolean } +type T11 = Extract; // { k: "a", a: number } | { k: "b", b: string } + +type T12 = Exclude; // { k: "c", c: boolean } +type T13 = Extract; // { k: "a", a: number } | { k: "b", b: string } + +type T14 = Exclude; // Options +type T15 = Extract; // never + +declare function f5(p: K): Extract; +let x0: { + k: "a"; + a: number; +} = f5("a"); // { k: "a", a: number } + +type OptionsOfKind = Extract; + +type T16 = OptionsOfKind<"a" | "b">; // { k: "a", a: number } | { k: "b", b: string } + +type Select = Extract; + +type T17 = Select; // // { k: "a", a: number } | { k: "b", b: string } + +type TypeName = + T extends string ? "string" : + T extends number ? "number" : + T extends boolean ? "boolean" : + T extends undefined ? "undefined" : + T extends Function ? "function" : + "object"; + +type T20 = TypeName void)>; // "string" | "function" +type T21 = TypeName; // "string" | "number" | "boolean" | "undefined" | "function" | "object" +type T22 = TypeName; // never +type T23 = TypeName<{}>; // "object" + +type KnockoutObservable = { object: T }; +type KnockoutObservableArray = { array: T }; + +type KnockedOut = T extends any[] ? KnockoutObservableArray : KnockoutObservable; + +type KnockedOutObj = { + [P in keyof T]: KnockedOut; +} + +interface Item { + id: number; + name: string; + subitems: string[]; +} + +type KOItem = KnockedOutObj; + +interface Part { + id: number; + name: string; + subparts: Part[]; + updatePart(newName: string): void; +} + +type FunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]; +type FunctionProperties = Pick>; + +type NonFunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T]; +type NonFunctionProperties = Pick>; + +type T30 = FunctionProperties; +type T31 = NonFunctionProperties; + +function f7(x: T, y: FunctionProperties, z: NonFunctionProperties): void { + x = y; // Error + x = z; // Error + y = x; + y = z; // Error + z = x; + z = y; // Error +} + +function f8(x: keyof T, y: FunctionPropertyNames, z: NonFunctionPropertyNames): void { + x = y; + x = z; + y = x; // Error + y = z; // Error + z = x; // Error + z = y; // Error +} + +type DeepReadonly = + T extends any[] ? DeepReadonlyArray : + T extends object ? DeepReadonlyObject : + T; + +interface DeepReadonlyArray extends ReadonlyArray> {} + +type DeepReadonlyObject = { + readonly [P in NonFunctionPropertyNames]: DeepReadonly; +}; + +function f10(part: DeepReadonly): void { + let name: string = part.name; + let id: number = part.subparts[0].id; + part.id = part.id; // Error + part.subparts[0] = part.subparts[0]; // Error + part.subparts[0].id = part.subparts[0].id; // Error + part.updatePart("hello"); // Error +} + +type ZeroOf = T extends number ? 0 : T extends string ? "" : false; + +function zeroOf(value: T): ZeroOf { + return >(typeof value === "number" ? 0 : typeof value === "string" ? "" : false); +} + +function f20(n: number, b: boolean, x: number | boolean, y: T): void { + zeroOf(5); // 0 + zeroOf("hello"); // "" + zeroOf(true); // false + zeroOf(n); // 0 + zeroOf(b); // False + zeroOf(x); // 0 | false + zeroOf(y); // ZeroOf +} + +function f21(x: T, y: ZeroOf): void { + let z1: number | string = y; + let z2: 0 | "" = y; + x = y; // Error + y = x; // Error +} + +type T35 = T[]; +type T36 = T extends { a: string } ? T extends { b: number } ? T35 : never : never; +type T37 = T extends { b: number } ? T extends { a: string } ? T35 : never : never; +type T38 = [T] extends [{ a: string }] ? [T] extends [{ b: number }] ? T35 : never : never; + +type Extends = T extends U ? true : false; +type If = C extends true ? T : F; +type Not = If; +type And = If; +type Or = If; + +type IsString = Extends; + +type Q1 = IsString; // false +type Q2 = IsString<"abc">; // true +type Q3 = IsString; // boolean +type Q4 = IsString; // never + +type N1 = Not; // true +type N2 = Not; // false +type N3 = Not; // boolean + +type A1 = And; // false +type A2 = And; // false +type A3 = And; // false +type A4 = And; // true +type A5 = And; // false +type A6 = And; // false +type A7 = And; // boolean +type A8 = And; // boolean +type A9 = And; // boolean + +type O1 = Or; // false +type O2 = Or; // true +type O3 = Or; // true +type O4 = Or; // true +type O5 = Or; // boolean +type O6 = Or; // boolean +type O7 = Or; // true +type O8 = Or; // true +type O9 = Or; // boolean + +type T40 = never extends never ? true : false; // true +type T41 = number extends never ? true : false; // false +type T42 = never extends number ? true : false; // true + +type IsNever = [T] extends [never] ? true : false; + +type T50 = IsNever; // true +type T51 = IsNever; // false +type T52 = IsNever; // false + +function f22(x: T extends (infer U)[] ? U[] : never): void { + let e = x[0]; // {} +} + +function f23(x: T extends (infer U)[] ? U[] : never): void { + let e = x[0]; // string +} + +// Repros from #21664 + +type Eq = T extends U ? U extends T ? true : false : false; +type T60 = Eq; // true +type T61 = Eq; // false +type T62 = Eq; // false +type T63 = Eq; // true + +type Eq1 = Eq extends false ? false : true; +type T70 = Eq1; // true +type T71 = Eq1; // false +type T72 = Eq1; // false +type T73 = Eq1; // true + +type Eq2 = Eq extends true ? true : false; +type T80 = Eq2; // true +type T81 = Eq2; // false +type T82 = Eq2; // false +type T83 = Eq2; // true + +// Repro from #21756 + +type Foo = T extends string ? boolean : number; +type Bar = T extends string ? boolean : number; +const convert = (value: Foo): Bar => value; + +type Baz = Foo; +const convert2 = (value: Foo): Baz => value; + +function f31(): void { + type T1 = T extends string ? boolean : number; + type T2 = T extends string ? boolean : number; + var x: T1; + var x: T2; +} + +function f32(): void { + type T1 = T & U extends string ? boolean : number; + type T2 = Foo; + var z: T1; + var z: T2; // Error, T2 is distributive, T1 isn't +} + +function f33(): void { + type T1 = Foo; + type T2 = Bar; + var z: T1; + var z: T2; +} + +// Repro from #21823 + +type T90 = T extends 0 ? 0 : () => 0; +type T91 = T extends 0 ? 0 : () => 0; +const f40 = (a: T90): T91 => a; +const f41 = (a: T91): T90 => a; + +type T92 = T extends () => 0 ? () => 1 : () => 2; +type T93 = T extends () => 0 ? () => 1 : () => 2; +const f42 = (a: T92): T93 => a; +const f43 = (a: T93): T92 => a; + +type T94 = T extends string ? true : 42; +type T95 = T extends string ? boolean : number; +const f44 = (value: T94): T95 => value; +const f45 = (value: T95): T94 => value; // Error + +// Repro from #21863 + +function f50(): void { + type Eq = T extends U ? U extends T ? true : false : false; + type If = S extends false ? U : T; + type Omit = { [P in keyof T]: If, never, P>; }[keyof T]; + type Omit2 = { [P in keyof T]: If, never, P>; }[keyof T]; + type A = Omit<{ a: void; b: never; }>; // 'a' + type B = Omit2<{ a: void; b: never; }>; // 'a' +} + +// Repro from #21862 + +type OldDiff = ( + & { [P in T]: P; } + & { [P in U]: never; } + & { [x: string]: never; } +)[T]; +type NewDiff = T extends U ? never : T; +interface A { + a: 'a'; +} +interface B1 extends A { + b: 'b'; + c: OldDiff; +} +interface B2 extends A { + b: 'b'; + c: NewDiff; +} +type c1 = B1['c']; // 'c' | 'b' +type c2 = B2['c']; // 'c' | 'b' + +// Repro from #21929 + +type NonFooKeys1 = OldDiff; +type NonFooKeys2 = Exclude; + +type Test1 = NonFooKeys1<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" +type Test2 = NonFooKeys2<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" + +// Repro from #21729 + +interface Foo2 { foo: string; } +interface Bar2 { bar: string; } +type FooBar = Foo2 | Bar2; +declare interface ExtractFooBar { } + +type Extracted = { + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; +} + +// Repro from #22985 + +type RecursivePartial = { + [P in keyof T]?: T[P] extends Array ? {[index: number]: RecursivePartial} : + T[P] extends object ? RecursivePartial : T[P]; +}; + +declare function assign(o: T, a: RecursivePartial): void; + +var a: { + o: number; + b: number; + c: { + a: number; + c: string; + }[]; +} = {o: 1, b: 2, c: [{a: 1, c: '213'}]} +assign(a, {o: 2, c: {0: {a: 2, c: '213123'}}}) + +// Repros from #23843 + +type Weird1 = ((a: U) => never) extends + ((a: U) => never) ? never : never; + +type Weird2 = ((a: U) => U) extends + ((a: U) => infer T) ? T : never; + + +/// [Declarations] //// + + + +//// [conditionalTypes1.d.ts] +type T00 = Exclude<"a" | "b" | "c" | "d", "a" | "c" | "f">; +type T01 = Extract<"a" | "b" | "c" | "d", "a" | "c" | "f">; +type T02 = Exclude void), Function>; +type T03 = Extract void), Function>; +type T04 = NonNullable; +type T05 = NonNullable<(() => string) | string[] | null | undefined>; +declare function f1(x: T, y: NonNullable): void; +declare function f2(x: T, y: NonNullable): void; +declare function f3(x: Partial[keyof T], y: NonNullable[keyof T]>): void; +declare function f4(x: T["x"], y: NonNullable): void; +type Options = { + k: "a"; + a: number; +} | { + k: "b"; + b: string; +} | { + k: "c"; + c: boolean; +}; +type T10 = Exclude; +type T11 = Extract; +type T12 = Exclude; +type T13 = Extract; +type T14 = Exclude; +type T15 = Extract; +declare function f5(p: K): Extract; +declare let x0: { + k: "a"; + a: number; +}; +type OptionsOfKind = Extract; +type T16 = OptionsOfKind<"a" | "b">; +type Select = Extract; +type T17 = Select; +type TypeName = T extends string ? "string" : T extends number ? "number" : T extends boolean ? "boolean" : T extends undefined ? "undefined" : T extends Function ? "function" : "object"; +type T20 = TypeName void)>; +type T21 = TypeName; +type T22 = TypeName; +type T23 = TypeName<{}>; +type KnockoutObservable = { + object: T; +}; +type KnockoutObservableArray = { + array: T; +}; +type KnockedOut = T extends any[] ? KnockoutObservableArray : KnockoutObservable; +type KnockedOutObj = { + [P in keyof T]: KnockedOut; +}; +interface Item { + id: number; + name: string; + subitems: string[]; +} +type KOItem = KnockedOutObj; +interface Part { + id: number; + name: string; + subparts: Part[]; + updatePart(newName: string): void; +} +type FunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? K : never; +}[keyof T]; +type FunctionProperties = Pick>; +type NonFunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? never : K; +}[keyof T]; +type NonFunctionProperties = Pick>; +type T30 = FunctionProperties; +type T31 = NonFunctionProperties; +declare function f7(x: T, y: FunctionProperties, z: NonFunctionProperties): void; +declare function f8(x: keyof T, y: FunctionPropertyNames, z: NonFunctionPropertyNames): void; +type DeepReadonly = T extends any[] ? DeepReadonlyArray : T extends object ? DeepReadonlyObject : T; +interface DeepReadonlyArray extends ReadonlyArray> { +} +type DeepReadonlyObject = { + readonly [P in NonFunctionPropertyNames]: DeepReadonly; +}; +declare function f10(part: DeepReadonly): void; +type ZeroOf = T extends number ? 0 : T extends string ? "" : false; +declare function zeroOf(value: T): ZeroOf; +declare function f20(n: number, b: boolean, x: number | boolean, y: T): void; +declare function f21(x: T, y: ZeroOf): void; +type T35 = T[]; +type T36 = T extends { + a: string; +} ? T extends { + b: number; +} ? T35 : never : never; +type T37 = T extends { + b: number; +} ? T extends { + a: string; +} ? T35 : never : never; +type T38 = [T] extends [{ + a: string; +}] ? [T] extends [{ + b: number; +}] ? T35 : never : never; +type Extends = T extends U ? true : false; +type If = C extends true ? T : F; +type Not = If; +type And = If; +type Or = If; +type IsString = Extends; +type Q1 = IsString; +type Q2 = IsString<"abc">; +type Q3 = IsString; +type Q4 = IsString; +type N1 = Not; +type N2 = Not; +type N3 = Not; +type A1 = And; +type A2 = And; +type A3 = And; +type A4 = And; +type A5 = And; +type A6 = And; +type A7 = And; +type A8 = And; +type A9 = And; +type O1 = Or; +type O2 = Or; +type O3 = Or; +type O4 = Or; +type O5 = Or; +type O6 = Or; +type O7 = Or; +type O8 = Or; +type O9 = Or; +type T40 = never extends never ? true : false; +type T41 = number extends never ? true : false; +type T42 = never extends number ? true : false; +type IsNever = [T] extends [never] ? true : false; +type T50 = IsNever; +type T51 = IsNever; +type T52 = IsNever; +declare function f22(x: T extends (infer U)[] ? U[] : never): void; +declare function f23(x: T extends (infer U)[] ? U[] : never): void; +type Eq = T extends U ? U extends T ? true : false : false; +type T60 = Eq; +type T61 = Eq; +type T62 = Eq; +type T63 = Eq; +type Eq1 = Eq extends false ? false : true; +type T70 = Eq1; +type T71 = Eq1; +type T72 = Eq1; +type T73 = Eq1; +type Eq2 = Eq extends true ? true : false; +type T80 = Eq2; +type T81 = Eq2; +type T82 = Eq2; +type T83 = Eq2; +type Foo = T extends string ? boolean : number; +type Bar = T extends string ? boolean : number; +declare const convert: (value: Foo) => Bar; +type Baz = Foo; +declare const convert2: (value: Foo) => Baz; +declare function f31(): void; +declare function f32(): void; +declare function f33(): void; +type T90 = T extends 0 ? 0 : () => 0; +type T91 = T extends 0 ? 0 : () => 0; +declare const f40: (a: T90) => T91; +declare const f41: (a: T91) => T90; +type T92 = T extends () => 0 ? () => 1 : () => 2; +type T93 = T extends () => 0 ? () => 1 : () => 2; +declare const f42: (a: T92) => T93; +declare const f43: (a: T93) => T92; +type T94 = T extends string ? true : 42; +type T95 = T extends string ? boolean : number; +declare const f44: (value: T94) => T95; +declare const f45: (value: T95) => T94; +declare function f50(): void; +type OldDiff = ({ + [P in T]: P; +} & { + [P in U]: never; +} & { + [x: string]: never; +})[T]; +type NewDiff = T extends U ? never : T; +interface A { + a: 'a'; +} +interface B1 extends A { + b: 'b'; + c: OldDiff; +} +interface B2 extends A { + b: 'b'; + c: NewDiff; +} +type c1 = B1['c']; +type c2 = B2['c']; +type NonFooKeys1 = OldDiff; +type NonFooKeys2 = Exclude; +type Test1 = NonFooKeys1<{ + foo: 1; + bar: 2; + baz: 3; +}>; +type Test2 = NonFooKeys2<{ + foo: 1; + bar: 2; + baz: 3; +}>; +interface Foo2 { + foo: string; +} +interface Bar2 { + bar: string; +} +type FooBar = Foo2 | Bar2; +declare interface ExtractFooBar { +} +type Extracted = { + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; +}; +type RecursivePartial = { + [P in keyof T]?: T[P] extends Array ? { + [index: number]: RecursivePartial; + } : T[P] extends object ? RecursivePartial : T[P]; +}; +declare function assign(o: T, a: RecursivePartial): void; +declare var a: { + o: number; + b: number; + c: { + a: number; + c: string; + }[]; +}; +type Weird1 = ((a: U) => never) extends ((a: U) => never) ? never : never; +type Weird2 = ((a: U) => U) extends ((a: U) => infer T) ? T : never; +//# sourceMappingURL=conditionalTypes1.d.ts.map + +/// [Declarations Maps] //// + + +//// [conditionalTypes1.d.ts.map] +{"version":3,"file":"conditionalTypes1.d.ts","sourceRoot":"","sources":["conditionalTypes1.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;AAC3D,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;AAE3D,KAAK,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC7D,KAAK,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;AAE7D,KAAK,GAAG,GAAG,WAAW,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;AACpD,KAAK,GAAG,GAAG,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAErE,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAG5C;AAED,iBAAS,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAKvE;AAED,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAA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0ZW5kcyBBcnJheTxhbnk+ID8ge1tpbmRleDogbnVtYmVyXTogUmVjdXJzaXZlUGFydGlhbDxUW1BdWzBdPn0gOgogICAgVFtQXSBleHRlbmRzIG9iamVjdCA/IFJlY3Vyc2l2ZVBhcnRpYWw8VFtQXT4gOiBUW1BdOwp9OwoKZGVjbGFyZSBmdW5jdGlvbiBhc3NpZ248VD4obzogVCwgYTogUmVjdXJzaXZlUGFydGlhbDxUPik6IHZvaWQ7Cgp2YXIgYTogewogICAgbzogbnVtYmVyOwogICAgYjogbnVtYmVyOwogICAgYzogewogICAgICAgIGE6IG51bWJlcjsKICAgICAgICBjOiBzdHJpbmc7CiAgICB9W107Cn0gPSB7bzogMSwgYjogMiwgYzogW3thOiAxLCBjOiAnMjEzJ31dfQphc3NpZ24oYSwge286IDIsIGM6IHswOiB7YTogMiwgYzogJzIxMzEyMyd9fX0pCgovLyBSZXByb3MgZnJvbSAjMjM4NDMKCnR5cGUgV2VpcmQxID0gKDxVIGV4dGVuZHMgYm9vbGVhbj4oYTogVSkgPT4gbmV2ZXIpIGV4dGVuZHMgCiAgICAoPFUgZXh0ZW5kcyB0cnVlPihhOiBVKSA9PiBuZXZlcikgPyBuZXZlciA6IG5ldmVyOwoKdHlwZSBXZWlyZDIgPSAoPFUgZXh0ZW5kcyBib29sZWFuPihhOiBVKSA9PiBVKSBleHRlbmRzIAogICAgKDxVIGV4dGVuZHMgdHJ1ZT4oYTogVSkgPT4gaW5mZXIgVCkgPyBUIDogbmV2ZXI7Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constAssertions.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constAssertions.d.ts.map new file mode 100644 index 0000000000000..b4a8eb8274446 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constAssertions.d.ts.map @@ -0,0 +1,282 @@ +//// [tests/cases/conformance/expressions/typeAssertions/constAssertions.ts] //// + +//// [constAssertions.ts] +let v1 = 'abc' as const; +let v2 = `abc` as const; +let v3 = 10 as const; +let v4 = -10 as const; +let v5 = +10 as const; +let v6 = 10n as const; +let v7 = -10n as const; +let v8 = true as const; +let v9 = false as const; + +let c1 = 'abc' as const; +let c2 = `abc` as const; +let c3 = 10 as const; +let c4 = -10 as const; +let c5 = +10 as const; +let c6 = 10n as const; +let c7 = -10n as const; +let c8 = true as const; +let c9 = false as const; + +let vv1: "abc" = v1; +let vc1: "abc" = c1; + +let a1 = [] as const; +let a2 = [1, 2, 3] as const; +let a3 = [10, 'hello', true] as const; +let a4: readonly [1, 2, 3] = [...[1, 2, 3]] as const; +let a5: number[] = [1, 2, 3]; +let a6: readonly number[] = [...a5] as const; +let a7: number[] = [...a6]; +let a8: readonly ["abc", ...number[]] = ['abc', ...a7] as const; +let a9: (number | "abc")[] = [...a8]; + +declare let d: { [x: string]: string }; + +let o1 = { x: 10, y: 20 } as const; +let o2: { + readonly [x: string]: 1 | 2 | 3 | (() => void) | 4; + readonly a: 1; + readonly b: 2; + readonly c: 3; + readonly d: () => void; +} = { a: 1, 'b': 2, ['c']: 3, d(): void {}, ['e' + '']: 4 } as const; +let o3: { + readonly a: 1; + readonly b: 2; + readonly c: 3; + readonly d: () => void; + readonly x: 10; + readonly y: 20; +} = { ...o1, ...o2 } as const; +let o4 = { a: 1, b: 2 }; +let o5: { + readonly a: number; + readonly b: number; +} = { ...o4 } as const; +let o6: { + a: number; + b: number; +} = { ...o5 }; +let o7: { + readonly [x: string]: string; +} = { ...d } as const; +let o8: { + [x: string]: string; +} = { ...o7 }; +let o9 = { x: 10, foo(): void { this.x = 20 } } as const; // Error + +let p1 = (10) as const; +let p2 = ((-10)) as const; +let p3 = ([(10)]) as const; +let p4 = [[[[10]]]] as const; + +let x1 = { x: 10, y: [20, 30], z: { a: { b: 42 } } } as const; + +let q1 = 10; +let q2 = 'abc'; +let q3 = true; +let q4 = [1, 2, 3]; +let q5 = { x: 10, y: 20 }; + +declare function id(x: T): T; + +let e1: "abc" = v1 as const; // Error +let e2: 0 | 1 = (true ? 1 : 0) as const; // Error +let e3: 1 = id(1) as const; // Error + +let t1 = 'foo' as const; +let t2 = 'bar' as const; +let t3: "foo-bar" = `${t1}-${t2}` as const; +let t4: "(foo)-(bar)" = `${`(${t1})`}-${`(${t2})`}` as const; + +function ff1(x: 'foo' | 'bar', y: 1 | 2): "foo-1" | "foo-2" | "bar-1" | "bar-2" { + return `${x}-${y}` as const; +} + +function ff2(x: T, y: U): `${T}-${U}` { + return `${x}-${y}` as const; +} + +const ts1: "foo-bar" = ff2('foo', 'bar'); +const ts2: "foo-1" | "foo-0" = ff2('foo', !!true ? '0' : '1'); +const ts3: "top-left" | "top-right" | "bottom-left" | "bottom-right" = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); + +function ff3(x: 'foo' | 'bar', y: object): `foo${string}` | `bar${string}` { + return `${x}${y}` as const; +} + +type Action = "verify" | "write"; +type ContentMatch = "match" | "nonMatch"; +type Outcome = `${Action}_${ContentMatch}`; + +function ff4(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" { + const action : Action = verify ? `verify` : `write`; + const contentMatch: ContentMatch = contentMatches ? `match` : `nonMatch`; + const outcome: Outcome = `${action}_${contentMatch}` as const; + return outcome; +} + +function ff5(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" { + const action = verify ? `verify` : `write`; + const contentMatch = contentMatches ? `match` : `nonMatch`; + const outcome = `${action}_${contentMatch}` as const; + return outcome; +} + +function accessorNames(propName: S): readonly [`get-${S}`, `set-${S}`] { + return [`get-${propName}`, `set-${propName}`] as const; +} + +const ns1: readonly ["get-foo", "set-foo"] = accessorNames('foo'); + +// repro from https://github.com/microsoft/TypeScript/issues/54374 +interface Foo54374 { + a: 1; + b: 2; +} + +const fooConst54374: Foo54374 = { + a: 1, + b: 3 +} as const + + +/// [Declarations] //// + + + +//// [constAssertions.d.ts] +declare let v1: "abc"; +declare let v2: "abc"; +declare let v3: 10; +declare let v4: -10; +declare let v5: 10; +declare let v6: 10n; +declare let v7: -10n; +declare let v8: true; +declare let v9: false; +declare let c1: "abc"; +declare let c2: "abc"; +declare let c3: 10; +declare let c4: -10; +declare let c5: 10; +declare let c6: 10n; +declare let c7: -10n; +declare let c8: true; +declare let c9: false; +declare let vv1: "abc"; +declare let vc1: "abc"; +declare let a1: readonly []; +declare let a2: readonly [1, 2, 3]; +declare let a3: readonly [10, "hello", true]; +declare let a4: readonly [1, 2, 3]; +declare let a5: number[]; +declare let a6: readonly number[]; +declare let a7: number[]; +declare let a8: readonly ["abc", ...number[]]; +declare let a9: (number | "abc")[]; +declare let d: { + [x: string]: string; +}; +declare let o1: { + readonly x: 10; + readonly y: 20; +}; +declare let o2: { + readonly [x: string]: 1 | 2 | 3 | (() => void) | 4; + readonly a: 1; + readonly b: 2; + readonly c: 3; + readonly d: () => void; +}; +declare let o3: { + readonly a: 1; + readonly b: 2; + readonly c: 3; + readonly d: () => void; + readonly x: 10; + readonly y: 20; +}; +declare let o4: { + a: number; + b: number; +}; +declare let o5: { + readonly a: number; + readonly b: number; +}; +declare let o6: { + a: number; + b: number; +}; +declare let o7: { + readonly [x: string]: string; +}; +declare let o8: { + [x: string]: string; +}; +declare let o9: { + readonly x: 10; + readonly foo: () => void; +}; +declare let p1: 10; +declare let p2: -10; +declare let p3: readonly [10]; +declare let p4: readonly [readonly [readonly [readonly [10]]]]; +declare let x1: { + readonly x: 10; + readonly y: readonly [20, 30]; + readonly z: { + readonly a: { + readonly b: 42; + }; + }; +}; +declare let q1: 10; +declare let q2: "abc"; +declare let q3: true; +declare let q4: readonly [1, 2, 3]; +declare let q5: { + readonly x: 10; + readonly y: 20; +}; +declare function id(x: T): T; +declare let e1: "abc"; +declare let e2: 0 | 1; +declare let e3: 1; +declare let t1: "foo"; +declare let t2: "bar"; +declare let t3: "foo-bar"; +declare let t4: "(foo)-(bar)"; +declare function ff1(x: 'foo' | 'bar', y: 1 | 2): "foo-1" | "foo-2" | "bar-1" | "bar-2"; +declare function ff2(x: T, y: U): `${T}-${U}`; +declare const ts1: "foo-bar"; +declare const ts2: "foo-1" | "foo-0"; +declare const ts3: "top-left" | "top-right" | "bottom-left" | "bottom-right"; +declare function ff3(x: 'foo' | 'bar', y: object): `foo${string}` | `bar${string}`; +type Action = "verify" | "write"; +type ContentMatch = "match" | "nonMatch"; +type Outcome = `${Action}_${ContentMatch}`; +declare function ff4(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch"; +declare function ff5(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch"; +declare function accessorNames(propName: S): readonly [`get-${S}`, `set-${S}`]; +declare const ns1: readonly ["get-foo", "set-foo"]; +interface Foo54374 { + a: 1; + b: 2; +} +declare const fooConst54374: Foo54374; +//# sourceMappingURL=constAssertions.d.ts.map + +/// [Declarations Maps] //// + + +//// [constAssertions.d.ts.map] +{"version":3,"file":"constAssertions.d.ts","sourceRoot":"","sources":["constAssertions.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,IAAc,CAAC;AACrB,QAAA,IAAI,EAAE,KAAe,CAAC;AACtB,QAAA,IAAI,EAAE,IAAe,CAAC;AACtB,QAAA,IAAI,EAAE,KAAe,CAAC;AACtB,QAAA,IAAI,EAAE,MAAgB,CAAC;AACvB,QAAA,IAAI,EAAE,MAAgB,CAAC;AACvB,QAAA,IAAI,EAAE,OAAiB,CAAC;AAExB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,IAAc,CAAC;AACrB,QAAA,IAAI,EAAE,KAAe,CAAC;AACtB,QAAA,IAAI,EAAE,IAAe,CAAC;AACtB,QAAA,IAAI,EAAE,KAAe,CAAC;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wgIndyaXRlX21hdGNoIiB8ICJ3cml0ZV9ub25NYXRjaCIgewogICAgY29uc3QgYWN0aW9uID0gdmVyaWZ5ID8gYHZlcmlmeWAgOiBgd3JpdGVgOwogICAgY29uc3QgY29udGVudE1hdGNoID0gY29udGVudE1hdGNoZXMgPyBgbWF0Y2hgIDogYG5vbk1hdGNoYDsKICAgIGNvbnN0IG91dGNvbWUgPSBgJHthY3Rpb259XyR7Y29udGVudE1hdGNofWAgYXMgY29uc3Q7CiAgICByZXR1cm4gb3V0Y29tZTsKfQoKZnVuY3Rpb24gYWNjZXNzb3JOYW1lczxTIGV4dGVuZHMgc3RyaW5nPihwcm9wTmFtZTogUyk6IHJlYWRvbmx5IFtgZ2V0LSR7U31gLCBgc2V0LSR7U31gXSB7CiAgICByZXR1cm4gW2BnZXQtJHtwcm9wTmFtZX1gLCBgc2V0LSR7cHJvcE5hbWV9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts new file mode 100644 index 0000000000000..5a529282dc60f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/constEnums/constEnum2.ts] //// + +//// [constEnum2.ts] +// An enum declaration that specifies a const modifier is a constant enum declaration. +// In a constant enum declaration, all members must have constant values and +// it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression. + +// Error : not a constant enum expression + +const CONST: number = 9000 % 2; +const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), + f = d - (100 * Math.floor(Math.random() % 8)), + g = CONST, +} + +/// [Declarations] //// + + + +//// [constEnum2.d.ts] +declare const CONST: number; +declare const enum D { + d = 10, + e, + f, + g +} +//# sourceMappingURL=constEnum2.d.ts.map +/// [Errors] //// + +constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. +constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. +constEnum2.ts(12,9): error TS2474: const enum member initializers must be constant expressions. + + +==== constEnum2.ts (3 errors) ==== + // An enum declaration that specifies a const modifier is a constant enum declaration. + // In a constant enum declaration, all members must have constant values and + // it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression. + + // Error : not a constant enum expression + + const CONST: number = 9000 % 2; + const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + f = d - (100 * Math.floor(Math.random() % 8)), + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + g = CONST, + ~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map new file mode 100644 index 0000000000000..8b3856587bfd7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx] //// + +//// [contextuallyTypedStringLiteralsInJsxAttributes01.tsx] +namespace JSX { + export interface IntrinsicElements { + span: {}; + } + export interface Element { + something?: any; + } +} + +const FooComponent = (props: { foo: "A" | "B" | "C" }): JSX.Element => {props.foo}; + +; +; + +; +; + +/// [Declarations] //// + + + +//// [contextuallyTypedStringLiteralsInJsxAttributes01.d.ts] +declare namespace JSX { + interface IntrinsicElements { + span: {}; + } + interface Element { + something?: any; + } +} +declare const FooComponent: (props: { + foo: "A" | "B" | "C"; +}) => JSX.Element; +//# sourceMappingURL=contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map + +/// [Declarations Maps] //// + + +//// [contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map] +{"version":3,"file":"contextuallyTypedStringLiteralsInJsxAttributes01.d.ts","sourceRoot":"","sources":["contextuallyTypedStringLiteralsInJsxAttributes01.tsx"],"names":[],"mappings":"AAAA,kBAAU,GAAG,CAAC;IACV,UAAiB,iBAAiB;QAC9B,IAAI,EAAE,EAAE,CAAC;KACZ;IACD,UAAiB,OAAO;QAC1B,SAAS,CAAC,EAAE,GAAG,CAAC;KACb;CACJ;AAED,QAAA,MAAM,YAAY,UAAW;IAAE,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;CAAE,KAAG,WAAuC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsNCiAgICBpbnRlcmZhY2UgSW50cmluc2ljRWxlbWVudHMgew0KICAgICAgICBzcGFuOiB7fTsNCiAgICB9DQogICAgaW50ZXJmYWNlIEVsZW1lbnQgew0KICAgICAgICBzb21ldGhpbmc/OiBhbnk7DQogICAgfQ0KfQ0KZGVjbGFyZSBjb25zdCBGb29Db21wb25lbnQ6IChwcm9wczogew0KICAgIGZvbzogIkEiIHwgIkIiIHwgIkMiOw0KfSkgPT4gSlNYLkVsZW1lbnQ7DQovLyMgc291cmNlTWFwcG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29tcG9uZW50IGZvbz0iZiIgICAvPjs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/correlatedUnions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/correlatedUnions.d.ts new file mode 100644 index 0000000000000..154d3401b1afe --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/correlatedUnions.d.ts @@ -0,0 +1,503 @@ +//// [tests/cases/compiler/correlatedUnions.ts] //// + +//// [correlatedUnions.ts] +// Various repros from #30581 + +type RecordMap = { n: number, s: string, b: boolean }; +type UnionRecord = { [P in K]: { + kind: P, + v: RecordMap[P], + f: (v: RecordMap[P]) => void +}}[K]; + +function processRecord(rec: UnionRecord): void { + rec.f(rec.v); +} + +declare const r1: UnionRecord<'n'>; // { kind: 'n', v: number, f: (v: number) => void } +declare const r2: UnionRecord; // { kind: 'n', ... } | { kind: 's', ... } | { kind: 'b', ... } + +processRecord(r1); +processRecord(r2); +processRecord({ kind: 'n', v: 42, f: v => v.toExponential() }); + +// -------- + +type TextFieldData = { value: string } +type SelectFieldData = { options: string[], selectedValue: string } + +type FieldMap = { + text: TextFieldData; + select: SelectFieldData; +} + +type FormField = { type: K, data: FieldMap[K] }; + +type RenderFunc = (props: FieldMap[K]) => void; +type RenderFuncMap = { [K in keyof FieldMap]: RenderFunc }; + +function renderTextField(props: TextFieldData): void {} +function renderSelectField(props: SelectFieldData): void {} + +const renderFuncs: RenderFuncMap = { + text: renderTextField, + select: renderSelectField, +}; + +function renderField(field: FormField): void { + const renderFn = renderFuncs[field.type]; + renderFn(field.data); +} + +// -------- + +type TypeMap = { + foo: string, + bar: number +}; + +type Keys = keyof TypeMap; + +type HandlerMap = { [P in Keys]: (x: TypeMap[P]) => void }; + +const handlers: HandlerMap = { + foo: s => s.length, + bar: n => n.toFixed(2) +}; + +type DataEntry = { [P in K]: { + type: P, + data: TypeMap[P] +}}[K]; + +const data: DataEntry[] = [ + { type: 'foo', data: 'abc' }, + { type: 'foo', data: 'def' }, + { type: 'bar', data: 42 }, +]; + +function process(data: DataEntry[]): void { + data.forEach(block => { + if (block.type in handlers) { + handlers[block.type](block.data) + } + }); +} + +process(data); +process([{ type: 'foo', data: 'abc' }]); + +// -------- + +type LetterMap = { A: string, B: number } +type LetterCaller = { [P in K]: { letter: Record, caller: (x: Record) => void } }[K]; + +function call({ letter, caller }: LetterCaller): void { + caller(letter); +} + +type A = { A: string }; +type B = { B: number }; +type ACaller = (a: A) => void; +type BCaller = (b: B) => void; + +declare const xx: { letter: A, caller: ACaller } | { letter: B, caller: BCaller }; + +call(xx); + +// -------- + +type Ev = { [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; +}}[K]; + +function processEvents(events: Ev[]): void { + for (const event of events) { + document.addEventListener(event.name, (ev) => event.callback(ev), { once: event.once }); + } +} + +function createEventListener({ name, once = false, callback }: Ev): Ev { + return { name, once, callback }; +} + +const clickEvent: { + readonly name: "click"; + readonly once?: boolean | undefined; + readonly callback: (ev: MouseEvent) => void; +} = createEventListener({ + name: "click", + callback: ev => console.log(ev), +}); + +const scrollEvent: { + readonly name: "scroll"; + readonly once?: boolean | undefined; + readonly callback: (ev: Event) => void; +} = createEventListener({ + name: "scroll", + callback: ev => console.log(ev), +}); + +processEvents([clickEvent, scrollEvent]); + +processEvents([ + { name: "click", callback: ev => console.log(ev) }, + { name: "scroll", callback: ev => console.log(ev) }, +]); + +// -------- + +function ff1(): void { + type ArgMap = { + sum: [a: number, b: number], + concat: [a: string, b: string, c: string] + } + type Keys = keyof ArgMap; + const funs: { [P in Keys]: (...args: ArgMap[P]) => void } = { + sum: (a, b) => a + b, + concat: (a, b, c) => a + b + c + } + function apply(funKey: K, ...args: ArgMap[K]) { + const fn = funs[funKey]; + fn(...args); + } + const x1 = apply('sum', 1, 2) + const x2 = apply('concat', 'str1', 'str2', 'str3' ) +} + +// Repro from #47368 + +type ArgMap = { a: number, b: string }; +type Func = (x: ArgMap[K]) => void; +type Funcs = { [K in keyof ArgMap]: Func }; + +function f1(funcs: Funcs, key: K, arg: ArgMap[K]): void { + funcs[key](arg); +} + +function f2(funcs: Funcs, key: K, arg: ArgMap[K]): void { + const func = funcs[key]; // Type Funcs[K] + func(arg); +} + +function f3(funcs: Funcs, key: K, arg: ArgMap[K]): void { + const func: Func = funcs[key]; + func(arg); +} + +function f4(x: Funcs[keyof ArgMap], y: Funcs[K]): void { + x = y; +} + +// Repro from #47890 + +interface MyObj { + someKey: { + name: string; + } + someOtherKey: { + name: number; + } +} + +const ref: MyObj = { + someKey: { name: "" }, + someOtherKey: { name: 42 } +}; + +function func(k: K): MyObj[K]['name'] | undefined { + const myObj: Partial[K] = ref[k]; + if (myObj) { + return myObj.name; + } + const myObj2: Partial[keyof MyObj] = ref[k]; + if (myObj2) { + return myObj2.name; + } + return undefined; +} + +// Repro from #48157 + +interface Foo { + bar?: string +} + +function foo(prop: T, f: Required): void { + bar(f[prop]); +} + +declare function bar(t: string): void; + +// Repro from #48246 + +declare function makeCompleteLookupMapping, Attr extends keyof T[number]>( + ops: T, attr: Attr): { [Item in T[number]as Item[Attr]]: Item }; + +const ALL_BARS = [{ name: 'a'}, {name: 'b'}] as const; + +const BAR_LOOKUP: { + a: { + readonly name: "a"; + }; + b: { + readonly name: "b"; + }; +} = makeCompleteLookupMapping(ALL_BARS, 'name'); + +type BarLookup = typeof BAR_LOOKUP; + +type Baz = { [K in keyof BarLookup]: BarLookup[K]['name'] }; + +// repro from #43982 + +interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; +} +type KeyOfOriginal = keyof Original; +type NestedKeyOfOriginalFor = keyof Original[T]; + +type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; +}; + +type MappedFromOriginal = SameKeys; + +const getStringAndNumberFromOriginalAndMapped = < + K extends KeyOfOriginal, + N extends NestedKeyOfOriginalFor +>( + original: Original, + mappedFromOriginal: MappedFromOriginal, + key: K, + nestedKey: N +): [Original[K][N], MappedFromOriginal[K][N]] => { + return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]]; +}; + +// repro from #31675 +interface Config { + string: string; + number: number; +} + +function getConfigOrDefault( + userConfig: Partial, + key: T, + defaultValue: Config[T] +): Config[T] { + const userValue = userConfig[key]; + const assertedCheck = userValue ? userValue! : defaultValue; + return assertedCheck; +} + +// repro from #47523 + +type Foo1 = { + x: number; + y: string; +}; + +function getValueConcrete( + o: Partial, + k: K +): Foo1[K] | undefined { + return o[k]; +} + + +/// [Declarations] //// + + + +//// [correlatedUnions.d.ts] +type RecordMap = { + n: number; + s: string; + b: boolean; +}; +type UnionRecord = { + [P in K]: { + kind: P; + v: RecordMap[P]; + f: (v: RecordMap[P]) => void; + }; +}[K]; +declare function processRecord(rec: UnionRecord): void; +declare const r1: UnionRecord<'n'>; +declare const r2: UnionRecord; +type TextFieldData = { + value: string; +}; +type SelectFieldData = { + options: string[]; + selectedValue: string; +}; +type FieldMap = { + text: TextFieldData; + select: SelectFieldData; +}; +type FormField = { + type: K; + data: FieldMap[K]; +}; +type RenderFunc = (props: FieldMap[K]) => void; +type RenderFuncMap = { + [K in keyof FieldMap]: RenderFunc; +}; +declare function renderTextField(props: TextFieldData): void; +declare function renderSelectField(props: SelectFieldData): void; +declare const renderFuncs: RenderFuncMap; +declare function renderField(field: FormField): void; +type TypeMap = { + foo: string; + bar: number; +}; +type Keys = keyof TypeMap; +type HandlerMap = { + [P in Keys]: (x: TypeMap[P]) => void; +}; +declare const handlers: HandlerMap; +type DataEntry = { + [P in K]: { + type: P; + data: TypeMap[P]; + }; +}[K]; +declare const data: DataEntry[]; +declare function process(data: DataEntry[]): void; +type LetterMap = { + A: string; + B: number; +}; +type LetterCaller = { + [P in K]: { + letter: Record; + caller: (x: Record) => void; + }; +}[K]; +declare function call({ letter, caller }: LetterCaller): void; +type A = { + A: string; +}; +type B = { + B: number; +}; +type ACaller = (a: A) => void; +type BCaller = (b: B) => void; +declare const xx: { + letter: A; + caller: ACaller; +} | { + letter: B; + caller: BCaller; +}; +type Ev = { + [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; + }; +}[K]; +declare function processEvents(events: Ev[]): void; +declare function createEventListener({ name, once, callback }: Ev): Ev; +declare const clickEvent: { + readonly name: "click"; + readonly once?: boolean | undefined; + readonly callback: (ev: MouseEvent) => void; +}; +declare const scrollEvent: { + readonly name: "scroll"; + readonly once?: boolean | undefined; + readonly callback: (ev: Event) => void; +}; +declare function ff1(): void; +type ArgMap = { + a: number; + b: string; +}; +type Func = (x: ArgMap[K]) => void; +type Funcs = { + [K in keyof ArgMap]: Func; +}; +declare function f1(funcs: Funcs, key: K, arg: ArgMap[K]): void; +declare function f2(funcs: Funcs, key: K, arg: ArgMap[K]): void; +declare function f3(funcs: Funcs, key: K, arg: ArgMap[K]): void; +declare function f4(x: Funcs[keyof ArgMap], y: Funcs[K]): void; +interface MyObj { + someKey: { + name: string; + }; + someOtherKey: { + name: number; + }; +} +declare const ref: MyObj; +declare function func(k: K): MyObj[K]['name'] | undefined; +interface Foo { + bar?: string; +} +declare function foo(prop: T, f: Required): void; +declare function bar(t: string): void; +declare function makeCompleteLookupMapping, Attr extends keyof T[number]>(ops: T, attr: Attr): { + [Item in T[number] as Item[Attr]]: Item; +}; +declare const ALL_BARS: readonly [{ + readonly name: "a"; +}, { + readonly name: "b"; +}]; +declare const BAR_LOOKUP: { + a: { + readonly name: "a"; + }; + b: { + readonly name: "b"; + }; +}; +type BarLookup = typeof BAR_LOOKUP; +type Baz = { + [K in keyof BarLookup]: BarLookup[K]['name']; +}; +interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; +} +type KeyOfOriginal = keyof Original; +type NestedKeyOfOriginalFor = keyof Original[T]; +type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; +}; +type MappedFromOriginal = SameKeys; +declare const getStringAndNumberFromOriginalAndMapped: (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]; +interface Config { + string: string; + number: number; +} +declare function getConfigOrDefault(userConfig: Partial, key: T, defaultValue: Config[T]): Config[T]; +type Foo1 = { + x: number; + y: string; +}; +declare function getValueConcrete(o: Partial, k: K): Foo1[K] | undefined; +//# sourceMappingURL=correlatedUnions.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEmitDeclarationOnly.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEmitDeclarationOnly.d.ts.map new file mode 100644 index 0000000000000..81a8078d136b7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEmitDeclarationOnly.d.ts.map @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/declFileEmitDeclarationOnly.ts] //// + +//// [helloworld.ts] +const Log = { + info(msg: string): void {} +} + +class HelloWorld { + constructor(private name: string) { + } + + public hello(): void { + Log.info(`Hello ${this.name}`); + } +} + + +/// [Declarations] //// + + + +//// [helloworld.d.ts] +declare const Log: { + info(msg: string): void; +}; +declare class HelloWorld { + private name; + constructor(name: string); + hello(): void; +} +//# sourceMappingURL=helloworld.d.ts.map + +/// [Declarations Maps] //// + + +//// [helloworld.d.ts.map] +{"version":3,"file":"helloworld.d.ts","sourceRoot":"","sources":["helloworld.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;cACG,MAAM,GAAG,IAAI;CACxB,CAAA;AAED,cAAM,UAAU;IACF,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,MAAM;IAGzB,KAAK,IAAI,IAAI;CAGrB"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBMb2c6IHsNCiAgICBpbmZvKG1zZzogc3RyaW5nKTogdm9pZDsNCn07DQpkZWNsYXJlIGNsYXNzIEhlbGxvV29ybGQgew0KICAgIHByaXZhdGUgbmFtZTsNCiAgICBjb25zdHJ1Y3RvcihuYW1lOiBzdHJpbmcpOw0KICAgIGhlbGxvKCk6IHZvaWQ7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1oZWxsb3dvcmxkLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsbG93b3JsZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaGVsbG93b3JsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLE1BQU0sR0FBRztjQUNHLE1BQU0sR0FBRyxJQUFJO0NBQ3hCLENBQUE7QUFFRCxjQUFNLFVBQVU7SUFDRixPQUFPLENBQUMsSUFBSTtnQkFBSixJQUFJLEVBQUUsTUFBTTtJQUd6QixLQUFLLElBQUksSUFBSTtDQUdyQiJ9,Y29uc3QgTG9nID0gewogIGluZm8obXNnOiBzdHJpbmcpOiB2b2lkIHt9Cn0KCmNsYXNzIEhlbGxvV29ybGQgewogIGNvbnN0cnVjdG9yKHByaXZhdGUgbmFtZTogc3RyaW5nKSB7CiAgfQoKICBwdWJsaWMgaGVsbG8oKTogdm9pZCB7CiAgICBMb2cuaW5mbyhgSGVsbG8gJHt0aGlzLm5hbWV9YCk7CiAgfQp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts new file mode 100644 index 0000000000000..3218fa2fce7d9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts @@ -0,0 +1,73 @@ +//// [tests/cases/compiler/declFileEnums.ts] //// + +//// [declFileEnums.ts] +enum e1 { + a, + b, + c +} + +enum e2 { + a = 10, + b = a + 2, + c = 10, +} + +enum e3 { + a = 10, + b = Math.PI, + c = a + 3 +} + +enum e4 { + a, + b, + c, + d = 10, + e +} + +enum e5 { + "Friday", + "Saturday", + "Sunday", + "Weekend days" +} + + + + +/// [Declarations] //// + + + +//// [declFileEnums.d.ts] +declare enum e1 { + a = 0, + b = 1, + c = 2 +} +declare enum e2 { + a = 10, + b = 12, + c = 10 +} +declare enum e3 { + a = 10, + b, + c = 13 +} +declare enum e4 { + a = 0, + b = 1, + c = 2, + d = 10, + e = 11 +} +declare enum e5 { + "Friday" = 0, + "Saturday" = 1, + "Sunday" = 2, + "Weekend days" = 3 +} +//# sourceMappingURL=declFileEnums.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitAliasExportStar.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitAliasExportStar.d.ts.map new file mode 100644 index 0000000000000..c827861793204 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitAliasExportStar.d.ts.map @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/declarationEmitAliasExportStar.ts] //// + +//// [thingB.ts] +export interface ThingB { } +//// [things.ts] +export * from "./thingB"; +//// [index.ts] +import * as things from "./things"; +export const thing2 = (param: things.ThingB): any => null; + + +/// [Declarations] //// + + + +//// [index.d.ts] +import * as things from "./things"; +export declare const thing2: (param: things.ThingB) => any; +//# sourceMappingURL=index.d.ts.map +//// [thingB.d.ts] +export interface ThingB { +} +//# sourceMappingURL=thingB.d.ts.map +//// [things.d.ts] +export * from "./thingB"; +//# sourceMappingURL=things.d.ts.map + +/// [Declarations Maps] //// + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,eAAO,MAAM,MAAM,UAAW,OAAO,MAAM,KAAG,GAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IHRoaW5nMjogKHBhcmFtOiB0aGluZ3MuVGhpbmdCKSA9PiBhbnk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE1BQU0sVUFBVSxDQUFDO0FBQ25DLGVBQU8sTUFBTSxNQUFNLFVBQVcsT0FBTyxNQUFNLEtBQUcsR0FBVyxDQUFDIn0=,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsKZXhwb3J0IGNvbnN0IHRoaW5nMiA9IChwYXJhbTogdGhpbmdzLlRoaW5nQik6IGFueSA9PiBudWxsOwo= + + +//// [thingB.d.ts.map] +{"version":3,"file":"thingB.d.ts","sourceRoot":"","sources":["thingB.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;CAAI"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBUaGluZ0Igew0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGhpbmdCLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhpbmdCLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0aGluZ0IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxXQUFXLE1BQU07Q0FBSSJ9,ZXhwb3J0IGludGVyZmFjZSBUaGluZ0IgeyB9 + + +//// [things.d.ts.map] +{"version":3,"file":"things.d.ts","sourceRoot":"","sources":["things.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0ICogZnJvbSAiLi90aGluZ0IiOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGhpbmdzLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhpbmdzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0aGluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxVQUFVLENBQUMifQ==,ZXhwb3J0ICogZnJvbSAiLi90aGluZ0IiOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map new file mode 100644 index 0000000000000..0387e095558b4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// + +//// [declarationEmitBindingPatternWithReservedWord.ts] +type LocaleData = Record +type ConvertLocaleConfig = Record< + string, + T +>; +type LocaleConfig = Record>; + +export interface GetLocalesOptions { + app: unknown; + default: ConvertLocaleConfig; + config?: LocaleConfig | undefined; + name?: string; +} + +export const getLocales = ({ + app, + name, + default: defaultLocalesConfig, + config: userLocalesConfig = {}, +}: GetLocalesOptions): ConvertLocaleConfig => { + return defaultLocalesConfig; +}; + + +/// [Declarations] //// + + + +//// [declarationEmitBindingPatternWithReservedWord.d.ts] +type LocaleData = Record; +type ConvertLocaleConfig = Record; +type LocaleConfig = Record>; +export interface GetLocalesOptions { + app: unknown; + default: ConvertLocaleConfig; + config?: LocaleConfig | undefined; + name?: string; +} +export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig; +export {}; +//# sourceMappingURL=declarationEmitBindingPatternWithReservedWord.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitBindingPatternWithReservedWord.d.ts.map] +{"version":3,"file":"declarationEmitBindingPatternWithReservedWord.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatternWithReservedWord.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AACvC,KAAK,mBAAmB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,MAAM,CAClE,MAAM,EACN,CAAC,CACF,CAAC;AACF,KAAK,YAAY,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAElF,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,UAAU;IACnD,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,mGAKpB,kBAAkB,CAAC,CAAC,KAAG,oBAAoB,CAAC,CAE9C,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBMb2NhbGVEYXRhID0gUmVjb3JkPHN0cmluZywgbmV2ZXI+Ow0KdHlwZSBDb252ZXJ0TG9jYWxlQ29uZmlnPFQgZXh0ZW5kcyBMb2NhbGVEYXRhID0gTG9jYWxlRGF0YT4gPSBSZWNvcmQ8c3RyaW5nLCBUPjsNCnR5cGUgTG9jYWxlQ29uZmlnPFQgZXh0ZW5kcyBMb2NhbGVEYXRhID0gTG9jYWxlRGF0YT4gPSBSZWNvcmQ8c3RyaW5nLCBQYXJ0aWFsPFQ+PjsNCmV4cG9ydCBpbnRlcmZhY2UgR2V0TG9jYWxlc09wdGlvbnM8VCBleHRlbmRzIExvY2FsZURhdGE+IHsNCiAgICBhcHA6IHVua25vd247DQogICAgZGVmYXVsdDogQ29udmVydExvY2FsZUNvbmZpZzxUPjsNCiAgICBjb25maWc/OiBM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b25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts.map new file mode 100644 index 0000000000000..c6a3617d1497a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts.map @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// + +//// [declarationEmitBindingPatterns.ts] +const k = ({x: z = 'y'}: { + x?: string; + }): void => { } + +var a: any; +function f({}: any = a, []: any = a, { p: {} = a}: any = a): void { +} + +/// [Declarations] //// + + + +//// [declarationEmitBindingPatterns.d.ts] +declare const k: ({ x: z }: { + x?: string; +}) => void; +declare var a: any; +declare function f({}?: any, []?: any, { p: {} }?: any): void; +//# sourceMappingURL=declarationEmitBindingPatterns.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitBindingPatterns.d.ts.map] +{"version":3,"file":"declarationEmitBindingPatterns.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatterns.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,aAAkB;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;CACd,KAAG,IAAW,CAAA;AAEnB,QAAA,IAAI,CAAC,EAAE,GAAG,CAAC;AACX,iBAAS,CAAC,CAAC,EAAE,GAAE,GAAO,EAAE,EAAE,GAAE,GAAO,EAAE,EAAE,CAAC,EAAE,EAAM,EAAC,GAAE,GAAO,GAAG,IAAI,CAChE"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBrOiAoeyB4OiB6IH06IHsNCiAgICB4Pzogc3RyaW5nOw0KfSkgPT4gdm9pZDsNCmRlY2xhcmUgdmFyIGE6IGFueTsNCmRlY2xhcmUgZnVuY3Rpb24gZih7fT86IGFueSwgW10/OiBhbnksIHsgcDoge30gfT86IGFueSk6IHZvaWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0QmluZGluZ1BhdHRlcm5zLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsYUFBa0I7SUFDakIsQ0FBQyxDQUFDLEVBQUUsTUFBTSxDQUFDO0NBQ2QsS0FBRyxJQUFXLENBQUE7QUFFbkIsUUFBQSxJQUFJLENBQUMsRUFBRSxHQUFHLENBQUM7QUFDWCxpQkFBUyxDQUFDLENBQUMsRUFBRSxHQUFFLEdBQU8sRUFBRSxFQUFFLEdBQUUsR0FBTyxFQUFFLEVBQUUsQ0FBQyxFQUFFLEVBQU0sRUFBQyxHQUFFLEdBQU8sR0FBRyxJQUFJLENBQ2hFIn0=,Y29uc3QgayA9ICh7eDogeiA9ICd5J306IHsKICAgICAgICB4Pzogc3RyaW5nOwogICAgfSk6IHZvaWQgPT4geyB9Cgp2YXIgYTogYW55OwpmdW5jdGlvbiBmKHt9OiBhbnkgPSBhLCBbXTogYW55ID0gYSwgeyBwOiB7fSA9IGF9OiBhbnkgPSBhKTogdm9pZCB7Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternsFunctionExpr.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternsFunctionExpr.d.ts.map new file mode 100644 index 0000000000000..26823b499942b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternsFunctionExpr.d.ts.map @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/declarationEmitBindingPatternsFunctionExpr.ts] //// + +//// [declarationEmitBindingPatternsFunctionExpr.ts] +type Named = { name: string } +// Tempting to remove alias if unused +let notReferenced = ({ name: alias }: Named): void => { } + +// Resons we can't remove aliases that are not used in the function signature: + +// 1.Causes duplicate identifier if we remove alias +const duplicateIndetifiers = ({ name: alias, name: alias2 }: Named): void => { } +const duplicateIndetifiers2 = (name: string, { name: alias }: Named): void => { } +const duplicateIndetifiers3 = ({ name: alias }: Named, { name: alias2 }: Named): void => { } + +let value = ""; +// 2.Can change in meaning for typeof value if we remove alias +const shadowedVariable = ({ value: alias }: { value: string }): typeof value => value; + +/// [Declarations] //// + + + +//// [declarationEmitBindingPatternsFunctionExpr.d.ts] +type Named = { + name: string; +}; +declare let notReferenced: ({ name: alias }: Named) => void; +declare const duplicateIndetifiers: ({ name: alias, name: alias2 }: Named) => void; +declare const duplicateIndetifiers2: (name: string, { name: alias }: Named) => void; +declare const duplicateIndetifiers3: ({ name: alias }: Named, { name: alias2 }: Named) => void; +declare let value: string; +declare const shadowedVariable: ({ value: alias }: { + value: string; +}) => typeof value; +//# sourceMappingURL=declarationEmitBindingPatternsFunctionExpr.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitBindingPatternsFunctionExpr.d.ts.map] +{"version":3,"file":"declarationEmitBindingPatternsFunctionExpr.d.ts","sourceRoot":"","sources":["declarationEmitBindingPatternsFunctionExpr.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7B,QAAA,IAAI,aAAa,oBAAqB,KAAK,KAAG,IAAW,CAAA;AAKzD,QAAA,MAAM,oBAAoB,kCAAmC,KAAK,KAAG,IAAW,CAAA;AAChF,QAAA,MAAM,qBAAqB,SAAU,MAAM,mBAAmB,KAAK,KAAG,IAAW,CAAA;AACjF,QAAA,MAAM,qBAAqB,oBAAqB,KAAK,oBAAoB,KAAK,KAAG,IAAW,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MyID0gKG5hbWU6IHN0cmluZywgeyBuYW1lOiBhbGlhcyB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CmNvbnN0IGR1cGxpY2F0ZUluZGV0aWZpZXJzMyA9ICh7IG5hbWU6IGFsaWFzIH06IE5hbWVkLCB7IG5hbWU6IGFsaWFzMiB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CgpsZXQgdmFsdWUgPSAiIjsKLy8gMi5DYW4gY2hhbmdlIGluIG1lYW5pbmcgZm9yIHR5cGVvZiB2YWx1ZSBpZiB3ZSByZW1vdmUgYWxpYXMKY29uc3Qgc2hhZG93ZWRWYXJpYWJsZSA9ICh7IHZhbHVlOiBhbGlhcyB9OiB7IHZhbHVlOiBzdHJpbmcgfSk6IHR5cGVvZiB2YWx1ZSA9PiB2YWx1ZTs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBundleWithAmbientReferences.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBundleWithAmbientReferences.d.ts new file mode 100644 index 0000000000000..36ece4ac201b9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBundleWithAmbientReferences.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts] //// + +//// [lib.d.ts] +declare module "lib/result" { + export type Result = (E & Failure) | (T & Success); + export interface Failure { } + export interface Success { } +} + +//// [datastore_result.ts] +import { Result } from "lib/result"; + +export type T = Result; + +//// [conditional_directive_field.ts] +import * as DatastoreResult from "src/datastore_result"; + +export const build = (): DatastoreResult.T => { + return null; +}; + + +/// [Declarations] //// + + + +//// [src/conditional_directive_field.d.ts] +import * as DatastoreResult from "src/datastore_result"; +export declare const build: () => DatastoreResult.T; +//# sourceMappingURL=conditional_directive_field.d.ts.map +//// [src/datastore_result.d.ts] +/// +import { Result } from "lib/result"; +export type T = Result; +//# sourceMappingURL=datastore_result.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts new file mode 100644 index 0000000000000..19b51ba130039 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// + +//// [index.d.ts] +export interface NestedProps {} +//// [index.d.ts] +export interface OtherIndexProps {} +//// [other.d.ts] +export interface OtherProps {} +//// [index.d.ts] +import { OtherProps } from "./other"; +import { OtherIndexProps } from "./other/index"; +import { NestedProps } from "nested"; +export interface SomeProps {} + +export function foo(): [SomeProps, OtherProps, OtherIndexProps, NestedProps]; +//// [index.d.ts] +export interface RootProps {} + +export function bar(): RootProps; +//// [entry.ts] +import { foo } from "foo"; +import { RootProps, bar } from "root"; +export const x = foo(); +export const y: RootProps = bar(); + + +/// [Declarations] //// + + +/// [Errors] //// + +r/entry.ts(3,14): error TS2742: The inferred type of 'x' cannot be named without a reference to 'foo/node_modules/nested'. This is likely not portable. A type annotation is necessary. + + +==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== + export interface NestedProps {} +==== r/node_modules/foo/other/index.d.ts (0 errors) ==== + export interface OtherIndexProps {} +==== r/node_modules/foo/other.d.ts (0 errors) ==== + export interface OtherProps {} +==== r/node_modules/foo/index.d.ts (0 errors) ==== + import { OtherProps } from "./other"; + import { OtherIndexProps } from "./other/index"; + import { NestedProps } from "nested"; + export interface SomeProps {} + + export function foo(): [SomeProps, OtherProps, OtherIndexProps, NestedProps]; +==== node_modules/root/index.d.ts (0 errors) ==== + export interface RootProps {} + + export function bar(): RootProps; +==== r/entry.ts (1 errors) ==== + import { foo } from "foo"; + import { RootProps, bar } from "root"; + export const x = foo(); + ~ +!!! error TS2742: The inferred type of 'x' cannot be named without a reference to 'foo/node_modules/nested'. This is likely not portable. A type annotation is necessary. + export const y: RootProps = bar(); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameCausesImportToBePainted.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameCausesImportToBePainted.d.ts.map new file mode 100644 index 0000000000000..1a145b3965e42 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameCausesImportToBePainted.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts] //// + +//// [context.ts] +export const Key: unique symbol = Symbol(); +export interface Context { + [Key]: string; +} +//// [index.ts] +import { Key, Context } from "./context"; + +export const context: Context = { + [Key]: 'bar', +} + +export const withContext = ({ [Key]: value }: Context): string => value; + +/// [Declarations] //// + + + +//// [context.d.ts] +export declare const Key: unique symbol; +export interface Context { + [Key]: string; +} +//# sourceMappingURL=context.d.ts.map +//// [index.d.ts] +import { Key, Context } from "./context"; +export declare const context: Context; +export declare const withContext: ({ [Key]: value }: Context) => string; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [context.d.ts.map] +{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["context.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,EAAE,OAAO,MAAiB,CAAC;AAC3C,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACf"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgS2V5OiB1bmlxdWUgc3ltYm9sOw0KZXhwb3J0IGludGVyZmFjZSBDb250ZXh0IHsNCiAgICBbS2V5XTogc3RyaW5nOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y29udGV4dC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29udGV4dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sR0FBRyxFQUFFLE9BQU8sTUFBaUIsQ0FBQztBQUMzQyxNQUFNLFdBQVcsT0FBTztJQUN0QixDQUFDLEdBQUcsQ0FBQyxFQUFFLE1BQU0sQ0FBQztDQUNmIn0=,ZXhwb3J0IGNvbnN0IEtleTogdW5pcXVlIHN5bWJvbCA9IFN5bWJvbCgpOwpleHBvcnQgaW50ZXJmYWNlIENvbnRleHQgewogIFtLZXldOiBzdHJpbmc7Cn0= + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,OAErB,CAAA;AAED,eAAO,MAAM,WAAW,qBAAsB,OAAO,KAAG,MAAe,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgS2V5LCBDb250ZXh0IH0gZnJvbSAiLi9jb250ZXh0IjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGNvbnRleHQ6IENvbnRleHQ7DQpleHBvcnQgZGVjbGFyZSBjb25zdCB3aXRoQ29udGV4dDogKHsgW0tleV06IHZhbHVlIH06IENvbnRleHQpID0+IHN0cmluZzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxHQUFHLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBRXpDLGVBQU8sTUFBTSxPQUFPLEVBQUUsT0FFckIsQ0FBQTtBQUVELGVBQU8sTUFBTSxXQUFXLHFCQUFzQixPQUFPLEtBQUcsTUFBZSxDQUFDIn0=,aW1wb3J0IHsgS2V5LCBDb250ZXh0IH0gZnJvbSAiLi9jb250ZXh0IjsKCmV4cG9ydCBjb25zdCBjb250ZXh0OiBDb250ZXh0ID0gewogIFtLZXldOiAnYmFyJywKfQoKZXhwb3J0IGNvbnN0IHdpdGhDb250ZXh0ID0gKHsgW0tleV06IHZhbHVlIH06IENvbnRleHQpOiBzdHJpbmcgPT4gdmFsdWU7 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameConstEnumAlias.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameConstEnumAlias.d.ts new file mode 100644 index 0000000000000..675e5c2604a6a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameConstEnumAlias.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/declarationEmitComputedNameConstEnumAlias.ts] //// + +//// [EnumExample.ts] +enum EnumExample { + TEST = 'TEST', +} + +export default EnumExample; + +//// [index.ts] +import EnumExample from './EnumExample'; + +export default { + [EnumExample.TEST]: {}, +}; + +/// [Declarations] //// + + + +//// [EnumExample.d.ts] +declare enum EnumExample { + TEST = "TEST" +} +export default EnumExample; +//# sourceMappingURL=EnumExample.d.ts.map +//// [index.d.ts] +declare const _default: { + TEST: {}; +}; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts new file mode 100644 index 0000000000000..caaf3c3cdf44d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts] //// + +//// [component.d.ts] +declare module '@namespace/component' { + export class Foo {} +} +//// [index.d.ts] +import { Foo } from "@namespace/component"; +export declare const item: typeof Foo; +//// [index.ts] +import { Foo } from "@namespace/component"; +import { item } from "../somepackage"; +export const reeexported: Foo = item; + + +/// [Declarations] //// + + + +//// [packages/secondpackage/index.d.ts] +/// +import { Foo } from "@namespace/component"; +export declare const reeexported: Foo; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts new file mode 100644 index 0000000000000..a4e81ca631fd9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts] //// + +//// [foo.ts] +export class Foo {} + +//// [index1.ts] +import {Foo} from './foo'; +export default function Example(): void {} +Example.Foo = Foo + +//// [index2.ts] +import {Foo} from './foo'; +export {Foo}; +export default function Example(): void {} +Example.Foo = Foo + +//// [index3.ts] +export class Bar {} +export default function Example(): void {} + +Example.Bar = Bar + +//// [index4.ts] +function A() { } + +function B() { } + +export function C(): any { + return null; +} + +C.A = A; +C.B = B; + +/// [Declarations] //// + + + +//// [foo.d.ts] +export declare class Foo { +} +//# sourceMappingURL=foo.d.ts.map +//// [index1.d.ts] +declare function Example(): void; +declare namespace Example { + var Foo: typeof import("./foo").Foo; +} +export default Example; +//# sourceMappingURL=index1.d.ts.map +//// [index2.d.ts] +import { Foo } from './foo'; +export { Foo }; +declare function Example(): void; +declare namespace Example { + var Foo: typeof import("./foo").Foo; +} +export default Example; +//# sourceMappingURL=index2.d.ts.map +//// [index3.d.ts] +export declare class Bar { +} +declare function Example(): void; +declare namespace Example { + var Bar: typeof import("./index3").Bar; +} +export default Example; +//# sourceMappingURL=index3.d.ts.map +//// [index4.d.ts] +export declare function C(): any; +export declare namespace C { + var A: () => void; + var B: () => void; +} +//# sourceMappingURL=index4.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts new file mode 100644 index 0000000000000..c156cee83507e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts @@ -0,0 +1,80 @@ +//// [tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts] //// + +//// [declarationEmitDestructuringParameterProperties.ts] +class C1 { + constructor(public [x, y, z]: string[]) { + } +} + +type TupleType1 =[string, number, boolean]; +class C2 { + constructor(public [x, y, z]: TupleType1) { + } +} + +type ObjType1 = { x: number; y: string; z: boolean } +class C3 { + constructor(public { x, y, z }: ObjType1) { + } +} + +/// [Declarations] //// + + + +//// [declarationEmitDestructuringParameterProperties.d.ts] +declare class C1 { + x: string; + y: string; + z: string; + constructor([x, y, z]: string[]); +} +type TupleType1 = [string, number, boolean]; +declare class C2 { + x: string; + y: number; + z: boolean; + constructor([x, y, z]: TupleType1); +} +type ObjType1 = { + x: number; + y: string; + z: boolean; +}; +declare class C3 { + x: number; + y: string; + z: boolean; + constructor({ x, y, z }: ObjType1); +} +//# sourceMappingURL=declarationEmitDestructuringParameterProperties.d.ts.map +/// [Errors] //// + +declarationEmitDestructuringParameterProperties.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. +declarationEmitDestructuringParameterProperties.ts(8,17): error TS1187: A parameter property may not be declared using a binding pattern. +declarationEmitDestructuringParameterProperties.ts(14,17): error TS1187: A parameter property may not be declared using a binding pattern. + + +==== declarationEmitDestructuringParameterProperties.ts (3 errors) ==== + class C1 { + constructor(public [x, y, z]: string[]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + } + } + + type TupleType1 =[string, number, boolean]; + class C2 { + constructor(public [x, y, z]: TupleType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + } + } + + type ObjType1 = { x: number; y: string; z: boolean } + class C3 { + constructor(public { x, y, z }: ObjType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDistributiveConditionalWithInfer.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDistributiveConditionalWithInfer.d.ts.map new file mode 100644 index 0000000000000..ec9828d6925e4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDistributiveConditionalWithInfer.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts] //// + +//// [declarationEmitDistributiveConditionalWithInfer.ts] +// This function's type is changed on declaration +export const fun = ( + subFun: () + => FlatArray[]): void => { }; + + +/// [Declarations] //// + + + +//// [declarationEmitDistributiveConditionalWithInfer.d.ts] +export declare const fun: (subFun: () => FlatArray[]) => void; +//# sourceMappingURL=declarationEmitDistributiveConditionalWithInfer.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDistributiveConditionalWithInfer.d.ts.map] +{"version":3,"file":"declarationEmitDistributiveConditionalWithInfer.d.ts","sourceRoot":"","sources":["declarationEmitDistributiveConditionalWithInfer.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,GAAG,6DAEL,UAAU,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,KAAG,IAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZnVuOiAoc3ViRnVuOiA8Q29sbGVjdGlvbiwgRmllbGQgZXh0ZW5kcyBrZXlvZiBDb2xsZWN0aW9uPigpID0+IEZsYXRBcnJheTxDb2xsZWN0aW9uW0ZpZWxkXSwgMD5bXSkgPT4gdm9pZDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdERpc3RyaWJ1dGl2ZUNvbmRpdGlvbmFsV2l0aEluZmVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0RGlzdHJpYnV0aXZlQ29uZGl0aW9uYWxXaXRoSW5mZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdERpc3RyaWJ1dGl2ZUNvbmRpdGlvbmFsV2l0aEluZmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLGVBQU8sTUFBTSxHQUFHLDZEQUVMLFVBQVUsVUFBVSxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFFLEtBQUcsSUFBVyxDQUFDIn0=,Ly8gVGhpcyBmdW5jdGlvbidzIHR5cGUgaXMgY2hhbmdlZCBvbiBkZWNsYXJhdGlvbgpleHBvcnQgY29uc3QgZnVuID0gKAogICAgc3ViRnVuOiA8Q29sbGVjdGlvbiwgRmllbGQgZXh0ZW5kcyBrZXlvZiBDb2xsZWN0aW9uPigpCiAgICAgICAgPT4gRmxhdEFycmF5PENvbGxlY3Rpb25bRmllbGRdLCAwPltdKTogdm9pZCA9PiB7IH07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts.map new file mode 100644 index 0000000000000..506a52bfa03ae --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts.map @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// + +//// [declarationEmitDuplicateParameterDestructuring.ts] +export const fn1 = ({ prop: a, prop: b }: { prop: number }): number => a + b; + +export const fn2 = ({ prop: a }: { prop: number }, { prop: b }: { prop: number }): number => a + b; + + +/// [Declarations] //// + + + +//// [declarationEmitDuplicateParameterDestructuring.d.ts] +export declare const fn1: ({ prop: a, prop: b }: { + prop: number; +}) => number; +export declare const fn2: ({ prop: a }: { + prop: number; +}, { prop: b }: { + prop: number; +}) => number; +//# sourceMappingURL=declarationEmitDuplicateParameterDestructuring.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDuplicateParameterDestructuring.d.ts.map] +{"version":3,"file":"declarationEmitDuplicateParameterDestructuring.d.ts","sourceRoot":"","sources":["declarationEmitDuplicateParameterDestructuring.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,yBAA0B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAAe,CAAC;AAE7E,eAAO,MAAM,GAAG,gBAAiB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,eAAe;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MAAe,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm4xOiAoeyBwcm9wOiBhLCBwcm9wOiBiIH06IHsNCiAgICBwcm9wOiBudW1iZXI7DQp9KSA9PiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjI6ICh7IHByb3A6IGEgfTogew0KICAgIHByb3A6IG51bWJlcjsNCn0sIHsgcHJvcDogYiB9OiB7DQogICAgcHJvcDogbnVtYmVyOw0KfSkgPT4gbnVtYmVyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sR0FBRyx5QkFBMEI7SUFBRSxJQUFJLEVBQUUsTUFBTSxDQUFBO0NBQUUsS0FBRyxNQUFlLENBQUM7QUFFN0UsZUFBTyxNQUFNLEdBQUcsZ0JBQWlCO0lBQUUsSUFBSSxFQUFFLE1BQU0sQ0FBQTtDQUFFLGVBQWU7SUFBRSxJQUFJLEVBQUUsTUFBTSxDQUFBO0NBQUUsS0FBRyxNQUFlLENBQUMifQ==,ZXhwb3J0IGNvbnN0IGZuMSA9ICh7IHByb3A6IGEsIHByb3A6IGIgfTogeyBwcm9wOiBudW1iZXIgfSk6IG51bWJlciA9PiBhICsgYjsKCmV4cG9ydCBjb25zdCBmbjIgPSAoeyBwcm9wOiBhIH06IHsgcHJvcDogbnVtYmVyIH0sIHsgcHJvcDogYiB9OiB7IHByb3A6IG51bWJlciB9KTogbnVtYmVyID0+IGEgKyBiOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts new file mode 100644 index 0000000000000..ffe4465de18a2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts] //// + +//// [a.ts] +interface I {} +export function f(): I { return null as I; } +//// [b.ts] +import {f} from "./a"; + +export function q(): void {} +q.val = f(); + + +/// [Declarations] //// + + + +//// [a.d.ts] +interface I { +} +export declare function f(): I; +export {}; +//# sourceMappingURL=a.d.ts.map +/// [Errors] //// + +b.ts(4,1): error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. + + +==== a.ts (0 errors) ==== + interface I {} + export function f(): I { return null as I; } +==== b.ts (1 errors) ==== + import {f} from "./a"; + + export function q(): void {} + q.val = f(); + ~~~~~ +!!! error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoWithGenericConstraint.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoWithGenericConstraint.d.ts.map new file mode 100644 index 0000000000000..d9f155b0d1cac --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoWithGenericConstraint.d.ts.map @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts] //// + +//// [declarationEmitExpandoWithGenericConstraint.ts] +export interface Point { + readonly x: number; + readonly y: number; +} + +export interface Rect

{ + readonly a: p; + readonly b: p; +} + +export const Point: { + (x: number, y: number): Point; + zero(): Point; +} = (x: number, y: number): Point => ({ x, y }); +export const Rect =

(a: p, b: p): Rect

=> ({ a, b }); + +Point.zero = (): Point => Point(0, 0); + +/// [Declarations] //// + + + +//// [declarationEmitExpandoWithGenericConstraint.d.ts] +export interface Point { + readonly x: number; + readonly y: number; +} +export interface Rect

{ + readonly a: p; + readonly b: p; +} +export declare const Point: { + (x: number, y: number): Point; + zero(): Point; +}; +export declare const Rect:

(a: p, b: p) => Rect

; +//# sourceMappingURL=declarationEmitExpandoWithGenericConstraint.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitExpandoWithGenericConstraint.d.ts.map] +{"version":3,"file":"declarationEmitExpandoWithGenericConstraint.d.ts","sourceRoot":"","sources":["declarationEmitExpandoWithGenericConstraint.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,IAAI,CAAC,CAAC,SAAS,KAAK;IACjC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;CACjB;AAED,eAAO,MAAM,KAAK,EAAE;IAChB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC9B,IAAI,IAAI,KAAK,CAAC;CAC6B,CAAC;AAChD,eAAO,MAAM,IAAI,uBAAwB,CAAC,KAAK,CAAC,KAAG,KAAK,CAAC,CAAe,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBQb2ludCB7DQogICAgcmVhZG9ubHkgeDogbnVtYmVyOw0KICAgIHJlYWRvbmx5IHk6IG51bWJlcjsNCn0NCmV4cG9ydCBpbnRlcmZhY2UgUmVjdDxwIGV4dGVuZHMgUG9pbnQ+IHsNCiAgICByZWFkb25seSBhOiBwOw0KICAgIHJlYWRvbmx5IGI6IHA7DQp9DQpleHBvcnQgZGVjbGFyZSBjb25zdCBQb2ludDogew0KICAgICh4OiBudW1iZXIsIHk6IG51bWJlcik6IFBvaW50Ow0KICAgIHplcm8oKTogUG9pbnQ7DQp9Ow0KZXhwb3J0IGRlY2xhcmUgY29uc3QgUmVjdDogPHAgZXh0ZW5kcyBQb2ludD4oYTogcCwgYjogcCkgPT4gUmVjdDxwPjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdEV4cGFuZG9XaXRoR2VuZXJpY0NvbnN0cmFpbnQuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXR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ik6IFBvaW50ID0+ICh7IHgsIHkgfSk7CmV4cG9ydCBjb25zdCBSZWN0ID0gPHAgZXh0ZW5kcyBQb2ludD4oYTogcCwgYjogcCk6IFJlY3Q8cD4gPT4gKHsgYSwgYiB9KTsKClBvaW50Lnplcm8gPSAoKTogUG9pbnQgPT4gUG9pbnQoMCwgMCk7 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExportAliasVisibiilityMarking.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExportAliasVisibiilityMarking.d.ts.map new file mode 100644 index 0000000000000..f10ac05ca166b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExportAliasVisibiilityMarking.d.ts.map @@ -0,0 +1,70 @@ +//// [tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts] //// + +//// [Types.ts] +type Suit = 'Hearts' | 'Spades' | 'Clubs' | 'Diamonds'; +type Rank = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 'Jack' | 'Queen' | 'King'; +export { Suit, Rank }; + +//// [Card.ts] +import { Suit, Rank } from './Types'; +export default (suit: Suit, rank: Rank): { + suit: Suit; + rank: Rank; +} => ({suit, rank}); + +//// [index.ts] +import { Suit, Rank } from './Types'; + +export let lazyCard = (): Promise<(suit: Suit, rank: Rank) => { + suit: Suit; + rank: Rank; +}> => import('./Card').then(a => a.default); +export { Suit, Rank } from './Types'; + + +/// [Declarations] //// + + + +//// [Card.d.ts] +import { Suit, Rank } from './Types'; +declare const _default: (suit: Suit, rank: Rank) => { + suit: Suit; + rank: Rank; +}; +export default _default; +//# sourceMappingURL=Card.d.ts.map +//// [Types.d.ts] +type Suit = 'Hearts' | 'Spades' | 'Clubs' | 'Diamonds'; +type Rank = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 'Jack' | 'Queen' | 'King'; +export { Suit, Rank }; +//# sourceMappingURL=Types.d.ts.map +//// [index.d.ts] +import { Suit, Rank } from './Types'; +export declare let lazyCard: () => Promise<(suit: Suit, rank: Rank) => { + suit: Suit; + rank: Rank; +}>; +export { Suit, Rank } from './Types'; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [Card.d.ts.map] +{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;+BACf,IAAI,QAAQ,IAAI;UAC5B,IAAI;UACJ,IAAI;;AAFd,wBAGoB"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogKHN1aXQ6IFN1aXQsIHJhbms6IFJhbmspID0+IHsNCiAgICBzdWl0OiBTdWl0Ow0KICAgIHJhbms6IFJhbms7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1DYXJkLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FyZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiQ2FyZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxNQUFNLFNBQVMsQ0FBQzsrQkFDZixJQUFJLFFBQVEsSUFBSTtVQUM1QixJQUFJO1VBQ0osSUFBSTs7QUFGZCx3QkFHb0IifQ==,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwpleHBvcnQgZGVmYXVsdCAoc3VpdDogU3VpdCwgcmFuazogUmFuayk6IHsKICAgIHN1aXQ6IFN1aXQ7CiAgICByYW5rOiBSYW5rOwp9ID0+ICh7c3VpdCwgcmFua30pOwo= + + +//// [Types.d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DO0FBQ25GLE9BQU8sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLENBQUMifQ==,dHlwZSBTdWl0ID0gJ0hlYXJ0cycgfCAnU3BhZGVzJyB8ICdDbHVicycgfCAnRGlhbW9uZHMnOwp0eXBlIFJhbmsgPSAwIHwgMSB8IDIgfCAzIHwgNCB8IDUgfCA2IHwgNyB8IDggfCA5IHwgMTAgfCAnSmFjaycgfCAnUXVlZW4nIHwgJ0tpbmcnOwpleHBvcnQgeyBTdWl0LCBSYW5rIH07Cg== + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,IAAI,QAAQ,uBAAsB,IAAI,QAAQ,IAAI;UAC/C,IAAI;UACJ,IAAI;EAC6B,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOw0KZXhwb3J0IGRlY2xhcmUgbGV0IGxhenlDYXJkOiAoKSA9PiBQcm9taXNlPChzdWl0OiBTdWl0LCByYW5rOiBSYW5rKSA9PiB7DQogICAgc3VpdDogU3VpdDsNCiAgICByYW5rOiBSYW5rOw0KfT47DQpleHBvcnQgeyBTdWl0LCBSYW5rIH0gZnJvbSAnLi9UeXBlcyc7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBRXJDLGVBQU8sSUFBSSxRQUFRLHVCQUFzQixJQUFJLFFBQVEsSUFBSTtVQUMvQyxJQUFJO1VBQ0osSUFBSTtFQUM2QixDQUFDO0FBQzVDLE9BQU8sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLE1BQU0sU0FBUyxDQUFDIn0=,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwoKZXhwb3J0IGxldCBsYXp5Q2FyZCA9ICgpOiBQcm9taXNlPChzdWl0OiBTdWl0LCByYW5rOiBSYW5rKSA9PiB7CiAgICBzdWl0OiBTdWl0OwogICAgcmFuazogUmFuazsKfT4gPT4gaW1wb3J0KCcuL0NhcmQnKS50aGVuKGEgPT4gYS5kZWZhdWx0KTsKZXhwb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpressionInExtends4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpressionInExtends4.d.ts new file mode 100644 index 0000000000000..f93323c2c0fbc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpressionInExtends4.d.ts @@ -0,0 +1,65 @@ +//// [tests/cases/compiler/declarationEmitExpressionInExtends4.ts] //// + +//// [declarationEmitExpressionInExtends4.ts] +function getSomething(): { + new(): {}; +} { + return class D { } +} + +const CBase: { + new(): {}; +} = getSomething(); +class C extends CBase { + +} + +const C2Base: any = SomeUndefinedFunction(); +class C2 extends C2Base { + +} + + +class C3 extends SomeUndefinedFunction { + +} + +/// [Declarations] //// + + +/// [Errors] //// + +declarationEmitExpressionInExtends4.ts(14,21): error TS2304: Cannot find name 'SomeUndefinedFunction'. +declarationEmitExpressionInExtends4.ts(20,18): error TS2304: Cannot find name 'SomeUndefinedFunction'. +declarationEmitExpressionInExtends4.ts(20,18): error TS4020: 'extends' clause of exported class 'C3' has or is using private name 'SomeUndefinedFunction'. + + +==== declarationEmitExpressionInExtends4.ts (3 errors) ==== + function getSomething(): { + new(): {}; + } { + return class D { } + } + + const CBase: { + new(): {}; + } = getSomething(); + class C extends CBase { + + } + + const C2Base: any = SomeUndefinedFunction(); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeUndefinedFunction'. + class C2 extends C2Base { + + } + + + class C3 extends SomeUndefinedFunction { + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeUndefinedFunction'. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS4020: 'extends' clause of exported class 'C3' has or is using private name 'SomeUndefinedFunction'. + + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpressionInExtends7.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpressionInExtends7.d.ts new file mode 100644 index 0000000000000..b0fd01bd606a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpressionInExtends7.d.ts @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/declarationEmitExpressionInExtends7.ts] //// + +//// [declarationEmitExpressionInExtends7.ts] +export default class extends SomeUndefinedFunction {} + + +/// [Declarations] //// + + +/// [Errors] //// + +declarationEmitExpressionInExtends7.ts(1,30): error TS2304: Cannot find name 'SomeUndefinedFunction'. +declarationEmitExpressionInExtends7.ts(1,30): error TS4021: 'extends' clause of exported class has or is using private name 'SomeUndefinedFunction'. + + +==== declarationEmitExpressionInExtends7.ts (2 errors) ==== + export default class extends SomeUndefinedFunction {} + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeUndefinedFunction'. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS4021: 'extends' clause of exported class has or is using private name 'SomeUndefinedFunction'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts new file mode 100644 index 0000000000000..47ce01548d856 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// + +//// [impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [index.d.ts] +export * from "./src/impl"; +//// [package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [index.d.ts] +export * from "./src/impl"; +//// [package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [index.ts] +import * as _whatever from "p2"; +import { getA } from "typescript-fsa"; + +export const a = getA(); +//// [index.d.ts] +export const a: import("typescript-fsa").A; + + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export declare const a: import("typescript-fsa").A; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts new file mode 100644 index 0000000000000..c1c6477dd89cc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// + +//// [impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [index.d.ts] +export * from "./src/impl"; +//// [package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [index.ts] +import * as _whatever from "p2"; +import { getA } from "typescript-fsa"; + +export const a = getA(); +//// [index.d.ts] +export const a: import("typescript-fsa").A; + + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export declare const a: import("typescript-fsa").A; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts new file mode 100644 index 0000000000000..0ebd14e988996 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts] //// + +//// [child1.ts] +import { ParentThing } from './parent'; + +declare module './parent' { + interface ParentThing { + add: (a: number, b: number) => number; + } +} + +export function child1(prototype: ParentThing): void { + prototype.add = (a: number, b: number) => a + b; +} + +//// [parent.ts] +import { child1 } from './child1'; // this import should still exist in some form in the output, since it augments this module + +export class ParentThing implements ParentThing {} + +child1(ParentThing.prototype); + +/// [Declarations] //// + + + +//// [child1.d.ts] +import { ParentThing } from './parent'; +declare module './parent' { + interface ParentThing { + add: (a: number, b: number) => number; + } +} +export declare function child1(prototype: ParentThing): void; +//# sourceMappingURL=child1.d.ts.map +//// [/.src/parent.d.ts] +import './child1'; +export declare class ParentThing implements ParentThing { +} +//# sourceMappingURL=parent.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts new file mode 100644 index 0000000000000..8e5979649300a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts] //// + +//// [declarationEmitFunctionDuplicateNamespace.ts] +function f(a: 0): 0; +function f(a: 1): 1; +function f(a: 0 | 1) { + return a; +} + +f.x = 2; + + +/// [Declarations] //// + + + +//// [declarationEmitFunctionDuplicateNamespace.d.ts] +declare function f(a: 0): 0; +declare function f(a: 1): 1; +declare namespace f { + var x: number; +} +//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts new file mode 100644 index 0000000000000..fcd9f1f52fd30 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/declarationEmitFunctionKeywordProp.ts] //// + +//// [declarationEmitFunctionKeywordProp.ts] +function foo(): void {} +foo.null = true; + +function bar(): void {} +bar.async = true; +bar.normal = false; + +function baz(): void {} +baz.class = true; +baz.normal = false; + +/// [Declarations] //// + + + +//// [declarationEmitFunctionKeywordProp.d.ts] +declare function foo(): void; +declare namespace foo { + var _a: boolean; + export { _a as null }; +} +declare function bar(): void; +declare namespace bar { + var async: boolean; + var normal: boolean; +} +declare function baz(): void; +declare namespace baz { + var _a: boolean; + export var normal: boolean; + export { _a as class }; +} +//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitGlobalThisPreserved.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitGlobalThisPreserved.d.ts.map new file mode 100644 index 0000000000000..0a317627c2e91 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitGlobalThisPreserved.d.ts.map @@ -0,0 +1,186 @@ +//// [tests/cases/compiler/declarationEmitGlobalThisPreserved.ts] //// + +//// [declarationEmitGlobalThisPreserved.ts] +// Adding this makes tooltips fail too. +// declare global { +// namespace isNaN { +// const prop: number; +// } +// } + +// Broken inference cases. + +export const a1 = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN; +export const a2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN; +export const a3 = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar; +export const a4 = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; + +export const aObj = { + a1: (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN, + a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN, + a3: (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar, + a4: (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN, +} + +export type a4Return = ReturnType>; +export type a4oReturn = ReturnType>; + +export const b1 = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN; +export const b2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN; +export const b3 = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar; +export const b4 = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; + +export const bObj = { + b1: (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN, + b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN, + b3: (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar, + b4: (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN, +} + +export type b4Return = ReturnType>; +export type b4oReturn = ReturnType>; + +export function c1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN { return isNaN } +export function c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar ?? isNaN } +export function c3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar } +export function c4(isNaN: number): typeof globalThis.isNaN { return globalThis.isNaN; } + +export const cObj = { + c1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN { return isNaN }, + c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar ?? isNaN }, + c3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar }, + c4(isNaN: number): typeof globalThis.isNaN { return globalThis.isNaN; }, +} + +export type c4Return = ReturnType>; +export type c4oReturn = ReturnType>; + +export function d1(): () => (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN { + const fn = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN; + return function() { return fn }; +} + +export function d2(): () => (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN { + const fn = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN; + return function() { return fn }; +} + +export function d3(): () => (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN { + const fn = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar; + return function() { return fn }; +} + +export function d4(): () => (isNaN: number) => typeof globalThis.isNaN { + const fn = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; + return function() { return fn }; +} + +export type d4Return = ReturnType>>>; + +export class A { + method1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN { return isNaN } + method2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar ?? isNaN } + method3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar } + method4(isNaN: number): typeof globalThis.isNaN { return globalThis.isNaN; } +} + +export function fromParameter(isNaN: number, bar: typeof globalThis.isNaN): () => { + bar: typeof globalThis.isNaN; +} { + return function() { return { bar } }; +} + +// Non-inference cases. + +export const explicitlyTypedVariable: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN = (isNaN) => isNaN; + +export function explicitlyTypedFunction(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN { + return isNaN; +}; + +export type AsObjectProperty = { + isNaN: typeof globalThis.isNaN; +} + +export class AsClassProperty { + isNaN?: typeof globalThis.isNaN; +} + +export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; + + + +/// [Declarations] //// + + + +//// [declarationEmitGlobalThisPreserved.d.ts] +export declare const a1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const a3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const a4: (isNaN: number) => typeof globalThis.isNaN; +export declare const aObj: { + a1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; + a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; + a3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; + a4: (isNaN: number) => typeof globalThis.isNaN; +}; +export type a4Return = ReturnType>; +export type a4oReturn = ReturnType>; +export declare const b1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const b3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const b4: (isNaN: number) => typeof globalThis.isNaN; +export declare const bObj: { + b1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; + b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; + b3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; + b4: (isNaN: number) => typeof globalThis.isNaN; +}; +export type b4Return = ReturnType>; +export type b4oReturn = ReturnType>; +export declare function c1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN; +export declare function c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN; +export declare function c3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN; +export declare function c4(isNaN: number): typeof globalThis.isNaN; +export declare const cObj: { + c1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN; + c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN; + c3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN; + c4(isNaN: number): typeof globalThis.isNaN; +}; +export type c4Return = ReturnType>; +export type c4oReturn = ReturnType>; +export declare function d1(): () => (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare function d2(): () => (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare function d3(): () => (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare function d4(): () => (isNaN: number) => typeof globalThis.isNaN; +export type d4Return = ReturnType>>>; +export declare class A { + method1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN; + method2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN; + method3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN; + method4(isNaN: number): typeof globalThis.isNaN; +} +export declare function fromParameter(isNaN: number, bar: typeof globalThis.isNaN): () => { + bar: typeof globalThis.isNaN; +}; +export declare const explicitlyTypedVariable: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare function explicitlyTypedFunction(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN; +export type AsObjectProperty = { + isNaN: typeof globalThis.isNaN; +}; +export declare class AsClassProperty { + isNaN?: typeof globalThis.isNaN; +} +export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +//# sourceMappingURL=declarationEmitGlobalThisPreserved.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitGlobalThisPreserved.d.ts.map] +{"version":3,"file":"declarationEmitGlobalThisPreserved.d.ts","sourceRoot":"","sources":["declarationEmitGlobalThisPreserved.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,EAAE,6DAAqE,CAAC;AACrF,eAAO,MAAM,EAAE,4FAA2G,CAAC;AAC3H,eAAO,MAAM,EAAE,UAAW,MAAM,0DAA+D,CAAC;AAChG,eAAO,MAAM,EAAE,UAAW,MAAM,4BAA8C,CAAC;AAE/E,eAAO,MAAM,IAAI;;;gBAGD,MAAM;gBACN,MAAM;CACrB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACzD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAElE,eAAO,MAAM,EAAE,6DAAqE,CAAC;AACrF,eAAO,MAAM,EAAE,4FAA2G,CAAC;AAC3H,eAAO,MAAM,EAAE,UAAW,MAAM,0DAA+D,CAAC;AAChG,eAAO,MAAM,EAAE,UAAW,MAAM,4BAA8C,CAAC;AAE/E,eAAO,MAAM,IAAI;;;gBAGD,MAAM;gBACN,MAAM;CACrB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACzD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAElE,wBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,GAAG,OAAO,UAAU,CAAC,KAAK,CAAiB;AAC5F,wBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,GAAG,OAAO,UAAU,CAAC,KAAK,CAAwB;A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kgeyByZXR1cm4geyBiYXIgfSB9Owp9CgovLyBOb24taW5mZXJlbmNlIGNhc2VzLgoKZXhwb3J0IGNvbnN0IGV4cGxpY2l0bHlUeXBlZFZhcmlhYmxlOiAoaXNOYU46IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOKSA9PiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTiA9IChpc05hTikgPT4gaXNOYU47CgpleHBvcnQgZnVuY3Rpb24gZXhwbGljaXRseVR5cGVkRnVuY3Rpb24oaXNOYU46IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOKTogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4gewogICAgcmV0dXJuIGlzTmFOOwp9OwoKZXhwb3J0IHR5cGUgQXNPYmplY3RQcm9wZXJ0eSA9IHsKICAgIGlzTmFOOiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTjsKfQoKZXhwb3J0IGNsYXNzIEFzQ2xhc3NQcm9wZXJ0eSB7CiAgICBpc05hTj86IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwp9CgpleHBvcnQgdHlwZSBBc0Z1bmN0aW9uVHlwZSA9IChpc05hTjogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4pID0+IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwoK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitIndexTypeNotFound.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitIndexTypeNotFound.d.ts new file mode 100644 index 0000000000000..115f6a06df891 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitIndexTypeNotFound.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/declarationEmitIndexTypeNotFound.ts] //// + +//// [declarationEmitIndexTypeNotFound.ts] +export interface Test { + [index: TypeNotFound]: any; +} + + +/// [Declarations] //// + + +/// [Errors] //// + +declarationEmitIndexTypeNotFound.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +declarationEmitIndexTypeNotFound.ts(2,13): error TS2304: Cannot find name 'TypeNotFound'. +declarationEmitIndexTypeNotFound.ts(2,13): error TS4092: Parameter 'index' of index signature from exported interface has or is using private name 'TypeNotFound'. + + +==== declarationEmitIndexTypeNotFound.ts (3 errors) ==== + export interface Test { + [index: TypeNotFound]: any; + ~~~~~ +!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'TypeNotFound'. + ~~~~~~~~~~~~ +!!! error TS4092: Parameter 'index' of index signature from exported interface has or is using private name 'TypeNotFound'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInlinedDistributiveConditional.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInlinedDistributiveConditional.d.ts new file mode 100644 index 0000000000000..3666b649c8a78 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInlinedDistributiveConditional.d.ts @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/declarationEmitInlinedDistributiveConditional.ts] //// + +//// [test.ts] +import {dropPrivateProps1, dropPrivateProps2} from './api'; +const a = dropPrivateProps1({foo: 42, _bar: 'secret'}); // type is {foo: number} +//a._bar // error: _bar does not exist <===== as expected +const b = dropPrivateProps2({foo: 42, _bar: 'secret'}); // type is {foo: number, _bar: string} +//b._bar // no error, type of b._bar is string <===== NOT expected + +//// [api.ts] +import {PublicKeys1, excludePrivateKeys1, excludePrivateKeys2} from './internal'; +export const dropPrivateProps1 = (obj: Obj): { + [K in PublicKeys1]: Obj[K]; +} => excludePrivateKeys1(obj); +export const dropPrivateProps2 = (obj: Obj): { + [K in keyof Obj extends infer T ? T extends keyof Obj ? T extends `_${string}` ? never : T : never : never]: Obj[K]; +} => excludePrivateKeys2(obj); + +//// [internal.ts] +export declare function excludePrivateKeys1(obj: Obj): {[K in PublicKeys1]: Obj[K]}; +export declare function excludePrivateKeys2(obj: Obj): {[K in PublicKeys2]: Obj[K]}; +export type PublicKeys1 = T extends `_${string}` ? never : T; +type PublicKeys2 = T extends `_${string}` ? never : T; + +/// [Declarations] //// + + + +//// [test.d.ts] +export {}; +//# sourceMappingURL=test.d.ts.map +//// [/.src/api.d.ts] +import { PublicKeys1 } from './internal'; +export declare const dropPrivateProps1: (obj: Obj) => { [K in PublicKeys1]: Obj[K]; }; +export declare const dropPrivateProps2: (obj: Obj) => { [K in keyof Obj extends infer T ? T extends keyof Obj ? T extends `_${string}` ? never : T : never : never]: Obj[K]; }; +//# sourceMappingURL=api.d.ts.map +//// [/.src/internal.d.ts] +export declare function excludePrivateKeys1(obj: Obj): { + [K in PublicKeys1]: Obj[K]; +}; +export declare function excludePrivateKeys2(obj: Obj): { + [K in PublicKeys2]: Obj[K]; +}; +export type PublicKeys1 = T extends `_${string}` ? never : T; +type PublicKeys2 = T extends `_${string}` ? never : T; +export {}; +//# sourceMappingURL=internal.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts new file mode 100644 index 0000000000000..1c8564bd03327 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/declarationEmitLambdaWithMissingTypeParameterNoCrash.ts] //// + +//// [declarationEmitLambdaWithMissingTypeParameterNoCrash.ts] +export interface Foo { + preFetch: (c: T1) => void; // Type T2 is not defined + preFetcher: new (c: T1) => void; // Type T2 is not defined +} + + +/// [Declarations] //// + + +/// [Errors] //// + +declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(2,27): error TS2304: Cannot find name 'T2'. +declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(2,27): error TS4016: Type parameter 'T1' of exported function has or is using private name 'T2'. +declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(3,33): error TS2304: Cannot find name 'T2'. +declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(3,33): error TS4006: Type parameter 'T1' of constructor signature from exported interface has or is using private name 'T2'. + + +==== declarationEmitLambdaWithMissingTypeParameterNoCrash.ts (4 errors) ==== + export interface Foo { + preFetch: (c: T1) => void; // Type T2 is not defined + ~~ +!!! error TS2304: Cannot find name 'T2'. + ~~ +!!! error TS4016: Type parameter 'T1' of exported function has or is using private name 'T2'. + preFetcher: new (c: T1) => void; // Type T2 is not defined + ~~ +!!! error TS2304: Cannot find name 'T2'. + ~~ +!!! error TS4006: Type parameter 'T1' of constructor signature from exported interface has or is using private name 'T2'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts new file mode 100644 index 0000000000000..5073dca5fbc3c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/declarationEmitLateBoundAssignments.ts] //// + +//// [declarationEmitLateBoundAssignments.ts] +export function foo(): void {} +foo.bar = 12; +const _private = Symbol(); +foo[_private] = "ok"; +const strMem = "strMemName"; +foo[strMem] = "ok"; +const dashStrMem = "dashed-str-mem"; +foo[dashStrMem] = "ok"; +const numMem = 42; +foo[numMem] = "ok"; + +const x: string = foo[_private]; +const y: string = foo[strMem]; +const z: string = foo[numMem]; +const a: string = foo[dashStrMem]; + +/// [Declarations] //// + + + +//// [declarationEmitLateBoundAssignments.d.ts] +export declare function foo(): void; +export declare namespace foo { + var bar: number; + var strMemName: string; +} +//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts new file mode 100644 index 0000000000000..4f37594def992 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -0,0 +1,172 @@ +//// [tests/cases/compiler/declarationEmitLateBoundAssignments2.ts] //// + +//// [declarationEmitLateBoundAssignments2.ts] +// https://github.com/microsoft/TypeScript/issues/54811 + +const c = "C" +const num = 1 +const numStr = "10" +const withWhitespace = "foo bar" +const emoji = "🤷‍♂️" + +export function decl(): void {} +decl["B"] = 'foo' + +export function decl2(): void {} +decl2[c] = 0 + +export function decl3(): void {} +decl3[77] = 0 + +export function decl4(): void {} +decl4[num] = 0 + +export function decl5(): void {} +decl5["101"] = 0 + +export function decl6(): void {} +decl6[numStr] = 0 + +export function decl7(): void {} +decl7["qwe rty"] = 0 + +export function decl8(): void {} +decl8[withWhitespace] = 0 + +export function decl9(): void {} +decl9["🤪"] = 0 + +export function decl10(): void {} +decl10[emoji] = 0 + +export const arrow: { + (): void + B: string +} = (): void => {} +arrow["B"] = 'bar' + +export const arrow2: { + (): void + C: number +} = (): void => {} +arrow2[c] = 100 + +export const arrow3: { + (): void + 77: number +} = (): void => {} +arrow3[77] = 0 + +export const arrow4: { + (): void + 1: number +} = (): void => {} +arrow4[num] = 0 + +export const arrow5: { + (): void + "101": number +} = (): void => {} +arrow5["101"] = 0 + +export const arrow6: { + (): void + "10": number +} = (): void => {} +arrow6[numStr] = 0 + +export const arrow7: { + (): void + "qwe rty": number +} = (): void => {} +arrow7["qwe rty"] = 0 + +export const arrow8: { + (): void + "foo bar": number +} = (): void => {} +arrow8[withWhitespace] = 0 + +export const arrow9: { + (): void + "🤪": number +} = (): void => {} +arrow9["🤪"] = 0 + +export const arrow10: { + (): void + "🤷‍♂️": number +} = (): void => {} +arrow10[emoji] = 0 + + +/// [Declarations] //// + + + +//// [declarationEmitLateBoundAssignments2.d.ts] +export declare function decl(): void; +export declare namespace decl { + var B: string; +} +export declare function decl2(): void; +export declare namespace decl2 { + var C: number; +} +export declare function decl3(): void; +export declare namespace decl3 { } +export declare function decl4(): void; +export declare namespace decl4 { } +export declare function decl5(): void; +export declare namespace decl5 { } +export declare function decl6(): void; +export declare namespace decl6 { } +export declare function decl7(): void; +export declare namespace decl7 { } +export declare function decl8(): void; +export declare namespace decl8 { } +export declare function decl9(): void; +export declare namespace decl9 { } +export declare function decl10(): void; +export declare namespace decl10 { } +export declare const arrow: { + (): void; + B: string; +}; +export declare const arrow2: { + (): void; + C: number; +}; +export declare const arrow3: { + (): void; + 77: number; +}; +export declare const arrow4: { + (): void; + 1: number; +}; +export declare const arrow5: { + (): void; + "101": number; +}; +export declare const arrow6: { + (): void; + "10": number; +}; +export declare const arrow7: { + (): void; + "qwe rty": number; +}; +export declare const arrow8: { + (): void; + "foo bar": number; +}; +export declare const arrow9: { + (): void; + "🤪": number; +}; +export declare const arrow10: { + (): void; + "🤷‍♂️": number; +}; +//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedPrivateTypeTypeParameter.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedPrivateTypeTypeParameter.d.ts new file mode 100644 index 0000000000000..8c828f75fd179 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedPrivateTypeTypeParameter.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts] //// + +//// [Helpers.ts] +export type StringKeyOf = Extract; + +//// [FromFactor.ts] +export type RowToColumns = { + [TName in StringKeyOf]: any; +} + +/// [Declarations] //// + + + +//// [/Helpers.d.ts] +export type StringKeyOf = Extract; +//# sourceMappingURL=Helpers.d.ts.map +/// [Errors] //// + +/FromFactor.ts(2,15): error TS2304: Cannot find name 'StringKeyOf'. +/FromFactor.ts(2,15): error TS4103: Type parameter 'TName' of exported mapped object type is using private name 'StringKeyOf'. + + +==== /Helpers.ts (0 errors) ==== + export type StringKeyOf = Extract; + +==== /FromFactor.ts (2 errors) ==== + export type RowToColumns = { + [TName in StringKeyOf]: any; + ~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'StringKeyOf'. + ~~~~~~~~~~~ +!!! error TS4103: Type parameter 'TName' of exported mapped object type is using private name 'StringKeyOf'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts new file mode 100644 index 0000000000000..a0473d7482181 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts @@ -0,0 +1,68 @@ +//// [tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts] //// + +//// [a.d.ts] +export declare const timestampSymbol: unique symbol; + +export declare const Timestamp: { + [TKey in typeof timestampSymbol]: true; +}; + +export declare function now(): typeof Timestamp; + +//// [b.ts] +import * as x from "./a"; +export const timestamp: { + [x.timestampSymbol]: true; +} = x.now(); + +//// [c.ts] +import { now } from "./a"; + +export const timestamp: { + [timestampSymbol]: true; +} = now(); + +/// [Declarations] //// + + + +//// [b.d.ts] +import * as x from "./a"; +export declare const timestamp: { + [x.timestampSymbol]: true; +}; +//# sourceMappingURL=b.d.ts.map +//// [c.d.ts] +export declare const timestamp: {}; +//# sourceMappingURL=c.d.ts.map +/// [Errors] //// + +c.ts(4,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +c.ts(4,6): error TS2304: Cannot find name 'timestampSymbol'. + + +==== a.d.ts (0 errors) ==== + export declare const timestampSymbol: unique symbol; + + export declare const Timestamp: { + [TKey in typeof timestampSymbol]: true; + }; + + export declare function now(): typeof Timestamp; + +==== b.ts (0 errors) ==== + import * as x from "./a"; + export const timestamp: { + [x.timestampSymbol]: true; + } = x.now(); + +==== c.ts (2 errors) ==== + import { now } from "./a"; + + export const timestamp: { + [timestampSymbol]: true; + ~~~~~~~~~~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'timestampSymbol'. + } = now(); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNameConflicts3.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNameConflicts3.d.ts.map new file mode 100644 index 0000000000000..68e270dd8f79a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNameConflicts3.d.ts.map @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/declarationEmitNameConflicts3.ts] //// + +//// [declarationEmitNameConflicts3.ts] +module M { + export interface D { } + export module D { + export function f(): void { } + } + export module C { + export function f(): void { } + } + export module E { + export function f(): void { } + } +} + +module M.P { + export class C { + static f(): void { } + } + export class E extends C { } + export enum D { + f + } + export var v: M.D; // ok + export var w: typeof M.D.f = M.D.f; // error, should be typeof M.D.f + export var x: typeof M.C.f = M.C.f; // error, should be typeof M.C.f + export var x = M.E.f; // error, should be typeof M.E.f +} + +/// [Declarations] //// + + + +//// [declarationEmitNameConflicts3.d.ts] +declare namespace M { + interface D { + } + namespace D { + function f(): void; + } + namespace C { + function f(): void; + } + namespace E { + function f(): void; + } +} +declare namespace M.P { + class C { + static f(): void; + } + class E extends C { + } + enum D { + f = 0 + } + var v: M.D; + var w: typeof M.D.f; + var x: typeof M.C.f; + var x: typeof M.C.f; +} +//# sourceMappingURL=declarationEmitNameConflicts3.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitNameConflicts3.d.ts.map] +{"version":3,"file":"declarationEmitNameConflicts3.d.ts","sourceRoot":"","sources":["declarationEmitNameConflicts3.ts"],"names":[],"mappings":"AAAA,kBAAO,CAAC,CAAC;IACL,UAAiB,CAAC;KAAI;IACtB,UAAc,CAAC,CAAC;QACZ,SAAgB,CAAC,IAAI,IAAI,CAAI;KAChC;IACD,UAAc,CAAC,CAAC;QACZ,SAAgB,CAAC,IAAI,IAAI,CAAI;KAChC;IACD,UAAc,CAAC,CAAC;QACZ,SAAgB,CAAC,IAAI,IAAI,CAAI;KAChC;CACJ;AAED,kBAAO,CAAC,CAAC,CAAC,CAAC;IACP,MAAa,CAAC;QACV,MAAM,CAAC,CAAC,IAAI,IAAI;KACnB;IACD,MAAa,CAAE,SAAQ,CAAC;KAAI;IAC5B,KAAY,CAAC;QACT,CAAC,IAAA;KACJ;IACM,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACX,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAS,CAAC;IAC5B,IAAI,CAAC,cAAQ,CAAC;CACxB"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgTSB7DQogICAgaW50ZXJmYWNlIEQgew0KICAgIH0NCiAgICBuYW1lc3BhY2UgRCB7DQogICAgICAgIGZ1bmN0aW9uIGYoKTogdm9pZDsNCiAgICB9DQogICAgbmFtZXNwYWNlIEMgew0KICAgICAgICBmdW5jdGlvbiBmKCk6IHZvaWQ7DQogICAgfQ0KICAgIG5hbWVzcGFjZSBFIHsNCiAgICAgICAgZnVuY3Rpb24gZigpOiB2b2lkOw0KICAgIH0NCn0NCmRlY2xhcmUgbmFtZXNwYWNlIE0uUCB7DQogICAgY2xhc3MgQyB7DQogICAgICAgIHN0YXRpYyBmKCk6IHZvaWQ7DQogICAgfQ0KICAgIGNsYXNzI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UMsQ0FBQyxDQUFDLENBQVMsQ0FBQztJQUM1QixJQUFJLENBQUMsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBUyxDQUFDO0lBQzVCLElBQUksQ0FBQyxjQUFRLENBQUM7Q0FDeEIifQ==,bW9kdWxlIE0gewogICAgZXhwb3J0IGludGVyZmFjZSBEIHsgfQogICAgZXhwb3J0IG1vZHVsZSBEIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBDIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBFIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQp9Cgptb2R1bGUgTS5QIHsKICAgIGV4cG9ydCBjbGFzcyBDIHsKICAgICAgICBzdGF0aWMgZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IGNsYXNzIEUgZXh0ZW5kcyBDIHsgfQogICAgZXhwb3J0IGVudW0gRCB7CiAgICAgICAgZgogICAgfQogICAgZXhwb3J0IHZhciB2OiBNLkQ7IC8vIG9rCiAgICBleHBvcnQgdmFyIHc6IHR5cGVvZiBNLkQuZiA9IE0uRC5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkQuZgogICAgZXhwb3J0IHZhciB4OiB0eXBlb2YgTS5DLmYgPSBNLkMuZjsgLy8gZXJyb3IsIHNob3VsZCBiZSB0eXBlb2YgTS5DLmYKICAgIGV4cG9ydCB2YXIgeCA9IE0uRS5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkUuZgp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNoNonRequiredParens.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNoNonRequiredParens.d.ts new file mode 100644 index 0000000000000..b18eadaab8d32 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNoNonRequiredParens.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/declarationEmitNoNonRequiredParens.ts] //// + +//// [declarationEmitNoNonRequiredParens.ts] +export enum Test { + A, B, C +} + +export type TestType = typeof Test; + +export const bar = (null as TestType[Extract][]); + +/// [Declarations] //// + + + +//// [declarationEmitNoNonRequiredParens.d.ts] +export declare enum Test { + A = 0, + B = 1, + C = 2 +} +export type TestType = typeof Test; +export declare const bar: Test[]; +//# sourceMappingURL=declarationEmitNoNonRequiredParens.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts new file mode 100644 index 0000000000000..c65de812b97fb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts @@ -0,0 +1,94 @@ +//// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// + +//// [index.d.ts] +interface Statics { + "$$whatever": string; +} +declare namespace hoistNonReactStatics { + type NonReactStatics = {[X in Exclude]: T[X]} +} +export = hoistNonReactStatics; +//// [index.d.ts] +import * as hoistNonReactStatics from "hoist-non-react-statics"; +export interface DefaultTheme {} +export type StyledComponent = + string + & StyledComponentBase + & hoistNonReactStatics.NonReactStatics; +export interface StyledComponentBase { + tag: TTag; + theme: TTheme; + style: TStyle; + whatever: TWhatever; +} +export interface StyledInterface { + div: (a: TemplateStringsArray) => StyledComponent<"div">; +} + +declare const styled: StyledInterface; +export default styled; +//// [index.ts] +import styled, { DefaultTheme, StyledComponent } from "styled-components"; + +const A = styled.div``; +const B = styled.div``; +export const C: StyledComponent<"div", DefaultTheme, {}, never> = styled.div``; + +export default Object.assign(A, { + B, + C +}); + + +/// [Declarations] //// + + +/// [Errors] //// + +index.ts(7,1): error TS2742: The inferred type of 'default' cannot be named without a reference to 'styled-components/node_modules/hoist-non-react-statics'. This is likely not portable. A type annotation is necessary. + + +==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== + interface Statics { + "$$whatever": string; + } + declare namespace hoistNonReactStatics { + type NonReactStatics = {[X in Exclude]: T[X]} + } + export = hoistNonReactStatics; +==== node_modules/styled-components/index.d.ts (0 errors) ==== + import * as hoistNonReactStatics from "hoist-non-react-statics"; + export interface DefaultTheme {} + export type StyledComponent = + string + & StyledComponentBase + & hoistNonReactStatics.NonReactStatics; + export interface StyledComponentBase { + tag: TTag; + theme: TTheme; + style: TStyle; + whatever: TWhatever; + } + export interface StyledInterface { + div: (a: TemplateStringsArray) => StyledComponent<"div">; + } + + declare const styled: StyledInterface; + export default styled; +==== index.ts (1 errors) ==== + import styled, { DefaultTheme, StyledComponent } from "styled-components"; + + const A = styled.div``; + const B = styled.div``; + export const C: StyledComponent<"div", DefaultTheme, {}, never> = styled.div``; + + export default Object.assign(A, { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + B, + ~~~~~~ + C + ~~~~~ + }); + ~~~ +!!! error TS2742: The inferred type of 'default' cannot be named without a reference to 'styled-components/node_modules/hoist-non-react-statics'. This is likely not portable. A type annotation is necessary. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts new file mode 100644 index 0000000000000..4a7682679ed41 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + +//// [declarationEmitObjectLiteralAccessors1.ts] +// same type accessors +export const obj1 = { + /** my awesome getter (first in source order) */ + get x(): string { + return ""; + }, + /** my awesome setter (second in source order) */ + set x(a: string) {}, +}; + +// divergent accessors +export const obj2 = { + /** my awesome getter */ + get x(): string { + return ""; + }, + /** my awesome setter */ + set x(a: number) {}, +}; + +export const obj3 = { + /** my awesome getter */ + get x(): string { + return ""; + }, +}; + +export const obj4 = { + /** my awesome setter */ + set x(a: number) {}, +}; + + +/// [Declarations] //// + + + +//// [declarationEmitObjectLiteralAccessors1.d.ts] +export declare const obj1: { + /** my awesome getter (first in source order) */ + x: string; +}; +export declare const obj2: { + /** my awesome getter */ + get x(): string; + /** my awesome setter */ + set x(a: number); +}; +export declare const obj3: { + /** my awesome getter */ + readonly x: string; +}; +export declare const obj4: { + /** my awesome setter */ + x: number; +}; +//# sourceMappingURL=declarationEmitObjectLiteralAccessors1.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitOptionalMethod.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitOptionalMethod.d.ts.map new file mode 100644 index 0000000000000..d94d01ce38ab7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitOptionalMethod.d.ts.map @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationEmitOptionalMethod.ts] //// + +//// [declarationEmitOptionalMethod.ts] +export const Foo = (opts: { + a?(): void, + b?: () => void, +}): { + c?(): void, + d?: () => void, +} => ({ }); + +/// [Declarations] //// + + + +//// [declarationEmitOptionalMethod.d.ts] +export declare const Foo: (opts: { + a?(): void; + b?: () => void; +}) => { + c?(): void; + d?: () => void; +}; +//# sourceMappingURL=declarationEmitOptionalMethod.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitOptionalMethod.d.ts.map] +{"version":3,"file":"declarationEmitOptionalMethod.d.ts","sourceRoot":"","sources":["declarationEmitOptionalMethod.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,SAAU;IACtB,CAAC,CAAC,IAAI,IAAI,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,KAAG;IACA,CAAC,CAAC,IAAI,IAAI,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC;CACR,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgRm9vOiAob3B0czogew0KICAgIGE/KCk6IHZvaWQ7DQogICAgYj86ICgpID0+IHZvaWQ7DQp9KSA9PiB7DQogICAgYz8oKTogdm9pZDsNCiAgICBkPzogKCkgPT4gdm9pZDsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRPcHRpb25hbE1ldGhvZC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0T3B0aW9uYWxNZXRob2QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdE9wdGlvbmFsTWV0aG9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSxHQUFHLFNBQVU7SUFDdEIsQ0FBQyxDQUFDLElBQUksSUFBSSxDQUFDO0lBQ1gsQ0FBQyxDQUFDLEVBQUUsTUFBTSxJQUFJLENBQUM7Q0FDbEIsS0FBRztJQUNBLENBQUMsQ0FBQyxJQUFJLElBQUksQ0FBQztJQUNYLENBQUMsQ0FBQyxFQUFFLE1BQU0sSUFBSSxDQUFDO0NBQ1IsQ0FBQyJ9,ZXhwb3J0IGNvbnN0IEZvbyA9IChvcHRzOiB7CiAgICBhPygpOiB2b2lkLAogICAgYj86ICgpID0+IHZvaWQsCn0pOiB7CiAgICBjPygpOiB2b2lkLAogICAgZD86ICgpID0+IHZvaWQsCn0gPT4gKHsgIH0pOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts.map new file mode 100644 index 0000000000000..f963caa4e5561 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts.map @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + +//// [declarationEmitParameterProperty.ts] +export class Foo { + constructor(public bar?: string) { + } +} + + +/// [Declarations] //// + + + +//// [declarationEmitParameterProperty.d.ts] +export declare class Foo { + bar?: string | undefined; + constructor(bar?: string | undefined); +} +//# sourceMappingURL=declarationEmitParameterProperty.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitParameterProperty.d.ts.map] +{"version":3,"file":"declarationEmitParameterProperty.d.ts","sourceRoot":"","sources":["declarationEmitParameterProperty.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACK,GAAG,CAAC;gBAAJ,GAAG,CAAC,oBAAQ;CAEhC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBiYXI/OiBzdHJpbmcgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoYmFyPzogc3RyaW5nIHwgdW5kZWZpbmVkKTsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UGFyYW1ldGVyUHJvcGVydHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHFCQUFhLEdBQUc7SUFDSyxHQUFHLENBQUM7Z0JBQUosR0FBRyxDQUFDLG9CQUFRO0NBRWhDIn0=,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgY29uc3RydWN0b3IocHVibGljIGJhcj86IHN0cmluZykgewogIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map new file mode 100644 index 0000000000000..97733ceea752f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts] //// + +//// [scalar.ts] +export interface Scalar { + (): string; + value: number; +} + +export function scalar(value: string): Scalar { + return null as any; +} +//// [spacing.ts] +import { Scalar, scalar } from '../lib/operators/scalar'; + +export default { + get xs(): Scalar { + return scalar("14px"); + } +}; + + +/// [Declarations] //// + + + +//// [/.src/dist/lib/operators/scalar.d.ts] +export interface Scalar { + (): string; + value: number; +} +export declare function scalar(value: string): Scalar; +//# sourceMappingURL=scalar.d.ts.map +//// [/.src/dist/settings/spacing.d.ts] +import { Scalar } from '../lib/operators/scalar'; +declare const _default: { + readonly xs: Scalar; +}; +export default _default; +//# sourceMappingURL=spacing.d.ts.map + +/// [Declarations Maps] //// + + +//// [/.src/dist/lib/operators/scalar.d.ts.map] +{"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["../../../src/lib/operators/scalar.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,IAAI,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5C"} + + +//// [/.src/dist/settings/spacing.d.ts.map] +{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/settings/spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;;;AAEzD,wBAIE"} + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map new file mode 100644 index 0000000000000..652cc3ff74b61 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map @@ -0,0 +1,54 @@ +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts] //// + +//// [scalar.ts] +export interface Scalar { + (): string; + value: number; +} + +export function scalar(value: string): Scalar { + return null as any; +} +//// [spacing.ts] +import { Scalar, scalar } from '../lib/operators/scalar'; + +export default { + get xs(): Scalar { + return scalar("14px"); + } +}; + + +/// [Declarations] //// + + + +//// [src/lib/operators/scalar.d.ts] +export interface Scalar { + (): string; + value: number; +} +export declare function scalar(value: string): Scalar; +//# sourceMappingURL=scalar.d.ts.map +//// [src/settings/spacing.d.ts] +import { Scalar } from '../lib/operators/scalar'; +declare const _default: { + readonly xs: Scalar; +}; +export default _default; +//# sourceMappingURL=spacing.d.ts.map + +/// [Declarations Maps] //// + + +//// [src/lib/operators/scalar.d.ts.map] +{"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["scalar.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,IAAI,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5C"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBTY2FsYXIgew0KICAgICgpOiBzdHJpbmc7DQogICAgdmFsdWU6IG51bWJlcjsNCn0NCmV4cG9ydCBkZWNsYXJlIGZ1bmN0aW9uIHNjYWxhcih2YWx1ZTogc3RyaW5nKTogU2NhbGFyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c2NhbGFyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NhbGFyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY2FsYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxXQUFXLE1BQU07SUFDdEIsSUFBSSxNQUFNLENBQUM7SUFDWCxLQUFLLEVBQUUsTUFBTSxDQUFDO0NBQ2Q7QUFFRCx3QkFBZ0IsTUFBTSxDQUFDLEtBQUssRUFBRSxNQUFNLEdBQUcsTUFBTSxDQUU1QyJ9,ZXhwb3J0IGludGVyZmFjZSBTY2FsYXIgewoJKCk6IHN0cmluZzsKCXZhbHVlOiBudW1iZXI7Cn0KCmV4cG9ydCBmdW5jdGlvbiBzY2FsYXIodmFsdWU6IHN0cmluZyk6IFNjYWxhciB7CglyZXR1cm4gbnVsbCBhcyBhbnk7Cn0= + + +//// [src/settings/spacing.d.ts.map] +{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;;;AAEzD,wBAIE"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIHJlYWRvbmx5IHhzOiBTY2FsYXI7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zcGFjaW5nLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2luZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhY2luZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFVLE1BQU0seUJBQXlCLENBQUM7Ozs7QUFFekQsd0JBSUUifQ==,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPropertyNumericStringKey.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPropertyNumericStringKey.d.ts new file mode 100644 index 0000000000000..d529dac2678f2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPropertyNumericStringKey.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts] //// + +//// [declarationEmitPropertyNumericStringKey.ts] +// https://github.com/microsoft/TypeScript/issues/55292 + +const STATUS = { + ["404"]: "not found", +} as const; + +const hundredStr = "100"; +const obj = { [hundredStr]: "foo" }; + +const hundredNum = 100; +const obj2 = { [hundredNum]: "bar" }; + + +/// [Declarations] //// + + + +//// [declarationEmitPropertyNumericStringKey.d.ts] +declare const STATUS: { + readonly "404": "not found"; +}; +declare const hundredStr = "100"; +declare const obj: { + "100": string; +}; +declare const hundredNum = 100; +declare const obj2: { + 100: string; +}; +//# sourceMappingURL=declarationEmitPropertyNumericStringKey.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReadonlyComputedProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReadonlyComputedProperty.d.ts new file mode 100644 index 0000000000000..f121494f24d7f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReadonlyComputedProperty.d.ts @@ -0,0 +1,70 @@ +//// [tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts] //// + +//// [bug.ts] +export const SYMBOL: unique symbol = Symbol() + +export interface Interface { + readonly [SYMBOL]: string; // remove readonly and @showEmit to see the expected error +} + +export function createInstance(): Interface { + return { + [SYMBOL]: '' + } +} + +//// [index.ts] +import { createInstance } from './bug' + +export const spread: { + [SYMBOL]: string +} = { + ...createInstance(), +} + +/// [Declarations] //// + + + +//// [bug.d.ts] +export declare const SYMBOL: unique symbol; +export interface Interface { + readonly [SYMBOL]: string; +} +export declare function createInstance(): Interface; +//# sourceMappingURL=bug.d.ts.map +//// [index.d.ts] +export declare const spread: {}; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +index.ts(4,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +index.ts(4,6): error TS2552: Cannot find name 'SYMBOL'. Did you mean 'Symbol'? + + +==== bug.ts (0 errors) ==== + export const SYMBOL: unique symbol = Symbol() + + export interface Interface { + readonly [SYMBOL]: string; // remove readonly and @showEmit to see the expected error + } + + export function createInstance(): Interface { + return { + [SYMBOL]: '' + } + } + +==== index.ts (2 errors) ==== + import { createInstance } from './bug' + + export const spread: { + [SYMBOL]: string + ~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~ +!!! error TS2552: Cannot find name 'SYMBOL'. Did you mean 'Symbol'? +!!! related TS2728 lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here. + } = { + ...createInstance(), + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map new file mode 100644 index 0000000000000..05267053cd4b7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map @@ -0,0 +1,122 @@ +//// [tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts] //// + +//// [input.d.ts] +type _BuildPowersOf2LengthArrays< + Length extends number, + AccumulatedArray extends never[][], +> = AccumulatedArray[0][Length] extends never + ? AccumulatedArray + : _BuildPowersOf2LengthArrays< + Length, + [[...AccumulatedArray[0], ...AccumulatedArray[0]], ...AccumulatedArray] + >; + +type _ConcatLargestUntilDone< + Length extends number, + AccumulatedArray extends never[][], + NextArray extends never[], +> = NextArray['length'] extends Length + ? NextArray + : [...AccumulatedArray[0], ...NextArray][Length] extends never + ? _ConcatLargestUntilDone< + Length, + AccumulatedArray extends [AccumulatedArray[0], ...infer U] + ? U extends never[][] + ? U + : never + : never, + NextArray + > + : _ConcatLargestUntilDone< + Length, + AccumulatedArray extends [AccumulatedArray[0], ...infer U] + ? U extends never[][] + ? U + : never + : never, + [...AccumulatedArray[0], ...NextArray] + > + +type _Replace = { [K in keyof R]: T }; + +export type TupleOf = number extends Length + ? Type[] + : { + // in case Length is a union + [LengthKey in Length]: _BuildPowersOf2LengthArrays< + LengthKey, + [[never]] + > extends infer TwoDimensionalArray + ? TwoDimensionalArray extends never[][] + ? _Replace<_ConcatLargestUntilDone, Type> + : never + : never + }[Length]; + +export type Subtract = TupleOf extends [ + ...TupleOf, + ...infer R, +] + ? R['length'] + : never; + +export type Decrement = Subtract; + +export type Add = [ + ...TupleOf, + ...TupleOf, +]['length'] & + // intersection to suppress compiler narrowing bug + number; + +type _MultiAdd< + Num extends number, + Accumulator extends number, + IterationsLeft extends number, +> = IterationsLeft extends 0 + ? Accumulator + : _MultiAdd, Decrement> + +export type Multiply = number extends N1 | N2 + ? number + : { + [K2 in N2]: { [K1 in N1]: _MultiAdd }[N1] + }[N2] + +type PowerTailRec< + Num extends number, + PowerOf extends number, + Result extends number, +> = number extends PowerOf + ? number + : PowerOf extends 0 + ? Result + : PowerTailRec, Multiply>; + +export type Power = PowerTailRec; + +//// [a.tsx] +import { Power } from "./input"; + +export const power = ( + num: Num, + powerOf: PowerOf +): Power => (num ** powerOf) as never; + +/// [Declarations] //// + + + +//// [a.d.ts] +import { Power } from "./input"; +export declare const power: (num: Num, powerOf: PowerOf) => Power; +//# sourceMappingURL=a.d.ts.map + +/// [Declarations Maps] //// + + +//// [a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,KAAK,oDACT,GAAG,WACC,OAAO,KACjB,MAAM,GAAG,EAAE,OAAO,CAA8B,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgUG93ZXIgfSBmcm9tICIuL2lucHV0IjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IHBvd2VyOiA8TnVtIGV4dGVuZHMgbnVtYmVyLCBQb3dlck9mIGV4dGVuZHMgbnVtYmVyPihudW06IE51bSwgcG93ZXJPZjogUG93ZXJPZikgPT4gUG93ZXI8TnVtLCBQb3dlck9mPjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUVoQyxlQUFPLE1BQU0sS0FBSyxvREFDVCxHQUFHLFdBQ0MsT0FBTyxLQUNqQixNQUFNLEdBQUcsRUFBRSxPQUFPLENBQThCLENBQUMifQ==,aW1wb3J0IHsgUG93ZXIgfSBmcm9tICIuL2lucHV0IjsKCmV4cG9ydCBjb25zdCBwb3dlciA9IDxOdW0gZXh0ZW5kcyBudW1iZXIsIFBvd2VyT2YgZXh0ZW5kcyBudW1iZXI+KAogICAgbnVtOiBOdW0sCiAgICBwb3dlck9mOiBQb3dlck9mCik6IFBvd2VyPE51bSwgUG93ZXJPZj4gPT4gKG51bSAqKiBwb3dlck9mKSBhcyBuZXZlcjs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts new file mode 100644 index 0000000000000..b0b6c6a3bd742 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// + +//// [index.ts] +export * from './keys'; +//// [keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export declare type A = { + id: string; +}; +export declare type B = { + id: number; +}; +export declare type IdType = A | B; +export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; +} +//// [package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export * from '@raymondfeng/pkg1'; +//// [package.json] +{ + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} + +/// [Declarations] //// + + + +//// [/.src/monorepo/pkg3/dist/index.d.ts] +export * from './keys'; +//# sourceMappingURL=index.d.ts.map +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +import { MetadataAccessor } from "@raymondfeng/pkg2"; +export declare const ADMIN: MetadataAccessor; +//# sourceMappingURL=keys.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts new file mode 100644 index 0000000000000..bb8f326852af8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// + +//// [index.ts] +export * from './keys'; +//// [keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export declare type A = { + id: string; +}; +export declare type B = { + id: number; +}; +export declare type IdType = A | B; +export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; +} +//// [package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [index.d.ts] +import "./secondary"; +export * from './types'; +//// [types.d.ts] +export {MetadataAccessor} from '@raymondfeng/pkg1'; +//// [secondary.d.ts] +export {IdType} from '@raymondfeng/pkg1'; +//// [package.json] +{ + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} + +/// [Declarations] //// + + + +//// [/.src/monorepo/pkg3/dist/index.d.ts] +export * from './keys'; +//# sourceMappingURL=index.d.ts.map +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +import { MetadataAccessor } from "@raymondfeng/pkg2"; +export declare const ADMIN: MetadataAccessor; +//# sourceMappingURL=keys.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts new file mode 100644 index 0000000000000..1d41e1a869618 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts @@ -0,0 +1,101 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// + +//// [index.ts] +export * from './keys'; +//// [keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export declare type A = { + id: string; +}; +export declare type B = { + id: number; +}; +export declare type IdType = A | B; +export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; +} +//// [package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export {MetadataAccessor} from '@raymondfeng/pkg1'; +//// [package.json] +{ + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} + +/// [Declarations] //// + + + +//// [/.src/monorepo/pkg3/dist/index.d.ts] +export * from './keys'; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,14): error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary. + + +==== monorepo/pkg3/src/index.ts (0 errors) ==== + export * from './keys'; +==== monorepo/pkg3/src/keys.ts (1 errors) ==== + import {MetadataAccessor} from "@raymondfeng/pkg2"; + + export const ADMIN = MetadataAccessor.create('1'); + ~~~~~ +!!! error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary. +==== monorepo/pkg1/dist/index.d.ts (0 errors) ==== + export * from './types'; +==== monorepo/pkg1/dist/types.d.ts (0 errors) ==== + export declare type A = { + id: string; + }; + export declare type B = { + id: number; + }; + export declare type IdType = A | B; + export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; + } +==== monorepo/pkg1/package.json (0 errors) ==== + { + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } +==== monorepo/pkg2/dist/index.d.ts (0 errors) ==== + export * from './types'; +==== monorepo/pkg2/dist/types.d.ts (0 errors) ==== + export {MetadataAccessor} from '@raymondfeng/pkg1'; +==== monorepo/pkg2/package.json (0 errors) ==== + { + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRetainsJsdocyComments.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRetainsJsdocyComments.d.ts.map new file mode 100644 index 0000000000000..a881bd3f5fef0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRetainsJsdocyComments.d.ts.map @@ -0,0 +1,110 @@ +//// [tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts] //// + +//// [declarationEmitRetainsJsdocyComments.ts] +/** + * comment1 + * @param p + */ +export const foo = (p: string): { + /** + * comment2 + * @param s + */ + bar: (s: number) => void; + /** + * comment3 + * @param s + */ + bar2(s: number): void; +} => { + return { + /** + * comment2 + * @param s + */ + bar: (s: number) => {}, + /** + * comment3 + * @param s + */ + bar2(s: number) {}, + } +} + +export class Foo { + /** + * comment4 + * @param s + */ + bar(s: number): void { + } +} + +const dest = null as any; +export const + /** + * comment5 + */ + someMethod: any = dest.someMethod; + +declare global { + interface ExtFunc { + /** + * comment6 + */ + someMethod(collection: any[]): boolean; + } +} + + +/// [Declarations] //// + + + +//// [declarationEmitRetainsJsdocyComments.d.ts] +/** + * comment1 + * @param p + */ +export declare const foo: (p: string) => { + /** + * comment2 + * @param s + */ + bar: (s: number) => void; + /** + * comment3 + * @param s + */ + bar2(s: number): void; +}; +export declare class Foo { + /** + * comment4 + * @param s + */ + bar(s: number): void; +} +export declare const +/** +* comment5 +*/ +someMethod: any; +declare global { + interface ExtFunc { + /** + * comment6 + */ + someMethod(collection: any[]): boolean; + } +} +//# sourceMappingURL=declarationEmitRetainsJsdocyComments.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitRetainsJsdocyComments.d.ts.map] +{"version":3,"file":"declarationEmitRetainsJsdocyComments.d.ts","sourceRoot":"","sources":["declarationEmitRetainsJsdocyComments.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,GAAG,MAAO,MAAM;IACzB;;;OAGG;aACM,MAAM,KAAK,IAAI;IACxB;;;OAGG;YACK,MAAM,GAAG,IAAI;CAcxB,CAAA;AAED,qBAAa,GAAG;IACZ;;;OAGG;IACH,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;CAEvB;AAGD,eAAO;AACH;;EAEE;AACF,UAAU,EAAE,GAAqB,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO;QACb;;UAEE;QACF,UAAU,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;KAC1C;CACJ"} + +//// https://sokra.github.io/source-map-visualization#base64,LyoqDQogKiBjb21tZW50MQ0KICogQHBhcmFtIHANCiAqLw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiAocDogc3RyaW5nKSA9PiB7DQogICAgLyoqDQogICAgICogY29tbWVudDINCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcjogKHM6IG51bWJlcikgPT4gdm9pZDsNCiAgICAvKioNCiAgICAgKiBjb21tZW50Mw0KICAgICAqIEBwYXJhbSBzDQogICAgICovDQogICAgYmFyMihzOiBudW1iZXIpOiB2b2lkOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIEZvbyB7DQogICAgLyoqDQogICAgICogY29tbWVudDQNCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcihzOiBudW1iZXIpOiB2b2lkOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3QgDQovKioNCiogY29tbWV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GZvbyA9IChwOiBzdHJpbmcpOiB7CiAgICAvKioKICAgICAqIGNvbW1lbnQyCiAgICAgKiBAcGFyYW0gcwogICAgICovCiAgICBiYXI6IChzOiBudW1iZXIpID0+IHZvaWQ7CiAgICAvKioKICAgICAqIGNvbW1lbnQzCiAgICAgKiBAcGFyYW0gcwogICAgICovCiAgICBiYXIyKHM6IG51bWJlcik6IHZvaWQ7Cn0gPT4gewogICAgcmV0dXJuIHsKICAgICAgICAvKioKICAgICAgICAgKiBjb21tZW50MgogICAgICAgICAqIEBwYXJhbSBzIAogICAgICAgICAqLwogICAgICAgIGJhcjogKHM6IG51bWJlcikgPT4ge30sCiAgICAgICAgLyoqCiAgICAgICAgICogY29tbWVudDMKICAgICAgICAgKiBAcGFyYW0gcyAKICAgICAgICAgKi8KICAgICAgICBiYXIyKHM6IG51bWJlcikge30sCiAgICB9Cn0KCmV4cG9ydCBjbGFzcyBGb28gewogICAgLyoqCiAgICAgKiBjb21tZW50NAogICAgICogQHBhcmFtIHMgIAogICAgICovCiAgICBiYXIoczogbnVtYmVyKTogdm9pZCB7CiAgICB9Cn0KCmNvbnN0IGRlc3QgPSBudWxsIGFzIGFueTsKZXhwb3J0IGNvbnN0CiAgICAvKioKICAgICogY29tbWVudDUKICAgICovCiAgICBzb21lTWV0aG9kOiBhbnkgPSBkZXN0LnNvbWVNZXRob2Q7CgpkZWNsYXJlIGdsb2JhbCB7CiAgICBpbnRlcmZhY2UgRXh0RnVuYyB7CiAgICAgICAgLyoqCiAgICAgICAgKiBjb21tZW50NgogICAgICAgICovCiAgICAgICAgc29tZU1ldGhvZChjb2xsZWN0aW9uOiBhbnlbXSk6IGJvb2xlYW47CiAgICB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReusesLambdaParameterNodes.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReusesLambdaParameterNodes.d.ts.map new file mode 100644 index 0000000000000..2dbd287cdd4b1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReusesLambdaParameterNodes.d.ts.map @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts] //// + +//// [index.d.ts] +export type Whatever = {x: string, y: number}; +export type Props = Omit & Partial & T; + +//// [index.ts] +import { Props } from "react-select"; + +export const CustomSelect1 = (x: Props(x: A) => A; +declare function a2(x: A): A; +declare var a3: (x: A) => globalThis.A; +declare function a4(x: A): globalThis.A; +interface B { +} +declare var b: (x: B) => B; +declare function b2(x: B): B; +//# sourceMappingURL=declarationEmitTypeParameterNameInOuterScope.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitTypeParameterNameInOuterScope.d.ts.map] +{"version":3,"file":"declarationEmitTypeParameterNameInOuterScope.d.ts","sourceRoot":"","sources":["declarationEmitTypeParameterNameInOuterScope.ts"],"names":[],"mappings":"AAAA,cAAM,CAAC;CAAI;AAEX,QAAA,IAAI,CAAC,SAAW,CAAC,KAAG,CAAM,CAAC;AAC3B,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAa;AAErC,QAAA,IAAI,EAAE,SAAW,CAAC,KAAG,YAAuB,CAAC;AAC7C,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAmB;AAGtD,UAAU,CAAC;CAAI;AAEf,QAAA,IAAI,CAAC,SAAW,CAAC,KAAG,CAAM,CAAC;AAC3B,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAa"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBBIHsNCn0NCmRlY2xhcmUgdmFyIGE6IDxBPih4OiBBKSA9PiBBOw0KZGVjbGFyZSBmdW5jdGlvbiBhMjxBPih4OiBBKTogQTsNCmRlY2xhcmUgdmFyIGEzOiA8QT4oeDogQSkgPT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B7IH0KCnZhciBhID0gPEEsPih4OiBBKTogQSA9PiB4OwpmdW5jdGlvbiBhMjxBLD4oeDogQSk6IEEgeyByZXR1cm4geCB9Cgp2YXIgYTMgPSA8QSw+KHg6IEEpOiBnbG9iYWxUaGlzLkEgPT4gbmV3IEEoKTsKZnVuY3Rpb24gYTQ8QSw+KHg6IEEpOiBnbG9iYWxUaGlzLkEgeyByZXR1cm4gbmV3IEEoKSB9CgoKaW50ZXJmYWNlIEIgeyB9Cgp2YXIgYiA9IDxCLD4oeDogQik6IEIgPT4geDsKZnVuY3Rpb24gYjI8Qiw+KHg6IEIpOiBCIHsgcmV0dXJuIHggfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeParameterNameShadowedInternally.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeParameterNameShadowedInternally.d.ts.map new file mode 100644 index 0000000000000..a2ab64414ad0a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeParameterNameShadowedInternally.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts] //// + +//// [declarationEmitTypeParameterNameShadowedInternally.ts] +export const foo = (x: T): (y: T_1) => readonly [T, T_1] => { + const inner = (y: T) => [x, y] as const; + return inner; +} + + +/// [Declarations] //// + + + +//// [declarationEmitTypeParameterNameShadowedInternally.d.ts] +export declare const foo: (x: T) => (y: T_1) => readonly [T, T_1]; +//# sourceMappingURL=declarationEmitTypeParameterNameShadowedInternally.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitTypeParameterNameShadowedInternally.d.ts.map] +{"version":3,"file":"declarationEmitTypeParameterNameShadowedInternally.d.ts","sourceRoot":"","sources":["declarationEmitTypeParameterNameShadowedInternally.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,SAAW,CAAC,uCAG3B,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiA8VD4oeDogVCkgPT4gPFRfMT4oeTogVF8xKSA9PiByZWFkb25seSBbVCwgVF8xXTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFR5cGVQYXJhbWV0ZXJOYW1lU2hhZG93ZWRJbnRlcm5hbGx5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VHlwZVBhcmFtZXRlck5hbWVTaGFkb3dlZEludGVybmFsbHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFR5cGVQYXJhbWV0ZXJOYW1lU2hhZG93ZWRJbnRlcm5hbGx5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSxHQUFHLFNBQVcsQ0FBQyx1Q0FHM0IsQ0FBQSJ9,ZXhwb3J0IGNvbnN0IGZvbyA9IDxULD4oeDogVCk6IDxUXzE+KHk6IFRfMSkgPT4gcmVhZG9ubHkgW1QsIFRfMV0gPT4gewoJY29uc3QgaW5uZXIgPSA8VCw+KHk6IFQpID0+IFt4LCB5XSBhcyBjb25zdDsKCXJldHVybiBpbm5lcjsKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUnknownImport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUnknownImport.d.ts new file mode 100644 index 0000000000000..6237465f6d695 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUnknownImport.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/declarationEmitUnknownImport.ts] //// + +//// [declarationEmitUnknownImport.ts] +import Foo = SomeNonExistingName +export {Foo} + +/// [Declarations] //// + + +/// [Errors] //// + +declarationEmitUnknownImport.ts(1,1): error TS2303: Circular definition of import alias 'Foo'. +declarationEmitUnknownImport.ts(1,14): error TS2304: Cannot find name 'SomeNonExistingName'. +declarationEmitUnknownImport.ts(1,14): error TS2503: Cannot find namespace 'SomeNonExistingName'. +declarationEmitUnknownImport.ts(1,14): error TS4000: Import declaration 'Foo' is using private name 'SomeNonExistingName'. + + +==== declarationEmitUnknownImport.ts (4 errors) ==== + import Foo = SomeNonExistingName + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2303: Circular definition of import alias 'Foo'. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeNonExistingName'. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2503: Cannot find namespace 'SomeNonExistingName'. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS4000: Import declaration 'Foo' is using private name 'SomeNonExistingName'. + export {Foo} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingAlternativeContainingModules1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingAlternativeContainingModules1.d.ts.map new file mode 100644 index 0000000000000..12264a6a77614 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingAlternativeContainingModules1.d.ts.map @@ -0,0 +1,263 @@ +//// [tests/cases/compiler/declarationEmitUsingAlternativeContainingModules1.ts] //// + +//// [useQuery-CPqkvEsh.d.ts] +type QueryKey = ReadonlyArray; + +interface Register {} + +type DefaultError = Register extends { + defaultError: infer TError; +} + ? TError + : Error; + +type ShouldRetryFunction = ( + failureCount: number, + error: TError, +) => boolean; +type RetryValue = boolean | number | ShouldRetryFunction; + +type QueryFunctionContext< + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> = [TPageParam] extends [never] + ? { + queryKey: TQueryKey; + } + : { + queryKey: TQueryKey; + pageParam: TPageParam; + }; + +type QueryFunction< + T = unknown, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> = (context: QueryFunctionContext) => T | Promise; + +interface QueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> { + retry?: RetryValue; + queryFn?: QueryFunction; + queryKey?: TQueryKey; + initialData?: TData; + initialDataUpdatedAt?: number | (() => number | undefined); +} + +interface QueryObserverOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> extends QueryOptions< + TQueryFnData, + TError, + TQueryData, + TQueryKey, + TPageParam + > { + enabled?: boolean; + refetchInterval?: number; + select?: (data: TQueryData) => TData; +} + +type UseQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = { + [Property in keyof QueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >]: QueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >[Property]; +}; + +type UndefinedInitialQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = UseQueryOptions & { + initialData?: undefined; +}; + +interface QueryObserverBaseResult { + data: TData | undefined; + dataUpdatedAt: number; + error: TError | null; + errorUpdatedAt: number; + failureCount: number; + failureReason: TError | null; + errorUpdateCount: number; + isError: boolean; + isFetched: boolean; + isFetchedAfterMount: boolean; + isFetching: boolean; + isLoading: boolean; + isPending: boolean; + isLoadingError: boolean; + isInitialLoading: boolean; + isPaused: boolean; + isPlaceholderData: boolean; + isRefetchError: boolean; + isRefetching: boolean; + isStale: boolean; + isSuccess: boolean; +} + +interface QueryObserverSuccessResult + extends QueryObserverBaseResult { + data: TData; + error: null; + isError: false; + isPending: false; + isLoadingError: false; + isRefetchError: false; + isSuccess: true; + status: "success"; +} + +type DefinedQueryObserverResult< + TData = unknown, + TError = DefaultError, +> = QueryObserverSuccessResult; +type QueryObserverResult< + TData = unknown, + TError = DefaultError, +> = DefinedQueryObserverResult; + +type ToRef = { + value: T; +}; + +type UseBaseQueryReturnType< + TData, + TError, + Result = QueryObserverResult, +> = { + [K in keyof Result]: K extends + | "fetchNextPage" + | "fetchPreviousPage" + | "refetch" + ? Result[K] + : ToRef[K]>; +} & { + suspense: () => Promise; +}; + +type UseQueryReturnType = UseBaseQueryReturnType; + +declare function useQuery< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +>( + options: UndefinedInitialQueryOptions, +): UseQueryReturnType; + +export { type UseQueryReturnType, useQuery }; + +//// [index.d.ts] +export { UseQueryReturnType, useQuery } from './useQuery-CPqkvEsh.js'; + +//// [package.json] +{ + "name": "@tanstack/vue-query", + "type": "module", + "exports": { + ".": { + "import": { + "types": "./build/modern/index.d.ts", + "default": "./build/modern/index.js" + }, + "require": { + "types": "./build/modern/index.d.cts", + "default": "./build/modern/index.cjs" + } + } + } +} + +//// [index.mts] +import { useQuery } from '@tanstack/vue-query' + +const baseUrl = 'https://api.publicapis.org/' + +interface IEntry { + API: string + Description: string + Auth: string + HTTPS: boolean + Cors: string + Link: string + Category: string +} + +const testApi = { + getEntries: (): Promise => { + return fetch(baseUrl + 'entries') + .then((res) => res.json()) + .then((data) => data.entries) + .catch((err) => console.log(err)) + } +} + +const entryKeys = { + all: ['entries'] as const, + list: () => [...entryKeys.all, 'list'] as const +} + +export const useEntries = (): UseQueryReturnType => { + return useQuery({ + queryKey: entryKeys.list(), + queryFn: testApi.getEntries, + select: (data) => data.slice(0, 10) + }) +} + + +/// [Declarations] //// + + + +//// [src/index.d.mts] +interface IEntry { + API: string; + Description: string; + Auth: string; + HTTPS: boolean; + Cors: string; + Link: string; + Category: string; +} +export declare const useEntries: () => UseQueryReturnType; +export {}; +//# sourceMappingURL=index.d.mts.map + +/// [Declarations Maps] //// + + +//// [src/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAgBD,eAAO,MAAM,UAAU,2CAMtB,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIElFbnRyeSB7DQogICAgQVBJOiBzdHJpbmc7DQogICAgRGVzY3JpcHRpb246IHN0cmluZzsNCiAgICBBdXRoOiBzdHJpbmc7DQogICAgSFRUUFM6IGJvb2xlYW47DQogICAgQ29yczogc3RyaW5nOw0KICAgIExpbms6IHN0cmluZzsNCiAgICBDYXRlZ29yeTogc3RyaW5nOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3QgdXNlRW50cmllczogKCkgPT4gVXNlUXVlcnlSZXR1cm5UeXBlPElFbnRyeVtdLCBFcnJvcj47DQpleHBvcnQge307DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLm10cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUEsVUFBVSxNQUFNO0lBQ2QsR0FBRyxFQUFFLE1BQU0sQ0FBQTtJQUNYLFdBQVcsRUFBRSxNQUFNLENBQUE7SUFDbkIsSUFBSSxFQUFFLE1BQU0sQ0FBQTtJQUNaLEtBQUssRUFBRSxPQUFPLENBQUE7SUFDZCxJQUFJLEVBQUUsTUFBTSxDQUFBO0lBQ1osSUFBSSxFQUFFLE1BQU0sQ0FBQTtJQUNaLFFBQVEsRUFBRSxNQUFNLENBQUE7Q0FDakI7QUFnQkQsZUFBTyxNQUFNLFVBQVUsMkNBTXRCLENBQUEifQ==,aW1wb3J0IHsgdXNlUXVlcnkgfSBmcm9tICdAdGFuc3RhY2svdnVlLXF1ZXJ5JwoKY29uc3QgYmFzZVVybCA9ICdodHRwczovL2FwaS5wdWJsaWNhcGlzLm9yZy8nCgppbnRlcmZhY2UgSUVudHJ5IHsKICBBUEk6IHN0cmluZwogIERlc2NyaXB0aW9uOiBzdHJpbmcKICBBdXRoOiBzdHJpbmcKICBIVFRQUzogYm9vbGVhbgogIENvcnM6IHN0cmluZwogIExpbms6IHN0cmluZwogIENhdGVnb3J5OiBzdHJpbmcKfQoKY29uc3QgdGVzdEFwaSA9IHsKICBnZXRFbnRyaWVzOiAoKTogUHJvbWlzZTxJRW50cnlbXT4gPT4gewogICAgcmV0dXJuIGZldGNoKGJhc2VVcmwgKyAnZW50cmllcycpCiAgICAgIC50aGVuKChyZXMpID0+IHJlcy5qc29uKCkpCiAgICAgIC50aGVuKChkYXRhKSA9PiBkYXRhLmVudHJpZXMpCiAgICAgIC5jYXRjaCgoZXJyKSA9PiBjb25zb2xlLmxvZyhlcnIpKQogIH0KfQoKY29uc3QgZW50cnlLZXlzID0gewogIGFsbDogWydlbnRyaWVzJ10gYXMgY29uc3QsCiAgbGlzdDogKCkgPT4gWy4uLmVudHJ5S2V5cy5hbGwsICdsaXN0J10gYXMgY29uc3QKfQoKZXhwb3J0IGNvbnN0IHVzZUVudHJpZXMgPSAoKTogVXNlUXVlcnlSZXR1cm5UeXBlPElFbnRyeVtdLCBFcnJvcj4gPT4gewogIHJldHVybiB1c2VRdWVyeSh7CiAgICBxdWVyeUtleTogZW50cnlLZXlzLmxpc3QoKSwKICAgIHF1ZXJ5Rm46IHRlc3RBcGkuZ2V0RW50cmllcywKICAgIHNlbGVjdDogKGRhdGEpID0+IGRhdGEuc2xpY2UoMCwgMTApCiAgfSkKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingAlternativeContainingModules2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingAlternativeContainingModules2.d.ts.map new file mode 100644 index 0000000000000..b52640d10072a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingAlternativeContainingModules2.d.ts.map @@ -0,0 +1,263 @@ +//// [tests/cases/compiler/declarationEmitUsingAlternativeContainingModules2.ts] //// + +//// [useQuery-CPqkvEsh.d.ts] +type QueryKey = ReadonlyArray; + +interface Register {} + +type DefaultError = Register extends { + defaultError: infer TError; +} + ? TError + : Error; + +type ShouldRetryFunction = ( + failureCount: number, + error: TError, +) => boolean; +type RetryValue = boolean | number | ShouldRetryFunction; + +type QueryFunctionContext< + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> = [TPageParam] extends [never] + ? { + queryKey: TQueryKey; + } + : { + queryKey: TQueryKey; + pageParam: TPageParam; + }; + +type QueryFunction< + T = unknown, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> = (context: QueryFunctionContext) => T | Promise; + +interface QueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> { + retry?: RetryValue; + queryFn?: QueryFunction; + queryKey?: TQueryKey; + initialData?: TData; + initialDataUpdatedAt?: number | (() => number | undefined); +} + +interface QueryObserverOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> extends QueryOptions< + TQueryFnData, + TError, + TQueryData, + TQueryKey, + TPageParam + > { + enabled?: boolean; + refetchInterval?: number; + select?: (data: TQueryData) => TData; +} + +type UseQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = { + [Property in keyof QueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >]: QueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >[Property]; +}; + +type UndefinedInitialQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = UseQueryOptions & { + initialData?: undefined; +}; + +interface QueryObserverBaseResult { + data: TData | undefined; + dataUpdatedAt: number; + error: TError | null; + errorUpdatedAt: number; + failureCount: number; + failureReason: TError | null; + errorUpdateCount: number; + isError: boolean; + isFetched: boolean; + isFetchedAfterMount: boolean; + isFetching: boolean; + isLoading: boolean; + isPending: boolean; + isLoadingError: boolean; + isInitialLoading: boolean; + isPaused: boolean; + isPlaceholderData: boolean; + isRefetchError: boolean; + isRefetching: boolean; + isStale: boolean; + isSuccess: boolean; +} + +interface QueryObserverSuccessResult + extends QueryObserverBaseResult { + data: TData; + error: null; + isError: false; + isPending: false; + isLoadingError: false; + isRefetchError: false; + isSuccess: true; + status: "success"; +} + +type DefinedQueryObserverResult< + TData = unknown, + TError = DefaultError, +> = QueryObserverSuccessResult; +type QueryObserverResult< + TData = unknown, + TError = DefaultError, +> = DefinedQueryObserverResult; + +type ToRef = { + value: T; +}; + +type UseBaseQueryReturnType< + TData, + TError, + Result = QueryObserverResult, +> = { + [K in keyof Result]: K extends + | "fetchNextPage" + | "fetchPreviousPage" + | "refetch" + ? Result[K] + : ToRef[K]>; +} & { + suspense: () => Promise; +}; + +type UseQueryReturnType = UseBaseQueryReturnType; + +declare function useQuery< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +>( + options: UndefinedInitialQueryOptions, +): UseQueryReturnType; + +export { type UseQueryReturnType as b, useQuery as u }; + +//// [index.d.ts] +export { b as UseQueryReturnType, u as useQuery } from './useQuery-CPqkvEsh.js'; + +//// [package.json] +{ + "name": "@tanstack/vue-query", + "type": "module", + "exports": { + ".": { + "import": { + "types": "./build/modern/index.d.ts", + "default": "./build/modern/index.js" + }, + "require": { + "types": "./build/modern/index.d.cts", + "default": "./build/modern/index.cjs" + } + } + } +} + +//// [index.mts] +import { useQuery } from '@tanstack/vue-query' + +const baseUrl = 'https://api.publicapis.org/' + +interface IEntry { + API: string + Description: string + Auth: string + HTTPS: boolean + Cors: string + Link: string + Category: string +} + +const testApi = { + getEntries: (): Promise => { + return fetch(baseUrl + 'entries') + .then((res) => res.json()) + .then((data) => data.entries) + .catch((err) => console.log(err)) + } +} + +const entryKeys = { + all: ['entries'] as const, + list: () => [...entryKeys.all, 'list'] as const +} + +export const useEntries = (): b => { + return useQuery({ + queryKey: entryKeys.list(), + queryFn: testApi.getEntries, + select: (data) => data.slice(0, 10) + }) +} + + +/// [Declarations] //// + + + +//// [src/index.d.mts] +interface IEntry { + API: string; + Description: string; + Auth: string; + HTTPS: boolean; + Cors: string; + Link: string; + Category: string; +} +export declare const useEntries: () => b; +export {}; +//# sourceMappingURL=index.d.mts.map + +/// [Declarations Maps] //// + + +//// [src/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAgBD,eAAO,MAAM,UAAU,0BAMtB,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIElFbnRyeSB7DQogICAgQVBJOiBzdHJpbmc7DQogICAgRGVzY3JpcHRpb246IHN0cmluZzsNCiAgICBBdXRoOiBzdHJpbmc7DQogICAgSFRUUFM6IGJvb2xlYW47DQogICAgQ29yczogc3RyaW5nOw0KICAgIExpbms6IHN0cmluZzsNCiAgICBDYXRlZ29yeTogc3RyaW5nOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3QgdXNl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pZXMpCiAgICAgIC5jYXRjaCgoZXJyKSA9PiBjb25zb2xlLmxvZyhlcnIpKQogIH0KfQoKY29uc3QgZW50cnlLZXlzID0gewogIGFsbDogWydlbnRyaWVzJ10gYXMgY29uc3QsCiAgbGlzdDogKCkgPT4gWy4uLmVudHJ5S2V5cy5hbGwsICdsaXN0J10gYXMgY29uc3QKfQoKZXhwb3J0IGNvbnN0IHVzZUVudHJpZXMgPSAoKTogYjxJRW50cnlbXSwgRXJyb3I+ID0+IHsKICByZXR1cm4gdXNlUXVlcnkoewogICAgcXVlcnlLZXk6IGVudHJ5S2V5cy5saXN0KCksCiAgICBxdWVyeUZuOiB0ZXN0QXBpLmdldEVudHJpZXMsCiAgICBzZWxlY3Q6IChkYXRhKSA9PiBkYXRhLnNsaWNlKDAsIDEwKQogIH0pCn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingTypeAlias1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingTypeAlias1.d.ts.map new file mode 100644 index 0000000000000..a30d9594a6a0b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingTypeAlias1.d.ts.map @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/declarationEmitUsingTypeAlias1.ts] //// + +//// [inner.d.ts] +export declare type Other = { other: string }; +export declare type SomeType = { arg: Other }; + +//// [index.d.ts] +export type OtherType = import('./inner').Other; +export type SomeType = import('./inner').SomeType; + +//// [package.json] +{ + "name": "some-dep", + "exports": { + ".": "./dist/index.js" + } +} + +//// [index.ts] +import { SomeType } from "some-dep"; + +export const foo = (thing: SomeType): SomeType => { + return thing; +}; + +export const bar = (thing: SomeType): Other => { + return thing.arg; +}; + +/// [Declarations] //// + + + +//// [src/index.d.ts] +import { SomeType } from "some-dep"; +export declare const foo: (thing: SomeType) => SomeType; +export declare const bar: (thing: SomeType) => Other; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [src/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,eAAO,MAAM,GAAG,UAAW,QAAQ,KAAG,QAErC,CAAC;AAEF,eAAO,MAAM,GAAG,UAAW,QAAQ,UAElC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU29tZVR5cGUgfSBmcm9tICJzb21lLWRlcCI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmb286ICh0aGluZzogU29tZVR5cGUpID0+IFNvbWVUeXBlOw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgYmFyOiAodGhpbmc6IFNvbWVUeXBlKSA9PiBPdGhlcjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFFcEMsZUFBTyxNQUFNLEdBQUcsVUFBVyxRQUFRLEtBQUcsUUFFckMsQ0FBQztBQUVGLGVBQU8sTUFBTSxHQUFHLFVBQVcsUUFBUSxVQUVsQyxDQUFDIn0=,aW1wb3J0IHsgU29tZVR5cGUgfSBmcm9tICJzb21lLWRlcCI7CgpleHBvcnQgY29uc3QgZm9vID0gKHRoaW5nOiBTb21lVHlwZSk6IFNvbWVUeXBlID0+IHsKICByZXR1cm4gdGhpbmc7Cn07CgpleHBvcnQgY29uc3QgYmFyID0gKHRoaW5nOiBTb21lVHlwZSk6IE90aGVyID0+IHsKICByZXR1cm4gdGhpbmcuYXJnOwp9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithDefaultAsComputedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithDefaultAsComputedName.d.ts new file mode 100644 index 0000000000000..559bf8b9a4359 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithDefaultAsComputedName.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts] //// + +//// [other.ts] +type Experiment = { + name: Name; +}; +declare const createExperiment: ( + options: Experiment +) => Experiment; +const __default: Experiment<"foo"> = createExperiment({ + name: "foo" +}); +export default __default; + +//// [main.ts] +import other from "./other"; +export const obj = { + [other.name]: 1, +}; + +/// [Declarations] //// + + + +//// [main.d.ts] +export declare const obj: { + foo: number; +}; +//# sourceMappingURL=main.d.ts.map +//// [other.d.ts] +type Experiment = { + name: Name; +}; +declare const __default: Experiment<"foo">; +export default __default; +//# sourceMappingURL=other.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithDefaultAsComputedName2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithDefaultAsComputedName2.d.ts new file mode 100644 index 0000000000000..784168a31bc87 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithDefaultAsComputedName2.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts] //// + +//// [other.ts] +type Experiment = { + name: Name; +}; +declare const createExperiment: ( + options: Experiment +) => Experiment; +const __default: Experiment<"foo"> = createExperiment({ + name: "foo" +}); +export default __default; + +//// [main.ts] +import * as other2 from "./other"; +export const obj = { + [other2.default.name]: 1 +}; + +/// [Declarations] //// + + + +//// [main.d.ts] +export declare const obj: { + foo: number; +}; +//# sourceMappingURL=main.d.ts.map +//// [other.d.ts] +type Experiment = { + name: Name; +}; +declare const __default: Experiment<"foo">; +export default __default; +//# sourceMappingURL=other.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithInvalidPackageJsonTypings.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithInvalidPackageJsonTypings.d.ts new file mode 100644 index 0000000000000..b71faa4449be2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// + +//// [index.d.ts] +export function bar(): number; +//// [package.json] +{ + "main": "./lib", + "name": "csv-parse", + "types": [ + "./lib/index.d.ts", + "./lib/sync.d.ts" + ], + "version": "4.8.2" +} +//// [index.ts] +export interface MutableRefObject { + current: T; +} +export function useRef(current: T): MutableRefObject { + return { current }; +} +export const useCsvParser = () => { + const parserRef = useRef(null); + return parserRef; +}; + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export interface MutableRefObject { + current: T; +} +export declare function useRef(current: T): MutableRefObject; +export declare const useCsvParser: () => MutableRefObject; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFileOverwriteError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFileOverwriteError.d.ts new file mode 100644 index 0000000000000..9edf960b7e915 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFileOverwriteError.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/declarationFileOverwriteError.ts] //// + +//// [a.d.ts] +declare class c { +} + +//// [a.ts] +class d { +} + +/// [Declarations] //// + + +/// [Errors] //// + +error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +==== a.d.ts (0 errors) ==== + declare class c { + } + +==== a.ts (0 errors) ==== + class d { + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsForFileShadowingGlobalNoError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsForFileShadowingGlobalNoError.d.ts new file mode 100644 index 0000000000000..cff8bb689d048 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsForFileShadowingGlobalNoError.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts] //// + +//// [dom.ts] +export type DOMNode = Node; +//// [custom.ts] +export type Node = {}; +//// [index.ts] +import { Node } from './custom' +import { DOMNode } from './dom' + +type Constructor = new (...args: any[]) => any + +export const mixin = (Base: Constructor): { + new(...args: any[]): { + [x: string]: any + get(domNode: DOMNode): void + } +} => { + return class extends Base { + get(domNode: DOMNode) {} + } +} + +/// [Declarations] //// + + + +//// [custom.d.ts] +export type Node = {}; +//# sourceMappingURL=custom.d.ts.map +//// [dom.d.ts] +export type DOMNode = Node; +//# sourceMappingURL=dom.d.ts.map +//// [index.d.ts] +import { DOMNode } from './dom'; +type Constructor = new (...args: any[]) => any; +export declare const mixin: (Base: Constructor) => new (...args: any[]) => { + [x: string]: any; + get(domNode: DOMNode): void; +}; +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts new file mode 100644 index 0000000000000..c17d56766b7df --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts @@ -0,0 +1,188 @@ +//// [tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts] //// + +//// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts] +// Note that both of the following have an `any` in their return type from where we bottom out the type printout +// for having too many instances of the same symbol nesting. + +// Slightly simplified repro from https://github.com/microsoft/TypeScript/issues/30732 so it's easier to read and debug +export type Key = keyof U; +export type Value, U> = U[K]; +export const updateIfChanged = (t: T): ((key: K) => (>(key: K_1) => (>>(key: K_2) => (>>>(key: K_3) => (>>>>(key: K_4) => (>>>>>(key: K_5) => (>>>>>>(key: K_6) => (>>>>>>>(key: K_7) => (>>>>>>>>(key: K_8) => (>>>>>>>>>(key: K_9) => (>>>>>>>>>>(key: K_10) => any & { + map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; + set: (newU: Value>>>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; + set: (newU: Value>>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; + set: (newU: Value>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; + set: (newU: Value>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; + set: (newU: Value>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>) => Value>>>>>) => T; + set: (newU: Value>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>) => Value>>>>) => T; + set: (newU: Value>>>>) => T; +}) & { + map: (updater: (u: Value>>>) => Value>>>) => T; + set: (newU: Value>>>) => T; +}) & { + map: (updater: (u: Value>>) => Value>>) => T; + set: (newU: Value>>) => T; +}) & { + map: (updater: (u: Value>) => Value>) => T; + set: (newU: Value>) => T; +}) & { + map: (updater: (u: Value) => Value) => T; + set: (newU: Value) => T; +}) & { + map: (updater: (u: T) => T) => T; + set: (newU: T) => T; +} => { + const reduce = (u: U, update: (u: U) => T) => { + const set = (newU: U) => Object.is(u, newU) ? t : update(newU); + return Object.assign( + >(key: K) => + reduce>(u[key as keyof U] as Value, (v: Value) => { + return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); + }), + { map: (updater: (u: U) => U) => set(updater(u)), set }); + }; + return reduce(t, (t: T) => t); +}; + +// example from https://github.com/microsoft/TypeScript/issues/31605 + +export const testRecFun = (parent: T): { + result: T; deeper: (child: U) => { + result: T & U; + deeper: (child: U_1) => { + result: T & U & U_1; + deeper: (child: U_2) => { + result: T & U & U_1 & U_2; + deeper: (child: U_3) => { + result: T & U & U_1 & U_2 & U_3; + deeper: (child: U_4) => { + result: T & U & U_1 & U_2 & U_3 & U_4; + deeper: (child: U_5) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; + deeper: (child: U_6) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; + deeper: (child: U_7) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; + deeper: (child: U_8) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; + deeper: (child: U_9) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; + deeper: (child: U_10) => any; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} => { + return { + result: parent, + deeper: (child: U) => + testRecFun({ ...parent, ...child }) + }; +} + + +let p1 = testRecFun({ one: '1' }) +void p1.result.one; +let p2 = p1.deeper({ two: '2' }) +void p2.result.one; +void p2.result.two; +let p3 = p2.deeper({ three: '3' }) +void p3.result.one; +void p3.result.two; +void p3.result.three; + + +/// [Declarations] //// + + + +//// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts] +export type Key = keyof U; +export type Value, U> = U[K]; +export declare const updateIfChanged: (t: T) => ((key: K) => (>(key: K_1) => (>>(key: K_2) => (>>>(key: K_3) => (>>>>(key: K_4) => (>>>>>(key: K_5) => (>>>>>>(key: K_6) => (>>>>>>>(key: K_7) => (>>>>>>>>(key: K_8) => (>>>>>>>>>(key: K_9) => (>>>>>>>>>>(key: K_10) => any) & { + map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; + set: (newU: Value>>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; + set: (newU: Value>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; + set: (newU: Value>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; + set: (newU: Value>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>) => Value>>>>>) => T; + set: (newU: Value>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>) => Value>>>>) => T; + set: (newU: Value>>>>) => T; +}) & { + map: (updater: (u: Value>>>) => Value>>>) => T; + set: (newU: Value>>>) => T; +}) & { + map: (updater: (u: Value>>) => Value>>) => T; + set: (newU: Value>>) => T; +}) & { + map: (updater: (u: Value>) => Value>) => T; + set: (newU: Value>) => T; +}) & { + map: (updater: (u: Value) => Value) => T; + set: (newU: Value) => T; +}) & { + map: (updater: (u: T) => T) => T; + set: (newU: T) => T; +}; +export declare const testRecFun: (parent: T) => { + result: T; + deeper: (child: U) => { + result: T & U; + deeper: (child: U_1) => { + result: T & U & U_1; + deeper: (child: U_2) => { + result: T & U & U_1 & U_2; + deeper: (child: U_3) => { + result: T & U & U_1 & U_2 & U_3; + deeper: (child: U_4) => { + result: T & U & U_1 & U_2 & U_3 & U_4; + deeper: (child: U_5) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; + deeper: (child: U_6) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; + deeper: (child: U_7) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; + deeper: (child: U_8) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; + deeper: (child: U_9) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; + deeper: (child: U_10) => any; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; +//# sourceMappingURL=declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map new file mode 100644 index 0000000000000..f7aa2aa8eba78 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts] //// + +//// [defaultParameterAddsUndefinedWithStrictNullChecks.ts] +function f(addUndefined1: string = "J", addUndefined2?: number): number { + return addUndefined1.length + (addUndefined2 || 0); +} +function g(addUndefined: string = "J", addDefined: number): number { + return addUndefined.length + addDefined; +} +let total: number = f() + f('a', 1) + f('b') + f(undefined, 2); +total = g('c', 3) + g(undefined, 4); + +function foo1(x: string = "string", b: number): void { + x.length; +} + +function foo2(x: string = "string", b: number): void { + x.length; // ok, should be string +} + +function foo3(x: string | undefined = "string", b: number): void { + x.length; // ok, should be string + x = undefined; +} + +function foo4(x: string | undefined = undefined, b: number): void { + x; // should be string | undefined + x = undefined; +} + +type OptionalNullableString = string | null | undefined; +function allowsNull(val: OptionalNullableString = ""): void { + val = null; + val = 'string and null are both ok'; +} +allowsNull(null); // still allows passing null + + + +// .d.ts should have `string | undefined` for foo1, foo2, foo3 and foo4 +foo1(undefined, 1); +foo2(undefined, 1); +foo3(undefined, 1); +foo4(undefined, 1); + + +function removeUndefinedButNotFalse(x: boolean = true): false | undefined { + if (x === false) { + return x; + } +} + +declare const cond: boolean; +function removeNothing(y: boolean | undefined = cond ? true : undefined): boolean { + if (y !== undefined) { + if (y === false) { + return y; + } + } + return true; +} + + +/// [Declarations] //// + + + +//// [defaultParameterAddsUndefinedWithStrictNullChecks.d.ts] +declare function f(addUndefined1?: string, addUndefined2?: number): number; +declare function g(addUndefined: string | undefined, addDefined: number): number; +declare let total: number; +declare function foo1(x: string | undefined, b: number): void; +declare function foo2(x: string | undefined, b: number): void; +declare function foo3(x: string | undefined, b: number): void; +declare function foo4(x: string | undefined, b: number): void; +type OptionalNullableString = string | null | undefined; +declare function allowsNull(val?: OptionalNullableString): void; +declare function removeUndefinedButNotFalse(x?: boolean): false | undefined; +declare const cond: boolean; +declare function removeNothing(y?: boolean | undefined): boolean; +//# sourceMappingURL=defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map + +/// [Declarations Maps] //// + + +//// [defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map] +{"version":3,"file":"defaultParameterAddsUndefinedWithStrictNullChecks.d.ts","sourceRoot":"","sources":["defaultParameterAddsUndefinedWithStrictNullChecks.ts"],"names":[],"mappings":"AAAA,iBAAS,CAAC,CAAC,aAAa,GAAE,MAAY,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtE;AACD,iBAAS,CAAC,CAAC,YAAY,oBAAc,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjE;AACD,QAAA,IAAI,KAAK,EAAE,MAAmD,CAAC;AAG/D,iBAAS,IAAI,CAAC,CAAC,oBAAmB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,iBAAS,IAAI,CAAC,CAAC,oBAAmB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,iBAAS,IAAI,CAAC,CAAC,oBAA+B,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAG/D;AAED,iBAAS,IAAI,CAAC,CAAC,oBAAgC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAGhE;AAED,KAAK,sBAAsB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC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mV0dXJuIHg7CiAgICB9Cn0KCmRlY2xhcmUgY29uc3QgY29uZDogYm9vbGVhbjsKZnVuY3Rpb24gcmVtb3ZlTm90aGluZyh5OiBib29sZWFuIHwgdW5kZWZpbmVkID0gY29uZCA/IHRydWUgOiB1bmRlZmluZWQpOiBib29sZWFuIHsKICAgIGlmICh5ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICBpZiAoeSA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuIHk7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/definiteAssignmentAssertionsWithObjectShortHand.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/definiteAssignmentAssertionsWithObjectShortHand.d.ts new file mode 100644 index 0000000000000..7f8ad96084e1d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/definiteAssignmentAssertionsWithObjectShortHand.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts] //// + +//// [definiteAssignmentAssertionsWithObjectShortHand.ts] +const a: string | undefined = 'ff'; +const foo: { + a: string; +} = { a! } + +const bar = { + a ? (): void { } +} + +/// [Declarations] //// + + + +//// [definiteAssignmentAssertionsWithObjectShortHand.d.ts] +declare const a: string | undefined; +declare const foo: { + a: string; +}; +declare const bar: { + a?(): void; +}; +//# sourceMappingURL=definiteAssignmentAssertionsWithObjectShortHand.d.ts.map +/// [Errors] //// + +definiteAssignmentAssertionsWithObjectShortHand.ts(4,8): error TS1255: A definite assignment assertion '!' is not permitted in this context. +definiteAssignmentAssertionsWithObjectShortHand.ts(7,7): error TS1162: An object member cannot be declared optional. + + +==== definiteAssignmentAssertionsWithObjectShortHand.ts (2 errors) ==== + const a: string | undefined = 'ff'; + const foo: { + a: string; + } = { a! } + ~ +!!! error TS1255: A definite assignment assertion '!' is not permitted in this context. + + const bar = { + a ? (): void { } + ~ +!!! error TS1162: An object member cannot be declared optional. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts.map new file mode 100644 index 0000000000000..3abcb185c9ea6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts.map @@ -0,0 +1,126 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts] //// + +//// [destructuringInFunctionType.ts] +interface a { a } +interface b { b } +interface c { c } + +type T1 = ([a, b, c]); +type F1 = ([a, b, c]: [ + any, + any, + any +]) => void; + +type T2 = ({ a }); +type F2 = ({ a }: { + a: any; +}) => void; + +type T3 = ([{ a: b }, { b: a }]); +type F3 = ([{ a: b }, { b: a }]: [ + { + a: any; + }, + { + b: any; + } +]) => void; + +type T4 = ([{ a: [b, c] }]); +type F4 = ([{ a: [b, c] }]: [ + { + a: [any, any]; + } +]) => void; + +type C1 = new ([{ a: [b, c] }]: [ + { + a: [any, any]; + } + ]) => void; + +var v1 = ([a, b, c]: [ + any, + any, + any + ]): string => "hello"; +var v2: ([a, b, c]: [ + any, + any, + any +]) => string; + + +/// [Declarations] //// + + + +//// [destructuringInFunctionType.d.ts] +interface a { + a: any; +} +interface b { + b: any; +} +interface c { + c: any; +} +type T1 = ([a, b, c]); +type F1 = ([a, b, c]: [ + any, + any, + any +]) => void; +type T2 = ({ + a: any; +}); +type F2 = ({ a }: { + a: any; +}) => void; +type T3 = ([{ + a: b; +}, { + b: a; +}]); +type F3 = ([{ a: b }, { b: a }]: [ + { + a: any; + }, + { + b: any; + } +]) => void; +type T4 = ([{ + a: [b, c]; +}]); +type F4 = ([{ a: [b, c] }]: [ + { + a: [any, any]; + } +]) => void; +type C1 = new ([{ a: [b, c] }]: [ + { + a: [any, any]; + } +]) => void; +declare var v1: ([a, b, c]: [ + any, + any, + any +]) => string; +declare var v2: ([a, b, c]: [ + any, + any, + any +]) => string; +//# sourceMappingURL=destructuringInFunctionType.d.ts.map + +/// [Declarations Maps] //// + + +//// [destructuringInFunctionType.d.ts.map] +{"version":3,"file":"destructuringInFunctionType.d.ts","sourceRoot":"","sources":["destructuringInFunctionType.ts"],"names":[],"mappings":"AAAA,UAAU,CAAC;IAAG,CAAC,MAAA;CAAE;AACjB,UAAU,CAAC;IAAG,CAAC,MAAA;CAAE;AACjB,UAAU,CAAC;IAAG,CAAC,MAAA;CAAE;AAEjB,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACtB,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;IAClB,GAAG;IACH,GAAG;IACH,GAAG;CACN,KAAK,IAAI,CAAC;AAEX,KAAK,EAAE,GAAG,CAAC;IAAE,CAAC,MAAA;CAAE,CAAC,CAAC;AAClB,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;IACd,CAAC,EAAE,GAAG,CAAC;CACV,KAAK,IAAI,CAAC;AAEX,KAAK,EAAE,GAAG,CAAC,CAAC;IAAE,CAAC,EAAE,CAAC,CAAA;CAAE,EAAE;IAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC,CAAC;AACjC,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IAC7B;QACI,CAAC,EAAE,GAAG,CAAC;KACV;IACD;QACI,CAAC,EAAE,GAAG,CAAC;KACV;CACJ,KAAK,IAAI,CAAC;AAEX,KAAK,EAAE,GAAG,CAAC,CAAC;IAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE,CAAC,CAAC,CAAC;AAC5B,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,C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FtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicatePropertiesInTypeAssertions01.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicatePropertiesInTypeAssertions01.d.ts new file mode 100644 index 0000000000000..756e6fe8802b3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicatePropertiesInTypeAssertions01.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts] //// + +//// [duplicatePropertiesInTypeAssertions01.ts] +let x = <{a: number; a: number}>{}; + +/// [Declarations] //// + + + +//// [duplicatePropertiesInTypeAssertions01.d.ts] +declare let x: { + a: number; +}; +//# sourceMappingURL=duplicatePropertiesInTypeAssertions01.d.ts.map +/// [Errors] //// + +duplicatePropertiesInTypeAssertions01.ts(1,11): error TS2300: Duplicate identifier 'a'. +duplicatePropertiesInTypeAssertions01.ts(1,22): error TS2300: Duplicate identifier 'a'. + + +==== duplicatePropertiesInTypeAssertions01.ts (2 errors) ==== + let x = <{a: number; a: number}>{}; + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicatePropertiesInTypeAssertions02.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicatePropertiesInTypeAssertions02.d.ts new file mode 100644 index 0000000000000..63f24a81d1ede --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicatePropertiesInTypeAssertions02.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts] //// + +//// [duplicatePropertiesInTypeAssertions02.ts] +let x = {} as {a: number; a: number}; + +/// [Declarations] //// + + + +//// [duplicatePropertiesInTypeAssertions02.d.ts] +declare let x: { + a: number; +}; +//# sourceMappingURL=duplicatePropertiesInTypeAssertions02.d.ts.map +/// [Errors] //// + +duplicatePropertiesInTypeAssertions02.ts(1,16): error TS2300: Duplicate identifier 'a'. +duplicatePropertiesInTypeAssertions02.ts(1,27): error TS2300: Duplicate identifier 'a'. + + +==== duplicatePropertiesInTypeAssertions02.ts (2 errors) ==== + let x = {} as {a: number; a: number}; + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNames.d.ts new file mode 100644 index 0000000000000..da519145b5691 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNames.d.ts @@ -0,0 +1,197 @@ +//// [tests/cases/compiler/dynamicNames.ts] //// + +//// [module.ts] +export const c0 = "a"; +export const c1 = 1; +export const s0: unique symbol = Symbol(); +export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T2 extends T1 { +} +export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; +}; + +//// [main.ts] +import { c0, c1, s0, T0, T1, T2, T3 } from "./module"; +import * as M from "./module"; + +namespace N { + export const c2 = "a"; + export const c3 = 1; + export const s1: typeof s0 = s0; + + export interface T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T5 implements T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T6 extends T5 { + } + export declare type T7 = { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + }; +} + +export const c4 = "a"; +export const c5 = 1; +export const s2: typeof s0 = s0; + +interface T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; +} +declare class T9 implements T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; +} +declare class T10 extends T9 { +} +declare type T11 = { + [c4]: number; + [c5]: string; + [s2]: boolean; +}; + +interface T12 { + a: number; + 1: string; + [s2]: boolean; +} +declare class T13 implements T2 { + a: number; + 1: string; + [s2]: boolean; +} +declare class T14 extends T13 { +} +declare type T15 = { + a: number; + 1: string; + [s2]: boolean; +}; + +declare class C { + static a: number; + static 1: string; + static [s2]: boolean; +} + +let t0: T0; +let t1: T1; +let t2: T2; +let t3: T3; +let t0_1: M.T0; +let t1_1: M.T1; +let t2_1: M.T2; +let t3_1: M.T3; +let t4: N.T4; +let t5: N.T5; +let t6: N.T6; +let t7: N.T7; +let t8: T8; +let t9: T9; +let t10: T10; +let t11: T11; +let t12: T12; +let t13: T13; +let t14: T14; +let t15: T15; + +// assignability +t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2; +t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6; +t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0; +t0 = C; // static side + +// object literals +export const o1 = { + [c4]: 1, + [c5]: "a", + [s2]: true +}; + +// check element access types +export const o1_c4: number = o1[c4]; +export const o1_c5: string = o1[c5]; +export const o1_s2: boolean = o1[s2]; + +export const o2: T0 = o1; + +// recursive declarations +// (type parameter indirection courtesy of #20400) +declare const rI: RI<"a">; +rI.x +interface RI { + x: T; + [rI.x]: "b"; +} + +declare const rC: RC<"a">; +rC.x +declare class RC { + x: T; + [rC.x]: "b"; +} + + +/// [Declarations] //// + + + +//// [main.d.ts] +import { s0, T0 } from "./module"; +export declare const c4 = "a"; +export declare const c5 = 1; +export declare const s2: typeof s0; +export declare const o1: { + a: number; + 1: string; + [s0]: boolean; +}; +export declare const o1_c4: number; +export declare const o1_c5: string; +export declare const o1_s2: boolean; +export declare const o2: T0; +//# sourceMappingURL=main.d.ts.map +//// [module.d.ts] +export declare const c0 = "a"; +export declare const c1 = 1; +export declare const s0: unique symbol; +export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T2 extends T1 { +} +export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; +}; +//# sourceMappingURL=module.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNamesErrors.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNamesErrors.d.ts.map new file mode 100644 index 0000000000000..42e5e009c7160 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNamesErrors.d.ts.map @@ -0,0 +1,107 @@ +//// [tests/cases/compiler/dynamicNamesErrors.ts] //// + +//// [dynamicNamesErrors.ts] +const c0 = "1"; +const c1 = 1; + +interface T0 { + [c0]: number; + 1: number; +} + +interface T1 { + [c0]: number; +} + +interface T2 { + [c0]: string; +} + +interface T3 { + [c0]: number; + [c1]: string; +} + +let t1: T1; +let t2: T2; +t1 = t2; +t2 = t1; + +const x: unique symbol = Symbol(); +const y: unique symbol = Symbol(); +const z: unique symbol = Symbol(); +const w: unique symbol = Symbol(); + +export interface InterfaceMemberVisibility { + [x]: number; + [y](): number; +} + +export class ClassMemberVisibility { + static [x]: number; + static [y](): number { return 0; } + static get [z](): number { return 0; } + static set [w](value: number) { } + + [x]: number; + [y](): number { return 0; } + get [z](): number { return 0; } + set [w](value: number) { } +} + +export type ObjectTypeVisibility = { + [x]: number; + [y](): number; +}; + +export const ObjectLiteralVisibility = { + [x]: 0, + [y](): number { return 0; }, + get [z](): number { return 0; }, + set [w](value: number) { }, +}; + +/// [Declarations] //// + + + +//// [dynamicNamesErrors.d.ts] +declare const x: unique symbol; +declare const y: unique symbol; +declare const z: unique symbol; +declare const w: unique symbol; +export interface InterfaceMemberVisibility { + [x]: number; + [y](): number; +} +export declare class ClassMemberVisibility { + static [x]: number; + static [y](): number; + static get [z](): number; + static set [w](value: number); + [x]: number; + [y](): number; + get [z](): number; + set [w](value: number); +} +export type ObjectTypeVisibility = { + [x]: number; + [y](): number; +}; +export declare const ObjectLiteralVisibility: { + [x]: number; + [y](): number; + readonly [z]: number; + [w]: number; +}; +export {}; +//# sourceMappingURL=dynamicNamesErrors.d.ts.map + +/// [Declarations Maps] //// + + +//// [dynamicNamesErrors.d.ts.map] +{"version":3,"file":"dynamicNamesErrors.d.ts","sourceRoot":"","sources":["dynamicNamesErrors.ts"],"names":[],"mappings":"AA0BA,QAAA,MAAM,CAAC,EAAE,OAAO,MAAiB,CAAC;AAClC,QAAA,MAAM,CAAC,EAAE,OAAO,MAAiB,CAAC;AAClC,QAAA,MAAM,CAAC,EAAE,OAAO,MAAiB,CAAC;AAClC,QAAA,MAAM,CAAC,EAAE,OAAO,MAAiB,CAAC;AAElC,MAAM,WAAW,yBAAyB;IACtC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;CACjB;AAED,qBAAa,qBAAqB;IAC9B,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM;IACpB,MAAM,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAc;IACtC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,EAAK;IAEjC,CAAC,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VyOwp9CgpleHBvcnQgY2xhc3MgQ2xhc3NNZW1iZXJWaXNpYmlsaXR5IHsKICAgIHN0YXRpYyBbeF06IG51bWJlcjsKICAgIHN0YXRpYyBbeV0oKTogbnVtYmVyIHsgcmV0dXJuIDA7IH0KICAgIHN0YXRpYyBnZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9CiAgICBzdGF0aWMgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0KCiAgICBbeF06IG51bWJlcjsKICAgIFt5XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgZ2V0IFt6XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0KfQoKZXhwb3J0IHR5cGUgT2JqZWN0VHlwZVZpc2liaWxpdHkgPSB7CiAgICBbeF06IG51bWJlcjsKICAgIFt5XSgpOiBudW1iZXI7Cn07CgpleHBvcnQgY29uc3QgT2JqZWN0TGl0ZXJhbFZpc2liaWxpdHkgPSB7CiAgICBbeF06IDAsCiAgICBbeV0oKTogbnVtYmVyIHsgcmV0dXJuIDA7IH0sCiAgICBnZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9LAogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0sCn07 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitClassExpressionInDeclarationFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitClassExpressionInDeclarationFile.d.ts new file mode 100644 index 0000000000000..ed2ef4f6bd390 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitClassExpressionInDeclarationFile.d.ts @@ -0,0 +1,95 @@ +//// [tests/cases/compiler/emitClassExpressionInDeclarationFile.ts] //// + +//// [emitClassExpressionInDeclarationFile.ts] +export var simpleExample = class { + static getTags() { } + tags() { } +} +export var circularReference = class C { + static getTags(c: C): C { return c } + tags(c: C): C { return c } +} + +// repro from #15066 +export class FooItem { + foo(): void { } + name?: string; +} + +export type Constructor = new(...args: any[]) => T; +export function WithTags>(Base: T): { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & T { + return class extends Base { + static getTags(): void { } + tags(): void { } + } +} + +const TestBase: { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & typeof FooItem = WithTags(FooItem); +export class Test extends TestBase {} + +const test = new Test(); + +Test.getTags() +test.tags(); + + +/// [Declarations] //// + + + +//// [emitClassExpressionInDeclarationFile.d.ts] +export declare var simpleExample: { + new (): { + tags(): void; + }; + getTags(): void; +}; +export declare var circularReference: { + new (): { + tags(c: any): any; + }; + getTags(c: { + tags(c: any): any; + }): { + tags(c: any): any; + }; +}; +export declare class FooItem { + foo(): void; + name?: string; +} +export type Constructor = new (...args: any[]) => T; +export declare function WithTags>(Base: T): { + new (...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & T; +declare const TestBase: { + new (...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & typeof FooItem; +export declare class Test extends TestBase { +} +export {}; +//# sourceMappingURL=emitClassExpressionInDeclarationFile.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitClassExpressionInDeclarationFile2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitClassExpressionInDeclarationFile2.d.ts new file mode 100644 index 0000000000000..cbec86d9d673d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitClassExpressionInDeclarationFile2.d.ts @@ -0,0 +1,127 @@ +//// [tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts] //// + +//// [emitClassExpressionInDeclarationFile2.ts] +export var noPrivates = class { + static getTags() { } + tags() { } + private static ps = -1 + private p = 12 +} + +// altered repro from #15066 to add private property +export class FooItem { + foo(): void { } + name?: string; + private property = "capitalism" +} + +export type Constructor = new(...args: any[]) => T; +export function WithTags>(Base: T): { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; +} & T { + return class extends Base { + static getTags(): void { } + tags(): void { } + } +} + +const TestBase: { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; +} & typeof FooItem = WithTags(FooItem); +export class Test extends TestBase {} + +const test = new Test(); + +Test.getTags() +test.tags(); + + +/// [Declarations] //// + + +/// [Errors] //// + +emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'p' of exported class expression may not be private or protected. +emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'ps' of exported class expression may not be private or protected. +emitClassExpressionInDeclarationFile2.ts(25,5): error TS2322: Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; } & T'. + Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; }'. + Type '(Anonymous class) & FooItem' is not assignable to type '{ tags(): void; foo(): void; name?: string; property: string; }'. + Property 'property' is private in type '(Anonymous class) & FooItem' but not in type '{ tags(): void; foo(): void; name?: string; property: string; }'. +emitClassExpressionInDeclarationFile2.ts(40,27): error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members. + The intersection '{ tags(): void; foo(): void; name?: string; property: string; } & FooItem' was reduced to 'never' because property 'property' exists in multiple constituents and is private in some. +emitClassExpressionInDeclarationFile2.ts(45,6): error TS2339: Property 'tags' does not exist on type 'Test'. + + +==== emitClassExpressionInDeclarationFile2.ts (5 errors) ==== + export var noPrivates = class { + ~~~~~~~~~~ +!!! error TS4094: Property 'p' of exported class expression may not be private or protected. + ~~~~~~~~~~ +!!! error TS4094: Property 'ps' of exported class expression may not be private or protected. + static getTags() { } + tags() { } + private static ps = -1 + private p = 12 + } + + // altered repro from #15066 to add private property + export class FooItem { + foo(): void { } + name?: string; + private property = "capitalism" + } + + export type Constructor = new(...args: any[]) => T; + export function WithTags>(Base: T): { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; + } & T { + return class extends Base { + ~~~~~~ +!!! error TS2322: Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; } & T'. +!!! error TS2322: Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; }'. +!!! error TS2322: Type '(Anonymous class) & FooItem' is not assignable to type '{ tags(): void; foo(): void; name?: string; property: string; }'. +!!! error TS2322: Property 'property' is private in type '(Anonymous class) & FooItem' but not in type '{ tags(): void; foo(): void; name?: string; property: string; }'. + static getTags(): void { } + tags(): void { } + } + } + + const TestBase: { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; + } & typeof FooItem = WithTags(FooItem); + export class Test extends TestBase {} + ~~~~~~~~ +!!! error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members. +!!! error TS2509: The intersection '{ tags(): void; foo(): void; name?: string; property: string; } & FooItem' was reduced to 'never' because property 'property' exists in multiple constituents and is private in some. + + const test = new Test(); + + Test.getTags() + test.tags(); + ~~~~ +!!! error TS2339: Property 'tags' does not exist on type 'Test'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts.map new file mode 100644 index 0000000000000..b6ba526dceade --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts.map @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/emitMethodCalledNew.ts] //// + +//// [emitMethodCalledNew.ts] +// https://github.com/microsoft/TypeScript/issues/55075 + +export const a = { + new(x: number): number { return x + 1 } +} +export const b = { + "new"(x: number): number { return x + 1 } +} +export const c = { + ["new"](x: number): number { return x + 1 } +} + + +/// [Declarations] //// + + + +//// [emitMethodCalledNew.d.ts] +export declare const a: { + "new"(x: number): number; +}; +export declare const b: { + "new"(x: number): number; +}; +export declare const c: { + "new"(x: number): number; +}; +//# sourceMappingURL=emitMethodCalledNew.d.ts.map + +/// [Declarations Maps] //// + + +//// [emitMethodCalledNew.d.ts.map] +{"version":3,"file":"emitMethodCalledNew.d.ts","sourceRoot":"","sources":["emitMethodCalledNew.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;aACL,MAAM,GAAG,MAAM;CACvB,CAAA;AACD,eAAO,MAAM,CAAC;aACH,MAAM,GAAG,MAAM;CACzB,CAAA;AACD,eAAO,MAAM,CAAC;aACD,MAAM,GAAG,MAAM;CAC3B,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgYTogew0KICAgICJuZXciKHg6IG51bWJlcik6IG51bWJlcjsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBiOiB7DQogICAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGM6IHsNCiAgICAibmV3Iih4OiBudW1iZXIpOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZW1pdE1ldGhvZENhbGxlZE5ldy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxlQUFPLE1BQU0sQ0FBQzthQUNMLE1BQU0sR0FBRyxNQUFNO0NBQ3ZCLENBQUE7QUFDRCxlQUFPLE1BQU0sQ0FBQzthQUNILE1BQU0sR0FBRyxNQUFNO0NBQ3pCLENBQUE7QUFDRCxlQUFPLE1BQU0sQ0FBQzthQUNELE1BQU0sR0FBRyxNQUFNO0NBQzNCLENBQUEifQ==,Ly8gaHR0cHM6Ly9naXRodWIuY29tL21pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy81NTA3NQoKZXhwb3J0IGNvbnN0IGEgPSB7CiAgbmV3KHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0KZXhwb3J0IGNvbnN0IGIgPSB7CiAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyIHsgcmV0dXJuIHggKyAxIH0KfQpleHBvcnQgY29uc3QgYyA9IHsKICBbIm5ldyJdKHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion01.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion01.d.ts.map new file mode 100644 index 0000000000000..2f0dfb8095f63 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion01.d.ts.map @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts] //// + +//// [emptyTuplesTypeAssertion01.ts] +let x = <[]>[]; +let y: undefined = x[0]; + +/// [Declarations] //// + + + +//// [emptyTuplesTypeAssertion01.d.ts] +declare let x: []; +declare let y: undefined; +//# sourceMappingURL=emptyTuplesTypeAssertion01.d.ts.map + +/// [Declarations Maps] //// + + +//// [emptyTuplesTypeAssertion01.d.ts.map] +{"version":3,"file":"emptyTuplesTypeAssertion01.d.ts","sourceRoot":"","sources":["emptyTuplesTypeAssertion01.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,IAAS,CAAC;AACf,QAAA,IAAI,CAAC,EAAE,SAAgB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgeDogW107DQpkZWNsYXJlIGxldCB5OiB1bmRlZmluZWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1lbXB0eVR1cGxlc1R5cGVBc3NlcnRpb24wMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlUdXBsZXNUeXBlQXNzZXJ0aW9uMDEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVtcHR5VHVwbGVzVHlwZUFzc2VydGlvbjAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxDQUFDLElBQVMsQ0FBQztBQUNmLFFBQUEsSUFBSSxDQUFDLEVBQUUsU0FBZ0IsQ0FBQyJ9,bGV0IHggPSA8W10+W107CmxldCB5OiB1bmRlZmluZWQgPSB4WzBdOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion02.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion02.d.ts.map new file mode 100644 index 0000000000000..824c985354008 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion02.d.ts.map @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts] //// + +//// [emptyTuplesTypeAssertion02.ts] +let x = [] as []; +let y: undefined = x[0]; + +/// [Declarations] //// + + + +//// [emptyTuplesTypeAssertion02.d.ts] +declare let x: []; +declare let y: undefined; +//# sourceMappingURL=emptyTuplesTypeAssertion02.d.ts.map + +/// [Declarations Maps] //// + + +//// [emptyTuplesTypeAssertion02.d.ts.map] +{"version":3,"file":"emptyTuplesTypeAssertion02.d.ts","sourceRoot":"","sources":["emptyTuplesTypeAssertion02.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,IAAW,CAAC;AACjB,QAAA,IAAI,CAAC,EAAE,SAAgB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgeDogW107DQpkZWNsYXJlIGxldCB5OiB1bmRlZmluZWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1lbXB0eVR1cGxlc1R5cGVBc3NlcnRpb24wMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlUdXBsZXNUeXBlQXNzZXJ0aW9uMDIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVtcHR5VHVwbGVzVHlwZUFzc2VydGlvbjAyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxDQUFDLElBQVcsQ0FBQztBQUNqQixRQUFBLElBQUksQ0FBQyxFQUFFLFNBQWdCLENBQUMifQ==,bGV0IHggPSBbXSBhcyBbXTsKbGV0IHk6IHVuZGVmaW5lZCA9IHhbMF07 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts new file mode 100644 index 0000000000000..8bc9c25572dc0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts @@ -0,0 +1,146 @@ +//// [tests/cases/conformance/enums/enumClassification.ts] //// + +//// [enumClassification.ts] +// An enum type where each member has no initializer or an initializer that specififes +// a numeric literal, a string literal, or a single identifier naming another member in +// the enum type is classified as a literal enum type. An enum type that doesn't adhere +// to this pattern is classified as a numeric enum type. + +// Examples of literal enum types + +enum E01 { + A +} + +enum E02 { + A = 123 +} + +enum E03 { + A = "hello" +} + +enum E04 { + A, + B, + C +} + +enum E05 { + A, + B = 10, + C +} + +enum E06 { + A = "one", + B = "two", + C = "three" +} + +enum E07 { + A, + B, + C = "hi", + D = 10, + E, + F = "bye" +} + +enum E08 { + A = 10, + B = "hello", + C = A, + D = B, + E = C, +} + +// Examples of numeric enum types with only constant members + +enum E10 {} + +enum E11 { + A = +0, + B, + C +} + +enum E12 { + A = 1 << 0, + B = 1 << 1, + C = 1 << 2 +} + +// Examples of numeric enum types with constant and computed members + +enum E20 { + A = "foo".length, + B = A + 1, + C = +"123", + D = Math.sin(1) +} + + +/// [Declarations] //// + + + +//// [enumClassification.d.ts] +declare enum E01 { + A = 0 +} +declare enum E02 { + A = 123 +} +declare enum E03 { + A = "hello" +} +declare enum E04 { + A = 0, + B = 1, + C = 2 +} +declare enum E05 { + A = 0, + B = 10, + C = 11 +} +declare enum E06 { + A = "one", + B = "two", + C = "three" +} +declare enum E07 { + A = 0, + B = 1, + C = "hi", + D = 10, + E = 11, + F = "bye" +} +declare enum E08 { + A = 10, + B = "hello", + C = 10, + D = "hello", + E = 10 +} +declare enum E10 { +} +declare enum E11 { + A = 0, + B = 1, + C = 2 +} +declare enum E12 { + A = 1, + B = 2, + C = 4 +} +declare enum E20 { + A, + B, + C, + D +} +//# sourceMappingURL=enumClassification.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts new file mode 100644 index 0000000000000..4074bd930025d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts] //// + +//// [enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts] +enum T1 { + a = `1` +} + +enum T2 { + a = `1`, + b = "2", + c = 3 +} + +enum T3 { + a = `1` + `1` +} + +enum T4 { + a = `1`, + b = `1` + `1`, + c = `1` + "2", + d = "2" + `1`, + e = "2" + `1` + `1` +} + +enum T5 { + a = `1`, + b = `1` + `2`, + c = `1` + `2` + `3`, + d = 1 +} + +enum T6 { + a = 1, + b = `12`.length +} + +declare enum T7 { + a = `1`, + b = `1` + `1`, + c = "2" + `1` +} + + +/// [Declarations] //// + + + +//// [enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts] +declare enum T1 { + a = "1" +} +declare enum T2 { + a = "1", + b = "2", + c = 3 +} +declare enum T3 { + a = "11" +} +declare enum T4 { + a = "1", + b = "11", + c = "12", + d = "21", + e = "211" +} +declare enum T5 { + a = "1", + b = "12", + c = "123", + d = 1 +} +declare enum T6 { + a = 1, + b +} +declare enum T7 { + a = "1", + b = "11", + c = "21" +} +//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map new file mode 100644 index 0000000000000..e3a73209bb3bf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map @@ -0,0 +1,84 @@ +//// [tests/cases/compiler/es6ImportNamedImportWithExport.ts] //// + +//// [server.ts] +export var a = 10; +export var x: number = a; +export var m: number = a; +export var a1 = 10; +export var x1 = 10; +export var z1 = 10; +export var z2 = 10; +export var aaaa = 10; + +//// [client.ts] +export import { } from "./server"; +export import { a } from "./server"; +export var xxxx: number = a; +export import { a as b } from "./server"; +export var xxxx = b; +export import { x, a as y } from "./server"; +export var xxxx = x; +export var xxxx = y; +export import { x as z, } from "./server"; +export var xxxx = z; +export import { m, } from "./server"; +export var xxxx = m; +export import { a1, x1 } from "./server"; +export var xxxx = a1; +export var xxxx = x1; +export import { a1 as a11, x1 as x11 } from "./server"; +export var xxxx = a11; +export var xxxx = x11; +export import { z1 } from "./server"; +export var z111: number = z1; +export import { z2 as z3 } from "./server"; +export var z2: number = z3; // z2 shouldn't give redeclare error + +// Non referenced imports +export import { aaaa } from "./server"; +export import { aaaa as bbbb } from "./server"; + + +/// [Declarations] //// + + + +//// [client.d.ts] +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var z111: number; +export declare var z2: number; +//# sourceMappingURL=client.d.ts.map +//// [server.d.ts] +export declare var a: number; +export declare var x: number; +export declare var m: number; +export declare var a1: number; +export declare var x1: number; +export declare var z1: number; +export declare var z2: number; +export declare var aaaa: number; +//# sourceMappingURL=server.d.ts.map + +/// [Declarations Maps] //// + + +//// [client.d.ts.map] +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["client.ts"],"names":[],"mappings":"AAEA,eAAO,IAAI,IAAI,EAAE,MAAU,CAAC;AAE5B,eAAO,IAAI,IAAI,QAAI,CAAC;AAEpB,eAAO,IAAI,IAAI,QAAI,CAAC;AACpB,eAAO,IAAI,IAAI,QAAI,CAAC;AAEpB,eAAO,IAAI,IAAI,QAAI,CAAC;AAEpB,eAAO,IAAI,IAAI,QAAI,CAAC;AAEpB,eAAO,IAAI,IAAI,QAAK,CAAC;AACrB,eAAO,IAAI,IAAI,QAAK,CAAC;AAErB,eAAO,IAAI,IAAI,QAAM,CAAC;AACtB,eAAO,IAAI,IAAI,QAAM,CAAC;AAEtB,eAAO,IAAI,IAAI,EAAE,MAAW,CAAC;AAE7B,eAAO,IAAI,EAAE,EAAE,MAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4OiBudW1iZXI7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IKCi8vIE5vbiByZWZlcmVuY2VkIGltcG9ydHMKZXhwb3J0IGltcG9ydCB7IGFhYWEgfSBmcm9tICIuL3NlcnZlciI7CmV4cG9ydCBpbXBvcnQgeyBhYWFhIGFzIGJiYmIgfSBmcm9tICIuL3NlcnZlciI7Cg== + + +//// [server.d.ts.map] +{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["server.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,CAAC,QAAK,CAAC;AAClB,eAAO,IAAI,CAAC,EAAE,MAAU,CAAC;AACzB,eAAO,IAAI,CAAC,EAAE,MAAU,CAAC;AACzB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,IAAI,QAAK,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGE6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgbTogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIGExOiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgeDE6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB6MTogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIHoyOiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgYWFhYTogbnVtYmVyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c2VydmVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLENBQUMsUUFBSyxDQUFDO0FBQ2xCLGVBQU8sSUFBSSxDQUFDLEVBQUUsTUFBVSxDQUFDO0FBQ3pCLGVBQU8sSUFBSSxDQUFDLEVBQUUsTUFBVSxDQUFDO0FBQ3pCLGVBQU8sSUFBSSxFQUFFLFFBQUssQ0FBQztBQUNuQixlQUFPLElBQUksRUFBRSxRQUFLLENBQUM7QUFDbkIsZUFBTyxJQUFJLEVBQUUsUUFBSyxDQUFDO0FBQ25CLGVBQU8sSUFBSSxFQUFFLFFBQUssQ0FBQztBQUNuQixlQUFPLElBQUksSUFBSSxRQUFLLENBQUMifQ==,ZXhwb3J0IHZhciBhID0gMTA7CmV4cG9ydCB2YXIgeDogbnVtYmVyID0gYTsKZXhwb3J0IHZhciBtOiBudW1iZXIgPSBhOwpleHBvcnQgdmFyIGExID0gMTA7CmV4cG9ydCB2YXIgeDEgPSAxMDsKZXhwb3J0IHZhciB6MSA9IDEwOwpleHBvcnQgdmFyIHoyID0gMTA7CmV4cG9ydCB2YXIgYWFhYSA9IDEwOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exhaustiveSwitchStatements1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exhaustiveSwitchStatements1.d.ts.map new file mode 100644 index 0000000000000..10860417214fb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exhaustiveSwitchStatements1.d.ts.map @@ -0,0 +1,342 @@ +//// [tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts] //// + +//// [exhaustiveSwitchStatements1.ts] +function f1(x: 1 | 2): string { + if (!!true) { + switch (x) { + case 1: return 'a'; + case 2: return 'b'; + } + x; // Unreachable + } + else { + throw 0; + } +} + +function f2(x: 1 | 2): void { + let z: number; + switch (x) { + case 1: z = 10; break; + case 2: z = 20; break; + } + z; // Definitely assigned +} + +function f3(x: 1 | 2): 10 | 20 { + switch (x) { + case 1: return 10; + case 2: return 20; + // Default considered reachable to allow defensive coding + default: throw new Error("Bad input"); + } +} + +// Repro from #11572 + +enum E { A, B } + +function f(e: E): number { + switch (e) { + case E.A: return 0 + case E.B: return 1 + } +} + +function g(e: E): number { + if (!true) + return -1 + else + switch (e) { + case E.A: return 0 + case E.B: return 1 + } +} + +// Repro from #12668 + +interface Square { kind: "square"; size: number; } + +interface Rectangle { kind: "rectangle"; width: number; height: number; } + +interface Circle { kind: "circle"; radius: number; } + +interface Triangle { kind: "triangle"; side: number; } + +type Shape = Square | Rectangle | Circle | Triangle; + +function area(s: Shape): number { + let area; + switch (s.kind) { + case "square": area = s.size * s.size; break; + case "rectangle": area = s.width * s.height; break; + case "circle": area = Math.PI * s.radius * s.radius; break; + case "triangle": area = Math.sqrt(3) / 4 * s.side * s.side; break; + } + return area; +} + +function areaWrapped(s: Shape): number { + let area; + area = (() => { + switch (s.kind) { + case "square": return s.size * s.size; + case "rectangle": return s.width * s.height; + case "circle": return Math.PI * s.radius * s.radius; + case "triangle": return Math.sqrt(3) / 4 * s.side * s.side; + } + })(); + return area; +} + +// Repro from #13241 + +enum MyEnum { + A, + B +} + +function thisGivesError(e: MyEnum): string { + let s: string; + switch (e) { + case MyEnum.A: s = "it was A"; break; + case MyEnum.B: s = "it was B"; break; + } + return s; +} + +function good1(e: MyEnum): string { + let s: string; + switch (e) { + case MyEnum.A: s = "it was A"; break; + case MyEnum.B: s = "it was B"; break; + default: s = "it was something else"; break; + } + return s; +} + +function good2(e: MyEnum): string { + switch (e) { + case MyEnum.A: return "it was A"; + case MyEnum.B: return "it was B"; + } +} + +// Repro from #18362 + +enum Level { + One, + Two, +} + +const doSomethingWithLevel = (level: Level): Level => { + let next: Level; + switch (level) { + case Level.One: + next = Level.Two; + break; + case Level.Two: + next = Level.One; + break; + } + return next; +}; + +// Repro from #20409 + +interface Square2 { + kind: "square"; + size: number; +} + +interface Circle2 { + kind: "circle"; + radius: number; +} + +type Shape2 = Square2 | Circle2; + +function withDefault(s1: Shape2, s2: Shape2): string { + switch (s1.kind) { + case "square": + return "1"; + case "circle": + switch (s2.kind) { + case "square": + return "2"; + case "circle": + return "3"; + default: + return "never"; + } + } +} + +function withoutDefault(s1: Shape2, s2: Shape2): string { + switch (s1.kind) { + case "square": + return "1"; + case "circle": + switch (s2.kind) { + case "square": + return "2"; + case "circle": + return "3"; + } + } +} + +// Repro from #20823 + +function test4(value: 1 | 2): string { + let x: string; + switch (value) { + case 1: x = "one"; break; + case 2: x = "two"; break; + } + return x; +} + +// Repro from #34661 + +enum Animal { DOG, CAT } + +declare const zoo: { animal: Animal } | undefined; + +function expression(): Animal { + switch (zoo?.animal ?? Animal.DOG) { + case Animal.DOG: return Animal.DOG + case Animal.CAT: return Animal.CAT + } +} + +// Repro from #34840 + +function foo(): void { + const foo: number | undefined = 0; + while (true) { + const stats = foo; + switch (stats) { + case 1: break; + case 2: break; + } + } +} + +// Repro from #35070 + +type O = { + a: number, + b: number +}; +type K = keyof O | 'c'; +function ff(o: O, k: K): number { + switch(k) { + case 'c': + k = 'a'; + } + k === 'c'; // Error + return o[k]; +} + +// Repro from #35431 +type A = { kind: "abc" } | { kind: "def" }; + +function f35431(a: A): void { + switch (a.kind) { + case "abc": + case "def": return; + default: + a!.kind; // Error expected + } +} + +/// [Declarations] //// + + + +//// [exhaustiveSwitchStatements1.d.ts] +declare function f1(x: 1 | 2): string; +declare function f2(x: 1 | 2): void; +declare function f3(x: 1 | 2): 10 | 20; +declare enum E { + A = 0, + B = 1 +} +declare function f(e: E): number; +declare function g(e: E): number; +interface Square { + kind: "square"; + size: number; +} +interface Rectangle { + kind: "rectangle"; + width: number; + height: number; +} +interface Circle { + kind: "circle"; + radius: number; +} +interface Triangle { + kind: "triangle"; + side: number; +} +type Shape = Square | Rectangle | Circle | Triangle; +declare function area(s: Shape): number; +declare function areaWrapped(s: Shape): number; +declare enum MyEnum { + A = 0, + B = 1 +} +declare function thisGivesError(e: MyEnum): string; +declare function good1(e: MyEnum): string; +declare function good2(e: MyEnum): string; +declare enum Level { + One = 0, + Two = 1 +} +declare const doSomethingWithLevel: (level: Level) => Level; +interface Square2 { + kind: "square"; + size: number; +} +interface Circle2 { + kind: "circle"; + radius: number; +} +type Shape2 = Square2 | Circle2; +declare function withDefault(s1: Shape2, s2: Shape2): string; +declare function withoutDefault(s1: Shape2, s2: Shape2): string; +declare function test4(value: 1 | 2): string; +declare enum Animal { + DOG = 0, + CAT = 1 +} +declare const zoo: { + animal: Animal; +} | undefined; +declare function expression(): Animal; +declare function foo(): void; +type O = { + a: number; + b: number; +}; +type K = keyof O | 'c'; +declare function ff(o: O, k: K): number; +type A = { + kind: "abc"; +} | { + kind: "def"; +}; +declare function f35431(a: A): void; +//# sourceMappingURL=exhaustiveSwitchStatements1.d.ts.map + +/// [Declarations Maps] //// + + +//// [exhaustiveSwitchStatements1.d.ts.map] +{"version":3,"file":"exhaustiveSwitchStatements1.d.ts","sourceRoot":"","sources":["exhaustiveSwitchStatements1.ts"],"names":[],"mappings":"AAAA,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CAW5B;AAED,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAO1B;AAED,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAO7B;AAID,aAAK,CAAC;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;AAEf,iBAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAKvB;AAED,iBAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAQvB;AAID,UAAU,MAAM;IAAG,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE;AAElD,UAAU,SAAS;IAAG,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAAE;AAEzE,UAAU,MAAM;IAAG,IAAI,EAAE,QAAQ,CAAC;I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BlIFNoYXBlMiA9IFNxdWFyZTIgfCBDaXJjbGUyOwoKZnVuY3Rpb24gd2l0aERlZmF1bHQoczE6IFNoYXBlMiwgczI6IFNoYXBlMik6IHN0cmluZyB7CiAgICBzd2l0Y2ggKHMxLmtpbmQpIHsKICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICByZXR1cm4gIjEiOwogICAgICAgIGNhc2UgImNpcmNsZSI6CiAgICAgICAgICAgIHN3aXRjaCAoczIua2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAic3F1YXJlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjIiOwogICAgICAgICAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjMiOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIm5ldmVyIjsKICAgICAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiB3aXRob3V0RGVmYXVsdChzMTogU2hhcGUyLCBzMjogU2hhcGUyKTogc3RyaW5nIHsKICAgIHN3aXRjaCAoczEua2luZCkgewogICAgICAgIGNhc2UgInNxdWFyZSI6CiAgICAgICAgICAgIHJldHVybiAiMSI7CiAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgc3dpdGNoIChzMi5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMiI7CiAgICAgICAgICAgICAgICBjYXNlICJjaXJjbGUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMyI7CiAgICAgICAgICAgIH0KICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMjA4MjMKCmZ1bmN0aW9uIHRlc3Q0KHZhbHVlOiAxIHwgMik6IHN0cmluZyB7CiAgICBsZXQgeDogc3RyaW5nOwogICAgc3dpdGNoICh2YWx1ZSkgewogICAgICAgIGNhc2UgMTogeCA9ICJvbmU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fCB7IGtpbmQ6ICJkZWYiIH07CgpmdW5jdGlvbiBmMzU0MzEoYTogQSk6IHZvaWQgewogIHN3aXRjaCAoYS5raW5kKSB7CiAgICBjYXNlICJhYmMiOgogICAgY2FzZSAiZGVmIjogcmV0dXJuOwogICAgZGVmYXVsdDoKICAgICAgYSEua2luZDsgLy8gRXJyb3IgZXhwZWN0ZWQKICB9Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionBlockShadowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionBlockShadowing.d.ts new file mode 100644 index 0000000000000..082b93d9b1494 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionBlockShadowing.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/expandoFunctionBlockShadowing.ts] //// + +//// [expandoFunctionBlockShadowing.ts] +// https://github.com/microsoft/TypeScript/issues/56538 + +export function X(): void {} +if (Math.random()) { + const X: { test?: any } = {}; + X.test = 1; +} + +export function Y(): void {} +Y.test = "foo"; +const aliasTopY = Y; +if (Math.random()) { + const Y = function Y() {} + Y.test = 42; + + const topYcheck: { (): void; test: string } = aliasTopY; + const blockYcheck: { (): void; test: number } = Y; +} + +/// [Declarations] //// + + + +//// [expandoFunctionBlockShadowing.d.ts] +export declare function X(): void; +export declare function Y(): void; +export declare namespace Y { + var test: string; +} +//# sourceMappingURL=expandoFunctionBlockShadowing.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionNestedAssigments.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionNestedAssigments.d.ts new file mode 100644 index 0000000000000..75ddf5bbb0dde --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionNestedAssigments.d.ts @@ -0,0 +1,150 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +//// [expandoFunctionNestedAssigments.ts] +function Foo(): void { + +} +let d: number = (Foo.inVariableInit = 1); + + +function bar(p: number = (Foo.inNestedFunction = 1)): void { + +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + +if(Foo.fromIf = 1) { + Foo.inIf = 1; +} + +while(Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } +} + +do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } +} while(Foo.fromDoCondition = 1); + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } +} + +for(let f of (Foo.forOf = []) ){ + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } +} + + +for(let f in (Foo.forIn = []) ){ + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } +} + +/// [Declarations] //// + + + +//// [expandoFunctionNestedAssigments.d.ts] +declare function Foo(): void; +declare namespace Foo { + var inVariableInit: number; + var bla: { + foo: number; + }; + var baz: number; + var bar: number; + var fromIf: number; + var inIf: number; + var fromWhileCondition: number; + var fromWhileBody: number; + var fromWhileBodyNested: number; + var fromDoBody: number; + var fromDoBodyNested: number; + var fromDoCondition: number; + var forInit: number; + var forCond: number; + var fromForBody: number; + var fromForBodyNested: number; + var forIncr: number; + var forOf: any[]; + var fromForOfBody: number; + var fromForOfBodyNested: number; + var forIn: any[]; + var fromForInBody: number; + var fromForInBodyNested: number; +} +declare let d: number; +declare function bar(p?: number): void; +//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map +/// [Errors] //// + +expandoFunctionNestedAssigments.ts(7,31): error TS2339: Property 'inNestedFunction' does not exist on type 'typeof Foo'. + + +==== expandoFunctionNestedAssigments.ts (1 errors) ==== + function Foo(): void { + + } + let d: number = (Foo.inVariableInit = 1); + + + function bar(p: number = (Foo.inNestedFunction = 1)): void { + ~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'inNestedFunction' does not exist on type 'typeof Foo'. + + } + + (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + + if(Foo.fromIf = 1) { + Foo.inIf = 1; + } + + while(Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } + } + + do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } + } while(Foo.fromDoCondition = 1); + + for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } + } + + for(let f of (Foo.forOf = []) ){ + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } + } + + + for(let f in (Foo.forIn = []) ){ + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentMembersVisibleInAugmentation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentMembersVisibleInAugmentation.d.ts new file mode 100644 index 0000000000000..2174b7d8581d8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentMembersVisibleInAugmentation.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts] //// + +//// [index.d.ts] +export = foo; +declare namespace foo { + export type T = number; +} + +//// [a.ts] +import * as foo from "foo"; +declare module "foo" { + export function f(): T; // OK +} + +//// [b.ts] +import * as foo from "foo"; +declare module "foo" { + export function g(): foo.T; // OK +} + + +/// [Declarations] //// + + + +//// [/b.d.ts] +import * as foo from "foo"; +declare module "foo" { + function g(): foo.T; +} +//# sourceMappingURL=b.d.ts.map +/// [Errors] //// + +/a.ts(3,26): error TS4060: Return type of exported function has or is using private name 'T'. + + +==== /node_modules/foo/index.d.ts (0 errors) ==== + export = foo; + declare namespace foo { + export type T = number; + } + +==== /a.ts (1 errors) ==== + import * as foo from "foo"; + declare module "foo" { + export function f(): T; // OK + ~ +!!! error TS4060: Return type of exported function has or is using private name 'T'. + } + +==== /b.ts (0 errors) ==== + import * as foo from "foo"; + declare module "foo" { + export function g(): foo.T; // OK + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts new file mode 100644 index 0000000000000..8e65254083f49 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts] //// + +//// [exportDefaultNamespace.ts] +export default function someFunc(): string { + return 'hello!'; +} + +someFunc.someProp = 'yo'; + + +/// [Declarations] //// + + + +//// [exportDefaultNamespace.d.ts] +declare function someFunc(): string; +declare namespace someFunc { + var someProp: string; +} +export default someFunc; +//# sourceMappingURL=exportDefaultNamespace.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/fakeInfinity2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/fakeInfinity2.d.ts new file mode 100644 index 0000000000000..f1d7e01374fce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/fakeInfinity2.d.ts @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/fakeInfinity2.ts] //// + +//// [fakeInfinity2.ts] +export enum Foo { + A = 1e999, + B = -1e999, +} + +namespace X { + type A = 1e999; + type B = 2e999; + + export function f(): A { + throw new Error() + } +} + +export const m: Infinity = X.f(); + + +/// [Declarations] //// + + +/// [Errors] //// + +fakeInfinity2.ts(15,17): error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? +fakeInfinity2.ts(15,17): error TS4025: Exported variable 'm' has or is using private name 'Infinity'. + + +==== fakeInfinity2.ts (2 errors) ==== + export enum Foo { + A = 1e999, + B = -1e999, + } + + namespace X { + type A = 1e999; + type B = 2e999; + + export function f(): A { + throw new Error() + } + } + + export const m: Infinity = X.f(); + ~~~~~~~~ +!!! error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? + ~~~~~~~~ +!!! error TS4025: Exported variable 'm' has or is using private name 'Infinity'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/fakeInfinity3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/fakeInfinity3.d.ts new file mode 100644 index 0000000000000..0f61fe3356f4c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/fakeInfinity3.d.ts @@ -0,0 +1,54 @@ +//// [tests/cases/compiler/fakeInfinity3.ts] //// + +//// [fakeInfinity3.ts] +export enum Foo { + A = 1e999, + B = -1e999, +} + +namespace X { + type A = 1e999; + type B = 2e999; + + export function f(): A { + throw new Error() + } +} + +export const m: Infinity = X.f(); + +export const Infinity = "oops"; + + +/// [Declarations] //// + + +/// [Errors] //// + +fakeInfinity3.ts(15,17): error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? +fakeInfinity3.ts(15,17): error TS4025: Exported variable 'm' has or is using private name 'Infinity'. + + +==== fakeInfinity3.ts (2 errors) ==== + export enum Foo { + A = 1e999, + B = -1e999, + } + + namespace X { + type A = 1e999; + type B = 2e999; + + export function f(): A { + throw new Error() + } + } + + export const m: Infinity = X.f(); + ~~~~~~~~ +!!! error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? + ~~~~~~~~ +!!! error TS4025: Exported variable 'm' has or is using private name 'Infinity'. + + export const Infinity = "oops"; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/flatArrayNoExcessiveStackDepth.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/flatArrayNoExcessiveStackDepth.d.ts.map new file mode 100644 index 0000000000000..d2a0fc2a34c43 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/flatArrayNoExcessiveStackDepth.d.ts.map @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts] //// + +//// [flatArrayNoExcessiveStackDepth.ts] +// Repro from #43493 + +declare const foo: unknown[]; +const bar: string[] = foo.flatMap(bar => bar as Foo); + +interface Foo extends Array {} + +// Repros from comments in #43249 + +const repro_43249 = (value: unknown): void => { + if (typeof value !== "string") { + throw new Error("No"); + } + const match = value.match(/anything/) || []; + const [, extracted] = match; +}; + +function f(x: FlatArray, y: FlatArray): void { + x = y; + y = x; // Error +} + + +/// [Declarations] //// + + + +//// [flatArrayNoExcessiveStackDepth.d.ts] +declare const foo: unknown[]; +declare const bar: string[]; +interface Foo extends Array { +} +declare const repro_43249: (value: unknown) => void; +declare function f(x: FlatArray, y: FlatArray): void; +//# sourceMappingURL=flatArrayNoExcessiveStackDepth.d.ts.map + +/// [Declarations Maps] //// + + +//// [flatArrayNoExcessiveStackDepth.d.ts.map] +{"version":3,"file":"flatArrayNoExcessiveStackDepth.d.ts","sourceRoot":"","sources":["flatArrayNoExcessiveStackDepth.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,MAAM,EAAmC,CAAC;AAErD,UAAU,GAAI,SAAQ,KAAK,CAAC,MAAM,CAAC;CAAG;AAItC,QAAA,MAAM,WAAW,UAAW,OAAO,KAAG,IAMrC,CAAC;AAEF,iBAAS,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,CAGpF"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25z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Vwcm8gZnJvbSAjNDM0OTMKCmRlY2xhcmUgY29uc3QgZm9vOiB1bmtub3duW107CmNvbnN0IGJhcjogc3RyaW5nW10gPSBmb28uZmxhdE1hcChiYXIgPT4gYmFyIGFzIEZvbyk7CgppbnRlcmZhY2UgRm9vIGV4dGVuZHMgQXJyYXk8c3RyaW5nPiB7fQoKLy8gUmVwcm9zIGZyb20gY29tbWVudHMgaW4gIzQzMjQ5Cgpjb25zdCByZXByb180MzI0OSA9ICh2YWx1ZTogdW5rbm93bik6IHZvaWQgPT4gewogICAgaWYgKHR5cGVvZiB2YWx1ZSAhPT0gInN0cmluZyIpIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIk5vIik7CiAgICB9CiAgICBjb25zdCBtYXRjaCA9IHZhbHVlLm1hdGNoKC9hbnl0aGluZy8pIHx8IFtdOwogICAgY29uc3QgWywgZXh0cmFjdGVkXSA9IG1hdGNoOwp9OwoKZnVuY3Rpb24gZjxBcnIsIEQgZXh0ZW5kcyBudW1iZXI+KHg6IEZsYXRBcnJheTxBcnIsIGFueT4sIHk6IEZsYXRBcnJheTxBcnIsIEQ+KTogdm9pZCB7CiAgICB4ID0geTsKICAgIHkgPSB4OyAgLy8gRXJyb3IKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericContextualTypes1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericContextualTypes1.d.ts.map new file mode 100644 index 0000000000000..3c7110ebf4506 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericContextualTypes1.d.ts.map @@ -0,0 +1,101 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts] //// + +//// [genericContextualTypes1.ts] +type Box = { value: T }; + +declare function wrap(f: (a: A) => B): (a: A) => B; + +declare function compose(f: (a: A) => B, g: (b: B) => C): (a: A) => C; + +declare function list(a: T): T[]; + +declare function unlist(a: T[]): T; + +declare function box(x: V): Box; + +declare function unbox(x: Box): W; + +declare function map(a: T[], f: (x: T) => U): U[]; + +declare function identity(x: T): T; + +declare function zip(a: A, b: B): [A, B]; + +declare function flip(f: (x: X, y: Y) => Z): (y: Y, x: X) => Z; + +const f00: (x: A) => A[] = list; +const f01: (x: A) => A[] = x => [x]; +const f02: (x: A) => A[] = wrap(list); +const f03: (x: A) => A[] = wrap(x => [x]); + +const f10: (x: T) => Box = compose(a => list(a), b => box(b)); +const f11: (x: T) => Box = compose(list, box); +const f12: (x: Box) => T = compose(a => unbox(a), b => unlist(b)); +const f13: (x: Box) => T = compose(unbox, unlist); + +const arrayMap = (f: (x: T) => U): (a: T[]) => U[] => (a: T[]) => a.map(f); +const arrayFilter = (f: (x: T) => boolean): (a: T[]) => T[] => (a: T[]) => a.filter(f); + +const f20: (a: string[]) => number[] = arrayMap(x => x.length); +const f21: (a: A[]) => A[][] = arrayMap(x => [x]); +const f22: (a: A[]) => A[] = arrayMap(identity); +const f23: (a: A[]) => Box[] = arrayMap(value => ({ value })); + +const f30: (a: string[]) => string[] = arrayFilter(x => x.length > 10); +const f31: >(a: T[]) => T[] = arrayFilter(x => x.value > 10); + +const f40: (b: B, a: A) => [A, B] = flip(zip); + +// Repro from #16293 + +type fn = (a: A) => A; +const fn: fn = a => a; + + +/// [Declarations] //// + + + +//// [genericContextualTypes1.d.ts] +type Box = { + value: T; +}; +declare function wrap(f: (a: A) => B): (a: A) => B; +declare function compose(f: (a: A) => B, g: (b: B) => C): (a: A) => C; +declare function list(a: T): T[]; +declare function unlist(a: T[]): T; +declare function box(x: V): Box; +declare function unbox(x: Box): W; +declare function map(a: T[], f: (x: T) => U): U[]; +declare function identity(x: T): T; +declare function zip(a: A, b: B): [A, B]; +declare function flip(f: (x: X, y: Y) => Z): (y: Y, x: X) => Z; +declare const f00: (x: A) => A[]; +declare const f01: (x: A) => A[]; +declare const f02: (x: A) => A[]; +declare const f03: (x: A) => A[]; +declare const f10: (x: T) => Box; +declare const f11: (x: T) => Box; +declare const f12: (x: Box) => T; +declare const f13: (x: Box) => T; +declare const arrayMap: (f: (x: T) => U) => (a: T[]) => U[]; +declare const arrayFilter: (f: (x: T) => boolean) => (a: T[]) => T[]; +declare const f20: (a: string[]) => number[]; +declare const f21: (a: A[]) => A[][]; +declare const f22: (a: A[]) => A[]; +declare const f23: (a: A[]) => Box[]; +declare const f30: (a: string[]) => string[]; +declare const f31: >(a: T[]) => T[]; +declare const f40: (b: B, a: A) => [A, B]; +type fn = (a: A) => A; +declare const fn: fn; +//# sourceMappingURL=genericContextualTypes1.d.ts.map + +/// [Declarations Maps] //// + + +//// [genericContextualTypes1.d.ts.map] +{"version":3,"file":"genericContextualTypes1.d.ts","sourceRoot":"","sources":["genericContextualTypes1.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAE3B,OAAO,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEzD,OAAO,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAE/E,OAAO,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;AAEpC,OAAO,UAAU,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;AAEtC,OAAO,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAEtC,OAAO,UAAU,KAAK,CAAC,CAAC,EAAE,CAAC,E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MDogKGE6IHN0cmluZ1tdKSA9PiBudW1iZXJbXSA9IGFycmF5TWFwKHggPT4geC5sZW5ndGgpOwpjb25zdCBmMjE6IDxBPihhOiBBW10pID0+IEFbXVtdID0gYXJyYXlNYXAoeCA9PiBbeF0pOwpjb25zdCBmMjI6IDxBPihhOiBBW10pID0+IEFbXSA9IGFycmF5TWFwKGlkZW50aXR5KTsKY29uc3QgZjIzOiA8QT4oYTogQVtdKSA9PiBCb3g8QT5bXSA9IGFycmF5TWFwKHZhbHVlID0+ICh7IHZhbHVlIH0pKTsKCmNvbnN0IGYzMDogKGE6IHN0cmluZ1tdKSA9PiBzdHJpbmdbXSA9IGFycmF5RmlsdGVyKHggPT4geC5sZW5ndGggPiAxMCk7CmNvbnN0IGYzMTogPFQgZXh0ZW5kcyBCb3g8bnVtYmVyPj4oYTogVFtdKSA9PiBUW10gPSBhcnJheUZpbHRlcih4ID0+IHgudmFsdWUgPiAxMCk7Cgpjb25zdCBmNDA6IDxBLCBCPihiOiBCLCBhOiBBKSA9PiBbQSwgQl0gPSBmbGlwKHppcCk7CgovLyBSZXBybyBmcm9tICMxNjI5MwoKdHlwZSBmbiA9IDxBPihhOiBBKSA9PiBBOwpjb25zdCBmbjogZm4gPSBhID0+IGE7Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericDefaultsErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericDefaultsErrors.d.ts new file mode 100644 index 0000000000000..3de9883f07830 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericDefaultsErrors.d.ts @@ -0,0 +1,172 @@ +//// [tests/cases/compiler/genericDefaultsErrors.ts] //// + +//// [genericDefaultsErrors.ts] +declare const x: any; + +declare function f03(): void; // error +declare function f04(): void; // error +declare function f05(): void; // error +declare function f06(): void; // error + +declare function f11(): void; +f11(); // ok +f11<1>(); // error +f11<1, 2>(); // ok +f11<1, 2, 3>(); // ok +f11<1, 2, 3, 4>(); // error + +declare function f12(a?: U): void; +f12(); // ok +f12("a"); // error + +interface i00 { } // ok +interface i00 { } // error + +interface i01 { } // ok +interface i01 { } // error + +interface i04 { } // error +interface i05 { } // error +interface i06 { } // error +interface i07 { } // error +interface i08 { } // error + +interface i09 { } +type i09t00 = i09; // error +type i09t01 = i09<1>; // error +type i09t02 = i09<1, 2>; // ok +type i09t03 = i09<1, 2, 3>; // ok +type i09t04 = i09<1, 2, 3, 4>; // error + +interface i10 { x: T; } // error +interface i10 {} + +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference {} + +/// [Declarations] //// + + +/// [Errors] //// + +genericDefaultsErrors.ts(3,41): error TS2344: Type 'number' does not satisfy the constraint 'string'. +genericDefaultsErrors.ts(4,59): error TS2344: Type 'T' does not satisfy the constraint 'number'. + Type 'string' is not assignable to type 'number'. +genericDefaultsErrors.ts(5,44): error TS2344: Type 'T' does not satisfy the constraint 'number'. +genericDefaultsErrors.ts(6,39): error TS2344: Type 'number' does not satisfy the constraint 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +genericDefaultsErrors.ts(10,5): error TS2558: Expected 2-3 type arguments, but got 1. +genericDefaultsErrors.ts(13,5): error TS2558: Expected 2-3 type arguments, but got 4. +genericDefaultsErrors.ts(17,13): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +genericDefaultsErrors.ts(19,11): error TS2428: All declarations of 'i00' must have identical type parameters. +genericDefaultsErrors.ts(20,11): error TS2428: All declarations of 'i00' must have identical type parameters. +genericDefaultsErrors.ts(22,11): error TS2428: All declarations of 'i01' must have identical type parameters. +genericDefaultsErrors.ts(23,11): error TS2428: All declarations of 'i01' must have identical type parameters. +genericDefaultsErrors.ts(25,27): error TS2706: Required type parameters may not follow optional type parameters. +genericDefaultsErrors.ts(26,34): error TS2344: Type 'number' does not satisfy the constraint 'string'. +genericDefaultsErrors.ts(27,52): error TS2344: Type 'T' does not satisfy the constraint 'number'. + Type 'string' is not assignable to type 'number'. +genericDefaultsErrors.ts(28,37): error TS2344: Type 'T' does not satisfy the constraint 'number'. +genericDefaultsErrors.ts(29,32): error TS2344: Type 'number' does not satisfy the constraint 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +genericDefaultsErrors.ts(32,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +genericDefaultsErrors.ts(33,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +genericDefaultsErrors.ts(36,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +genericDefaultsErrors.ts(38,20): error TS2304: Cannot find name 'T'. +genericDefaultsErrors.ts(38,20): error TS4033: Property 'x' of exported interface has or is using private name 'T'. +genericDefaultsErrors.ts(42,29): error TS2716: Type parameter 'T' has a circular default. + + +==== genericDefaultsErrors.ts (22 errors) ==== + declare const x: any; + + declare function f03(): void; // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. + declare function f04(): void; // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' is not assignable to type 'number'. + declare function f05(): void; // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! related TS2208 genericDefaultsErrors.ts:5:22: This type parameter might need an `extends number` constraint. + declare function f06(): void; // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'T'. +!!! error TS2344: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + declare function f11(): void; + f11(); // ok + f11<1>(); // error + ~ +!!! error TS2558: Expected 2-3 type arguments, but got 1. + f11<1, 2>(); // ok + f11<1, 2, 3>(); // ok + f11<1, 2, 3, 4>(); // error + ~~~~~~~~~~ +!!! error TS2558: Expected 2-3 type arguments, but got 4. + + declare function f12(a?: U): void; + f12(); // ok + f12("a"); // error + ~~~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + + interface i00 { } // ok + ~~~ +!!! error TS2428: All declarations of 'i00' must have identical type parameters. + interface i00 { } // error + ~~~ +!!! error TS2428: All declarations of 'i00' must have identical type parameters. + + interface i01 { } // ok + ~~~ +!!! error TS2428: All declarations of 'i01' must have identical type parameters. + interface i01 { } // error + ~~~ +!!! error TS2428: All declarations of 'i01' must have identical type parameters. + + interface i04 { } // error + ~ +!!! error TS2706: Required type parameters may not follow optional type parameters. + interface i05 { } // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. + interface i06 { } // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' is not assignable to type 'number'. + interface i07 { } // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! related TS2208 genericDefaultsErrors.ts:28:15: This type parameter might need an `extends number` constraint. + interface i08 { } // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'T'. +!!! error TS2344: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + interface i09 { } + type i09t00 = i09; // error + ~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + type i09t01 = i09<1>; // error + ~~~~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + type i09t02 = i09<1, 2>; // ok + type i09t03 = i09<1, 2, 3>; // ok + type i09t04 = i09<1, 2, 3, 4>; // error + ~~~~~~~~~~~~~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + + interface i10 { x: T; } // error + ~ +!!! error TS2304: Cannot find name 'T'. + ~ +!!! error TS4033: Property 'x' of exported interface has or is using private name 'T'. + interface i10 {} + + // https://github.com/Microsoft/TypeScript/issues/16221 + interface SelfReference {} + ~~~~~~~~~~~~~ +!!! error TS2716: Type parameter 'T' has a circular default. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/giant.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/giant.d.ts new file mode 100644 index 0000000000000..f796ebbce7158 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/giant.d.ts @@ -0,0 +1,2408 @@ +//// [tests/cases/compiler/giant.ts] //// + +//// [giant.ts] +/* + Prefixes + p -> public + r -> private + i -> import + e -> export + a -> ambient + t -> static + s -> set + g -> get + + MAX DEPTH 3 LEVELS +*/ +var V; +function F() { }; +class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() +} +interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; +} +module M { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export declare module eaM { + var V; + function F() { }; + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + } +} +export var eV: any; +export function eF(): void { }; +export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + public get pgF(): any + public psF(param:any): void { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + static set tsF(param:any) + static tgF(): void { } + static get tgF(): any +} +export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; +} +export module eM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export var eV: any; + export function eF(): void { }; + export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + public get pgF(): any + public psF(param:any): void { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + static set tsF(param:any) + static tgF(): void { } + static get tgF(): any + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV: any; + export function eF(): void { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV: any; + export declare function eaF(): void { }; + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV: any; + export declare function eaF(): void { }; + export declare class eaC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + public get pgF(): any + public psF(param:any): void { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + static set tsF(param:any) + static tgF(): void { } + static get tgF(): any + } + export declare module eaM { + var V: any; + function F(): void { }; + class C { } + interface I { } + module M { } + export var eV: any; + export function eF(): void { }; + export class eC { } + export interface eI { } + export module eM { } + } +} +export declare var eaV: any; +export declare function eaF(): void { }; +export declare class eaC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + public get pgF(): any + public psF(param:any): void { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + static set tsF(param:any) + static tgF(): void { } + static get tgF(): any +} +export declare module eaM { + var V: any; + function F(): void { }; + class C { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + static tV: any; + static tF(): void { } + } + interface I { + //Call Signature + (); + (): number; + (p: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + } + module M { + var V: any; + function F(): void { }; + class C { } + interface I { } + module M { } + export var eV: any; + export function eF(): void { }; + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV: any + export declare function eaF(): void { }; + export declare class eaC { } + export declare module eaM { } + } + export var eV: any; + export function eF(): void { }; + export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + static tV: any + static tF(): void { } + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + } + export module eM { + var V: any; + function F(): void { }; + class C { } + module M { } + export var eV: any; + export function eF(): void { }; + export class eC { } + export interface eI { } + export module eM { } + } +} + +/// [Declarations] //// + + + +//// [giant.d.ts] +export declare var eV: any; +export declare function eF(): void; +export declare class eC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF; + pgF(): void; + get pgF(): any; + psF(param: any): void; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: any; + static tF(): void; + static tsF(param: any): void; + static set tsF(param: any); + static tgF(): void; + static get tgF(): any; +} +export interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; +} +export declare namespace eM { + var eV: any; + function eF(): void; + class eC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF; + pgF(): void; + get pgF(): any; + psF(param: any): void; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: any; + static tF(): void; + static tsF(param: any): void; + static set tsF(param: any); + static tgF(): void; + static get tgF(): any; + } + interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + namespace eM { + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + namespace eM { } + var eaV: any; + function eaF(): void; + class eaC { + } + namespace eaM { } + } + var eaV: any; + function eaF(): void; + class eaC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF; + pgF(): void; + get pgF(): any; + psF(param: any): void; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: any; + static tF(): void; + static tsF(param: any): void; + static set tsF(param: any); + static tgF(): void; + static get tgF(): any; + } + namespace eaM { + var V: any; + function F(): void; + class C { + } + interface I { + } + namespace M { } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + namespace eM { } + } +} +export declare var eaV: any; +export declare function eaF(): void; +export declare class eaC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF; + pgF(): void; + get pgF(): any; + psF(param: any): void; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: any; + static tF(): void; + static tsF(param: any): void; + static set tsF(param: any); + static tgF(): void; + static get tgF(): any; +} +export declare namespace eaM { + var V: any; + function F(): void; + class C { + constructor(); + pV: any; + private rV; + pF(): void; + static tV: any; + static tF(): void; + } + interface I { + (): any; + (): number; + (p: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + namespace M { + var V: any; + function F(): void; + class C { + } + interface I { + } + namespace M { } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + namespace eM { } + var eaV: any; + function eaF(): void; + class eaC { + } + namespace eaM { } + } + var eV: any; + function eF(): void; + class eC { + constructor(); + pV: any; + private rV; + pF(): void; + static tV: any; + static tF(): void; + } + interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + namespace eM { + var V: any; + function F(): void; + class C { + } + namespace M { } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + namespace eM { } + } +} +//# sourceMappingURL=giant.d.ts.map +/// [Errors] //// + +giant.ts(22,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(23,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(23,20): error TS1005: '{' expected. +giant.ts(24,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(25,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(25,29): error TS1005: '{' expected. +giant.ts(26,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(27,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(27,21): error TS1005: '{' expected. +giant.ts(28,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(29,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(29,30): error TS1005: '{' expected. +giant.ts(32,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(33,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(33,29): error TS1005: '{' expected. +giant.ts(34,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(35,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(35,20): error TS1005: '{' expected. +giant.ts(60,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(60,6): error TS2304: Cannot find name 'p'. +giant.ts(61,5): error TS1021: An index signature must have a type annotation. +giant.ts(62,6): error TS1096: An index signature must have exactly one parameter. +giant.ts(75,5): error TS2386: Overload signatures must all be optional or required. +giant.ts(86,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(87,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(87,24): error TS1005: '{' expected. +giant.ts(88,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(89,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(89,33): error TS1005: '{' expected. +giant.ts(90,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(91,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(91,25): error TS1005: '{' expected. +giant.ts(92,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(93,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(93,34): error TS1005: '{' expected. +giant.ts(96,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(97,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(97,33): error TS1005: '{' expected. +giant.ts(98,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(99,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(99,24): error TS1005: '{' expected. +giant.ts(124,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(124,10): error TS2304: Cannot find name 'p'. +giant.ts(125,9): error TS1021: An index signature must have a type annotation. +giant.ts(126,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(139,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(153,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(165,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(166,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(166,24): error TS1005: '{' expected. +giant.ts(167,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(168,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(168,33): error TS1005: '{' expected. +giant.ts(169,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(170,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(170,25): error TS1005: '{' expected. +giant.ts(171,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(172,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(172,34): error TS1005: '{' expected. +giant.ts(175,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(176,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(176,33): error TS1005: '{' expected. +giant.ts(177,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(178,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(178,24): error TS1005: '{' expected. +giant.ts(203,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(203,10): error TS2304: Cannot find name 'p'. +giant.ts(204,9): error TS1021: An index signature must have a type annotation. +giant.ts(205,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(218,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(232,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(237,35): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(239,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(242,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(243,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(244,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(244,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(245,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(246,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(246,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(247,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(248,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(248,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(249,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(250,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(250,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(251,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(253,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(254,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(254,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(255,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(256,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(256,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(257,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(261,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(261,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(266,30): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(280,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(281,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(281,25): error TS1005: '{' expected. +giant.ts(282,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(283,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(283,29): error TS1005: '{' expected. +giant.ts(284,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(285,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(285,21): error TS1005: '{' expected. +giant.ts(286,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(287,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(287,30): error TS1005: '{' expected. +giant.ts(290,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(291,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(291,29): error TS1005: '{' expected. +giant.ts(292,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(293,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(293,25): error TS1005: '{' expected. +giant.ts(318,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(318,6): error TS2304: Cannot find name 'p'. +giant.ts(319,5): error TS1021: An index signature must have a type annotation. +giant.ts(320,6): error TS1096: An index signature must have exactly one parameter. +giant.ts(333,5): error TS2386: Overload signatures must all be optional or required. +giant.ts(344,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(345,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(345,24): error TS1005: '{' expected. +giant.ts(346,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(347,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(347,33): error TS1005: '{' expected. +giant.ts(348,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(349,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(349,25): error TS1005: '{' expected. +giant.ts(350,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(351,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(351,34): error TS1005: '{' expected. +giant.ts(354,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(355,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(355,33): error TS1005: '{' expected. +giant.ts(356,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(357,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(357,24): error TS1005: '{' expected. +giant.ts(382,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(382,10): error TS2304: Cannot find name 'p'. +giant.ts(383,9): error TS1021: An index signature must have a type annotation. +giant.ts(384,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(397,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(411,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(423,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(424,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(424,29): error TS1005: '{' expected. +giant.ts(425,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(426,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(426,33): error TS1005: '{' expected. +giant.ts(427,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(428,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(428,25): error TS1005: '{' expected. +giant.ts(429,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(430,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(430,34): error TS1005: '{' expected. +giant.ts(433,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(434,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(434,33): error TS1005: '{' expected. +giant.ts(435,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(436,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(436,29): error TS1005: '{' expected. +giant.ts(461,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(461,10): error TS2304: Cannot find name 'p'. +giant.ts(462,9): error TS1021: An index signature must have a type annotation. +giant.ts(463,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(476,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(490,45): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(495,41): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(497,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(500,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(501,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(502,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(502,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(503,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(504,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(504,37): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(505,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(506,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(506,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(507,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(508,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(508,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(509,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(511,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(512,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(512,37): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(513,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(514,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(514,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(515,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(519,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(519,31): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(524,36): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(531,37): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(533,20): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(536,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(537,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(538,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(538,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(539,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(540,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(540,33): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(541,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(542,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(542,19): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(543,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(544,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(544,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(545,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(547,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(548,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(548,33): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(549,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(550,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(550,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(551,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(555,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(555,27): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(557,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(560,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(562,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(586,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(586,10): error TS2304: Cannot find name 'p'. +giant.ts(587,9): error TS1021: An index signature must have a type annotation. +giant.ts(588,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(601,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(605,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(605,31): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(610,36): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(614,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(615,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(615,45): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(616,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(617,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(620,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(622,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(625,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(627,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(652,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(652,10): error TS2304: Cannot find name 'p'. +giant.ts(653,9): error TS1021: An index signature must have a type annotation. +giant.ts(654,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(667,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(671,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(671,31): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(675,36): error TS1183: An implementation cannot be declared in ambient contexts. + + +==== giant.ts (247 errors) ==== + /* + Prefixes + p -> public + r -> private + i -> import + e -> export + a -> ambient + t -> static + s -> set + g -> get + + MAX DEPTH 3 LEVELS + */ + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + private rV; + public pF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV; + static tF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + } + export declare module eaM { + var V; + function F() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } + export var eV: any; + export function eF(): void { }; + export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export var eV: any; + export function eF(): void { }; + export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV: any; + export function eF(): void { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV: any; + export declare function eaF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV: any; + export declare function eaF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV: any; + private rV; + public pF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public psF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV: any; + static tF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + } + export declare module eaM { + var V: any; + function F(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV: any; + export function eF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } + export declare var eaV: any; + export declare function eaF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV: any; + private rV; + public pF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public psF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV: any; + static tF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + } + export declare module eaM { + var V: any; + function F(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV: any; + private rV; + public pF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tV: any; + static tF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + interface I { + //Call Signature + (); + (): number; + (p: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V: any; + function F(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV: any; + export function eF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV: any + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + export declare function eaF(): void { }; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + export declare module eaM { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + } + export var eV: any; + export function eF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV: any; + private rV; + public pF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tV: any + static tF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V: any; + function F(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + module M { } + export var eV: any; + export function eF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/hugeDeclarationOutputGetsTruncatedWithError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/hugeDeclarationOutputGetsTruncatedWithError.d.ts new file mode 100644 index 0000000000000..479480b2407f5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/hugeDeclarationOutputGetsTruncatedWithError.d.ts @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts] //// + +//// [hugeDeclarationOutputGetsTruncatedWithError.ts] +type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; + +type manyprops = `${props}${props}`; + +export const c = null as any as {[K in manyprops]: {[K2 in manyprops]: `${K}.${K2}`}}; + +/// [Declarations] //// + + +/// [Errors] //// + +hugeDeclarationOutputGetsTruncatedWithError.ts(5,14): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. + + +==== hugeDeclarationOutputGetsTruncatedWithError.ts (1 errors) ==== + type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; + + type manyprops = `${props}${props}`; + + export const c = null as any as {[K in manyprops]: {[K2 in manyprops]: `${K}.${K2}`}}; + ~ +!!! error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/importTypeGenericArrowTypeParenthesized.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/importTypeGenericArrowTypeParenthesized.d.ts new file mode 100644 index 0000000000000..93a5d2e568919 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/importTypeGenericArrowTypeParenthesized.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/importTypeGenericArrowTypeParenthesized.ts] //// + +//// [module.d.ts] +declare module "module" { + export interface Modifier { } + + export function fn(x: T): Modifier; +} +//// [index.ts] +import { Modifier, fn } from "module"; + +export const fail1: Modifier<((x: T) => T)> = fn((x: T): T => x); +export const fail2: Modifier<((x: T) => T)> = fn(function(x: T): T { + return x; +}); + +export const works1: Modifier<(x: number) => number> = fn((x: number) => x); +type MakeItWork = (x: T) => T; +export const works2: Modifier = fn(x => x); + + +/// [Declarations] //// + + + +//// [index.d.ts] +/// +import { Modifier } from "module"; +export declare const fail1: Modifier<((x: T) => T)>; +export declare const fail2: Modifier<((x: T) => T)>; +export declare const works1: Modifier<(x: number) => number>; +type MakeItWork = (x: T) => T; +export declare const works2: Modifier; +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/indexSignatures1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/indexSignatures1.d.ts.map new file mode 100644 index 0000000000000..bd8b61a0a5be0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/indexSignatures1.d.ts.map @@ -0,0 +1,548 @@ +//// [tests/cases/conformance/types/members/indexSignatures1.ts] //// + +//// [indexSignatures1.ts] +// Symbol index signature checking + +const sym: unique symbol = Symbol(); + +function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [sym]: number }): void { + x = z; + y = z; // Error +} + +// Overlapping index signatures + +function gg1(x: { [key: `a${string}`]: string, [key: `${string}a`]: string }, y: { [key: `a${string}a`]: string }): void { + x = y; + y = x; +} + +interface IX { [key: `a${string}`]: string, [key: `${string}a`]: string } +interface IY { [key: `a${string}a`]: string } + +function gg2(x: IX, y: IY): void { + x = y; // Error + y = x; +} + +// Intersection of multiple applicable index signatures + +declare let combo: { [x: `foo-${string}`]: 'a' | 'b' } & { [x: `${string}-bar`]: 'b' | 'c' }; +const x1: "a" | "b" = combo['foo-test']; // 'a' | 'b' +const x2: "b" | "c" = combo['test-bar']; // 'b' | 'c' +const x3: "b" = combo['foo-test-bar']; // 'b' (('a' | 'b') & ('b' | 'c')) + +declare var str: string; + +const x4: "a" | "b" = combo[`foo-${str}`]; +const x5: "b" | "c" = combo[`${str}-bar`]; +const x6: "b" = combo[`foo-${str}-bar`]; + +declare let combo2: { [x: `${string}xxx${string}` & `${string}yyy${string}`]: string }; + +const x7: string = combo2['axxxbyyyc']; +const x8: string = combo2['ayyyxxxbc']; +const x9: any = combo2['axxxbbbyc']; // Error + +// Property access on template pattern index signature + +declare let dom: { [x: `data${string}`]: string }; +const y1: string = dom['data123']; +const y2: string = dom.data123; + +// Excess property checking for template pattern index signature + +dom = { data123: 'hello' }; +dom = { date123: 'hello' }; // Error + +// Contextual typing by index signature with template literal pattern + +type Funcs = { + [key: `s${string}`]: (x: string) => void, + [key: `n${string}`]: (x: number) => void, +} + +const funcs: Funcs = { + sfoo: x => x.length, // x: string + nfoo: x => x * 2, // n: number +} + +// Duplicate index signature checking + +type Duplicates = { + [key: string | number]: any; // Error + [key: number | symbol]: any; // Error + [key: symbol | `foo${string}`]: any; // Error + [key: `foo${string}`]: any; // Error +} + +// Conflicting index signature checking + +type Conflicting = { + [key: `a${string}`]: 'a'; + [key: `${string}a`]: 'b'; + [key: `a${string}a`]: 'c'; // Error +} + +// Invalid index signatures + +type Invalid = { + [key: 'a' | 'b' | 'c']: string; // Error + [key: T | number]: string; // Error + [key: Error]: string; // Error + [key: T & string]: string; // Error +} + +// Intersections in index signatures + +type Tag1 = { __tag1__: void }; +type Tag2 = { __tag2__: void }; + +type TaggedString1 = string & Tag1; +type TaggedString2 = string & Tag2; + +declare let s0: string; +declare let s1: TaggedString1; +declare let s2: TaggedString2; +declare let s3: TaggedString1 | TaggedString2; +declare let s4: TaggedString1 & TaggedString2; + +interface I1 { [key: TaggedString1]: string } +interface I2 { [key: TaggedString2]: string } +interface I3 { [key: TaggedString1 | TaggedString2]: string } +interface I4 { [key: TaggedString1 & TaggedString2]: string } + +declare let i1: I1; +declare let i2: I2; +declare let i3: I3; +declare let i4: I4; + +i1[s0]; // Error +i1[s1]; +i1[s2]; // Error +i1[s3]; // Error +i1[s4]; + +i2[s0]; // Error +i2[s1]; // Error +i2[s2]; +i2[s3]; // Error +i2[s4]; + +i3[s0]; // Error +i3[s1]; +i3[s2]; +i3[s3]; +i3[s4]; + +i4[s0]; // Error +i4[s1]; // Error +i4[s2]; // Error +i4[s3]; // Error +i4[s4]; + +i1 = i2; // Error +i1 = i3; +i1 = i4; // Error + +i2 = i1; // Error +i2 = i3; +i2 = i4; // Error + +i3 = i1; // Error +i3 = i2; // Error +i3 = i4; // Error + +i4 = i1; +i4 = i2; +i4 = i3; + +declare let o1: { [key: TaggedString1]: string }; +declare let o2: { [key: TaggedString2]: string }; +declare let o3: { [key: TaggedString1 | TaggedString2]: string }; +declare let o4: { [key: TaggedString1 & TaggedString2]: string }; + +o1[s0]; // Error +o1[s1]; +o1[s2]; // Error +o1[s3]; // Error +o1[s4]; + +o2[s0]; // Error +o2[s1]; // Error +o2[s2]; +o2[s3]; // Error +o2[s4]; + +o3[s0]; // Error +o3[s1]; +o3[s2]; +o3[s3]; +o3[s4]; + +o4[s0]; // Error +o4[s1]; // Error +o4[s2]; // Error +o4[s3]; // Error +o4[s4]; + +o1 = o2; +o1 = o3; +o1 = o4; + +o2 = o1; +o2 = o3; +o2 = o4; + +o3 = o1; +o3 = o2; +o3 = o4; + +o4 = o1; +o4 = o2; +o4 = o3; + +// Index signatures inferred from computed property names + +const obj10: { + [x: string]: 0 | 1; + x: 0; +} = { + ['x']: 0 as const, + ['a' + 'b']: 1 as const, +}; + +const obj11: { + [x: number]: 2 | 3; + 1: 2; +} = { + [1]: 2 as const, + [1 + 2]: 3 as const, +}; + +const obj12: { + [x: symbol]: 4 | 5; + [sym]: 4; +} = { + [sym]: 4 as const, + [Symbol()]: 5 as const, +}; + +const obj13: { + [x: string]: 0 | 2 | 1 | 3; + [x: number]: 2 | 3; + [x: symbol]: 4 | 5; + x: 0; + 1: 2; + [sym]: 4; +} = { + ['x']: 0 as const, + ['a' + 'b']: 1 as const, + [1]: 2 as const, + [1 + 2]: 3 as const, + [sym]: 4 as const, + [Symbol()]: 5 as const, +}; + +// Repros from #1863 + +const system: unique symbol = Symbol('system'); +const SomeSytePlugin: unique symbol = Symbol('SomeSytePlugin'); + +interface Plugs { + [key: symbol]: (...args: any) => unknown; +} + +const plugins = { + "user": {} as Plugs, + [system]: {} as Plugs +}; + +plugins[system][SomeSytePlugin] = () => console.log('awsome'); +plugins[system][SomeSytePlugin](); + +var theAnswer: symbol = Symbol('secret'); +var obj = {} as Record; +obj[theAnswer] = 42; + +// Repro from #26470 + +const directive: unique symbol = Symbol('directive'); +declare function foo(options: { [x in string]: (arg: TArg) => TRet } & { [directive]?: TDir }): void; + +let case1: void = foo({ + [directive]: (x: string) => 'str', + addOne: (x: number) => x + 1, + double: (x: number) => x + x, +}); + +let case2: void = foo({ + addOne: (x: number) => x + 1, + double: (x: number) => x + x, + [directive]: (x: string) => 'str', +}); + +let case3: void = foo({ + [directive]: 'str', + addOne: (x: number) => x + 1, + double: (x: number) => x + x, +}); + +// Repros from #42192 + +type Pseudo = `&:${string}`; + +const AmIPseudo1: Pseudo = '&:test'; +const AmIPseudo: Pseudo = '&'; // Error + +type PseudoDeclaration = { [key in Pseudo]: string }; + +const test: PseudoDeclaration = { 'someKey' : 'someValue' }; // Error + +type FieldPattern = `/${string}`; + +const path1: FieldPattern = '/one'; +const path2: FieldPattern = 'two'; // Error + +type PathsObject = { [P in FieldPattern]: object; }; +const pathObject: PathsObject = 123; // Error + +type IdType = `${number}-${number}-${number}-${number}` +const id: IdType = '0000-0000-0000-0001'; + +type A = Record; + +const a: A = { [id]: 'test' } + +let aid: string = a[id]; + +// Repro from #44793 + +interface AA { + a?: string; + b?: number; + [key: symbol]: string; +} + +const aa: AA = { [sym]: '123' }; + +const obj1: { [key: symbol]: string } = { [sym]: 'hello '}; +const obj2: { [key: string]: string } = { [sym]: 'hello '}; // Permitted for backwards compatibility +const obj3: { [key: number]: string } = { [sym]: 'hello '}; // Error + +// Repro from #45772 + +type Id = string & { __tag: 'id '}; +type Rec1 = { [key: Id]: number }; +type Rec2 = Record; + +type K1 = keyof Rec1; // Id +type K2 = keyof Rec2; // Id + + +/// [Declarations] //// + + + +//// [indexSignatures1.d.ts] +declare const sym: unique symbol; +declare function gg3(x: { + [key: string]: string; +}, y: { + [key: symbol]: string; +}, z: { + [sym]: number; +}): void; +declare function gg1(x: { + [key: `a${string}`]: string; + [key: `${string}a`]: string; +}, y: { + [key: `a${string}a`]: string; +}): void; +interface IX { + [key: `a${string}`]: string; + [key: `${string}a`]: string; +} +interface IY { + [key: `a${string}a`]: string; +} +declare function gg2(x: IX, y: IY): void; +declare let combo: { + [x: `foo-${string}`]: 'a' | 'b'; +} & { + [x: `${string}-bar`]: 'b' | 'c'; +}; +declare const x1: "a" | "b"; +declare const x2: "b" | "c"; +declare const x3: "b"; +declare var str: string; +declare const x4: "a" | "b"; +declare const x5: "b" | "c"; +declare const x6: "b"; +declare let combo2: { + [x: `${string}xxx${string}` & `${string}yyy${string}`]: string; +}; +declare const x7: string; +declare const x8: string; +declare const x9: any; +declare let dom: { + [x: `data${string}`]: string; +}; +declare const y1: string; +declare const y2: string; +type Funcs = { + [key: `s${string}`]: (x: string) => void; + [key: `n${string}`]: (x: number) => void; +}; +declare const funcs: Funcs; +type Duplicates = { + [key: string | number]: any; + [key: number | symbol]: any; + [key: symbol | `foo${string}`]: any; + [key: `foo${string}`]: any; +}; +type Conflicting = { + [key: `a${string}`]: 'a'; + [key: `${string}a`]: 'b'; + [key: `a${string}a`]: 'c'; +}; +type Invalid = { + [key: 'a' | 'b' | 'c']: string; + [key: T | number]: string; + [key: Error]: string; + [key: T & string]: string; +}; +type Tag1 = { + __tag1__: void; +}; +type Tag2 = { + __tag2__: void; +}; +type TaggedString1 = string & Tag1; +type TaggedString2 = string & Tag2; +declare let s0: string; +declare let s1: TaggedString1; +declare let s2: TaggedString2; +declare let s3: TaggedString1 | TaggedString2; +declare let s4: TaggedString1 & TaggedString2; +interface I1 { + [key: TaggedString1]: string; +} +interface I2 { + [key: TaggedString2]: string; +} +interface I3 { + [key: TaggedString1 | TaggedString2]: string; +} +interface I4 { + [key: TaggedString1 & TaggedString2]: string; +} +declare let i1: I1; +declare let i2: I2; +declare let i3: I3; +declare let i4: I4; +declare let o1: { + [key: TaggedString1]: string; +}; +declare let o2: { + [key: TaggedString2]: string; +}; +declare let o3: { + [key: TaggedString1 | TaggedString2]: string; +}; +declare let o4: { + [key: TaggedString1 & TaggedString2]: string; +}; +declare const obj10: { + [x: string]: 0 | 1; + x: 0; +}; +declare const obj11: { + [x: number]: 2 | 3; + 1: 2; +}; +declare const obj12: { + [x: symbol]: 4 | 5; + [sym]: 4; +}; +declare const obj13: { + [x: string]: 0 | 2 | 1 | 3; + [x: number]: 2 | 3; + [x: symbol]: 4 | 5; + x: 0; + 1: 2; + [sym]: 4; +}; +declare const system: unique symbol; +declare const SomeSytePlugin: unique symbol; +interface Plugs { + [key: symbol]: (...args: any) => unknown; +} +declare const plugins: { + user: Plugs; + [system]: Plugs; +}; +declare var theAnswer: symbol; +declare var obj: Record; +declare const directive: unique symbol; +declare function foo(options: { + [x in string]: (arg: TArg) => TRet; +} & { + [directive]?: TDir; +}): void; +declare let case1: void; +declare let case2: void; +declare let case3: void; +type Pseudo = `&:${string}`; +declare const AmIPseudo1: Pseudo; +declare const AmIPseudo: Pseudo; +type PseudoDeclaration = { + [key in Pseudo]: string; +}; +declare const test: PseudoDeclaration; +type FieldPattern = `/${string}`; +declare const path1: FieldPattern; +declare const path2: FieldPattern; +type PathsObject = { + [P in FieldPattern]: object; +}; +declare const pathObject: PathsObject; +type IdType = `${number}-${number}-${number}-${number}`; +declare const id: IdType; +type A = Record; +declare const a: A; +declare let aid: string; +interface AA { + a?: string; + b?: number; + [key: symbol]: string; +} +declare const aa: AA; +declare const obj1: { + [key: symbol]: string; +}; +declare const obj2: { + [key: string]: string; +}; +declare const obj3: { + [key: number]: string; +}; +type Id = string & { + __tag: 'id '; +}; +type Rec1 = { + [key: Id]: number; +}; +type Rec2 = Record; +type K1 = keyof Rec1; +type K2 = keyof Rec2; +//# sourceMappingURL=indexSignatures1.d.ts.map + +/// [Declarations Maps] //// + + +//// [indexSignatures1.d.ts.map] +{"version":3,"file":"indexSignatures1.d.ts","sourceRoot":"","sources":["indexSignatures1.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG,EAAE,OAAO,MAAiB,CAAC;AAEpC,iBAAS,GAAG,CAAC,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAGnG;AAID,iBAAS,GAAG,CAAC,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,IAAI,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAGvH;AAED,UAAU,EAAE;IAAG,CAAC,GAAG,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE;AACzE,UAAU,EAAE;IAAG,CAAC,GAAG,EAAE,IAAI,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE;AAE7C,iBAAS,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,GAAG,IAAI,CAG/B;AAID,OAAO,CAAC,IAAI,KAAK,EAAE;IAAE,CAAC,CAAC,EAAE,OAAO,MAAM,EAAE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gp0eXBlIEsxID0ga2V5b2YgUmVjMTsgIC8vIElkCnR5cGUgSzIgPSBrZXlvZiBSZWMyOyAgLy8gSWQK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/inferTypes1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/inferTypes1.d.ts new file mode 100644 index 0000000000000..da18b53ff2760 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/inferTypes1.d.ts @@ -0,0 +1,451 @@ +//// [tests/cases/conformance/types/conditional/inferTypes1.ts] //// + +//// [inferTypes1.ts] +type Unpacked = + T extends (infer U)[] ? U : + T extends (...args: any[]) => infer U ? U : + T extends Promise ? U : + T; + +type T00 = Unpacked; // string +type T01 = Unpacked; // string +type T02 = Unpacked<() => string>; // string +type T03 = Unpacked>; // string +type T04 = Unpacked[]>>; // string +type T05 = Unpacked; // any +type T06 = Unpacked; // never + +function f1(s: string): { + a: number; + b: string; +} { + return { a: 1, b: s }; +} + +class C { + x = 0; + y = 0; +} + +abstract class Abstract { + x = 0; + y = 0; +} + +type T10 = ReturnType<() => string>; // string +type T11 = ReturnType<(s: string) => void>; // void +type T12 = ReturnType<(() => T)>; // {} +type T13 = ReturnType<(() => T)>; // number[] +type T14 = ReturnType; // { a: number, b: string } +type T15 = ReturnType; // any +type T16 = ReturnType; // never +type T17 = ReturnType; // Error +type T18 = ReturnType; // Error +type T19 = ReturnType<(x: string, ...args: T) => T[]>; // T[] + +type U10 = InstanceType; // C +type U11 = InstanceType; // any +type U12 = InstanceType; // never +type U13 = InstanceType; // Error +type U14 = InstanceType; // Error +type U15 = InstanceType; // Abstract +type U16 = InstanceType T[]>; // T[] +type U17 = InstanceType T[]>; // T[] + +type ArgumentType any> = T extends (a: infer A) => any ? A : any; + +type T20 = ArgumentType<() => void>; // {} +type T21 = ArgumentType<(x: string) => number>; // string +type T22 = ArgumentType<(x?: string) => number>; // string | undefined +type T23 = ArgumentType<(...args: string[]) => number>; // string +type T24 = ArgumentType<(x: string, y: string) => number>; // Error +type T25 = ArgumentType; // Error +type T26 = ArgumentType; // any +type T27 = ArgumentType; // never + +type X1 = T extends { x: infer X, y: infer Y } ? [X, Y] : any; + +type T30 = X1<{ x: any, y: any }>; // [any, any] +type T31 = X1<{ x: number, y: string }>; // [number, string] +type T32 = X1<{ x: number, y: string, z: boolean }>; // [number, string] + +type X2 = T extends { a: infer U, b: infer U } ? U : never; + +type T40 = X2<{}>; // never +type T41 = X2<{ a: string }>; // never +type T42 = X2<{ a: string, b: string }>; // string +type T43 = X2<{ a: number, b: string }>; // string | number +type T44 = X2<{ a: number, b: string, c: boolean }>; // string | number + +type X3 = T extends { a: (x: infer U) => void, b: (x: infer U) => void } ? U : never; + +type T50 = X3<{}>; // never +type T51 = X3<{ a: (x: string) => void }>; // never +type T52 = X3<{ a: (x: string) => void, b: (x: string) => void }>; // string +type T53 = X3<{ a: (x: number) => void, b: (x: string) => void }>; // never +type T54 = X3<{ a: (x: number) => void, b: () => void }>; // number + +type T60 = infer U; // Error +type T61 = (infer A) extends infer B ? infer C : infer D; // Error +type T62 = U extends (infer U)[] ? U : U; // Error +type T63 = T extends ((infer A) extends infer B ? infer C : infer D) ? string : number; + +type T70 = { x: T }; +type T71 = T extends T70 ? T70 : never; + +type T72 = { y: T }; +type T73 = T extends T72 ? T70 : never; // Error + +type T74 = { x: T, y: U }; +type T75 = T extends T74 ? T70 | T72 | T74 : never; + +type T76 = { x: T }; +type T77 = T extends T76 ? T76 : never; +type T78 = T extends T76 ? T76 : never; + +type Foo = [T, U]; +type Bar = T extends Foo ? Foo : never; + +type T90 = Bar<[string, string]>; // [string, string] +type T91 = Bar<[string, "a"]>; // [string, "a"] +type T92 = Bar<[string, "a"] & { x: string }>; // [string, "a"] +type T93 = Bar<["a", string]>; // never +type T94 = Bar<[number, number]>; // never + +// Example from #21496 + +type JsonifiedObject = { [K in keyof T]: Jsonified }; + +type Jsonified = + T extends string | number | boolean | null ? T + : T extends undefined | Function ? never // undefined and functions are removed + : T extends { toJSON(): infer R } ? R // toJSON is called if it exists (e.g. Date) + : T extends object ? JsonifiedObject + : "what is this"; + +type Example = { + str: "literalstring", + fn: () => void, + date: Date, + customClass: MyClass, + obj: { + prop: "property", + clz: MyClass, + nested: { attr: Date } + }, +} + +declare class MyClass { + toJSON(): "correct"; +} + +type JsonifiedExample = Jsonified; +declare let ex: JsonifiedExample; +const z1: "correct" = ex.customClass; +const z2: string = ex.obj.nested.attr; + +// Repros from #21631 + +type A1> = [T, U]; +type B1 = S extends A1 ? [T, U] : never; + +type A2 = [T, U]; +type B2 = S extends A2 ? [T, U] : never; +type C2 = S extends A2 ? [T, U] : never; + +// Repro from #21735 + +type A = T extends string ? { [P in T]: void; } : T; +type B = string extends T ? { [P in T]: void; } : T; // Error + +// Repro from #22302 + +type MatchingKeys = + K extends keyof T ? T[K] extends U ? K : never : never; + +type VoidKeys = MatchingKeys; + +interface test { + a: 1, + b: void +} + +type T80 = MatchingKeys; +type T81 = VoidKeys; + +// Repro from #22221 + +type MustBeString = T; +type EnsureIsString = T extends MustBeString ? U : never; + +type Test1 = EnsureIsString<"hello">; // "hello" +type Test2 = EnsureIsString<42>; // never + +// Repros from #26856 + +function invoker (key: K, ...args: A): any>>(obj: T) => ReturnType { + return any>> (obj: T): ReturnType => obj[key](...args) +} + +const result: number = invoker('test', true)({ test: (a: boolean) => 123 }) + +type Foo2 = ReturnType<(...args: A) => string>; + + +/// [Declarations] //// + + +/// [Errors] //// + +inferTypes1.ts(39,23): error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'. +inferTypes1.ts(40,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. + Type 'Function' provides no match for the signature '(...args: any): any'. +inferTypes1.ts(46,25): error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'. +inferTypes1.ts(47,25): error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'. + Type 'Function' provides no match for the signature 'new (...args: any): any'. +inferTypes1.ts(58,25): error TS2344: Type '(x: string, y: string) => number' does not satisfy the constraint '(x: any) => any'. + Target signature provides too few arguments. Expected 2 or more, but got 1. +inferTypes1.ts(59,25): error TS2344: Type 'Function' does not satisfy the constraint '(x: any) => any'. + Type 'Function' provides no match for the signature '(x: any): any'. +inferTypes1.ts(85,12): error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. +inferTypes1.ts(86,16): error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. +inferTypes1.ts(86,43): error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. +inferTypes1.ts(86,53): error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. +inferTypes1.ts(87,15): error TS2304: Cannot find name 'U'. +inferTypes1.ts(87,15): error TS4081: Exported type alias 'T62' has or is using private name 'U'. +inferTypes1.ts(87,43): error TS2304: Cannot find name 'U'. +inferTypes1.ts(87,43): error TS4081: Exported type alias 'T62' has or is using private name 'U'. +inferTypes1.ts(94,44): error TS2344: Type 'U' does not satisfy the constraint 'string'. + Type 'number' is not assignable to type 'string'. +inferTypes1.ts(156,40): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'. + + +==== inferTypes1.ts (16 errors) ==== + type Unpacked = + T extends (infer U)[] ? U : + T extends (...args: any[]) => infer U ? U : + T extends Promise ? U : + T; + + type T00 = Unpacked; // string + type T01 = Unpacked; // string + type T02 = Unpacked<() => string>; // string + type T03 = Unpacked>; // string + type T04 = Unpacked[]>>; // string + type T05 = Unpacked; // any + type T06 = Unpacked; // never + + function f1(s: string): { + a: number; + b: string; + } { + return { a: 1, b: s }; + } + + class C { + x = 0; + y = 0; + } + + abstract class Abstract { + x = 0; + y = 0; + } + + type T10 = ReturnType<() => string>; // string + type T11 = ReturnType<(s: string) => void>; // void + type T12 = ReturnType<(() => T)>; // {} + type T13 = ReturnType<(() => T)>; // number[] + type T14 = ReturnType; // { a: number, b: string } + type T15 = ReturnType; // any + type T16 = ReturnType; // never + type T17 = ReturnType; // Error + ~~~~~~ +!!! error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'. + type T18 = ReturnType; // Error + ~~~~~~~~ +!!! error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. +!!! error TS2344: Type 'Function' provides no match for the signature '(...args: any): any'. + type T19 = ReturnType<(x: string, ...args: T) => T[]>; // T[] + + type U10 = InstanceType; // C + type U11 = InstanceType; // any + type U12 = InstanceType; // never + type U13 = InstanceType; // Error + ~~~~~~ +!!! error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'. + type U14 = InstanceType; // Error + ~~~~~~~~ +!!! error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'. +!!! error TS2344: Type 'Function' provides no match for the signature 'new (...args: any): any'. + type U15 = InstanceType; // Abstract + type U16 = InstanceType T[]>; // T[] + type U17 = InstanceType T[]>; // T[] + + type ArgumentType any> = T extends (a: infer A) => any ? A : any; + + type T20 = ArgumentType<() => void>; // {} + type T21 = ArgumentType<(x: string) => number>; // string + type T22 = ArgumentType<(x?: string) => number>; // string | undefined + type T23 = ArgumentType<(...args: string[]) => number>; // string + type T24 = ArgumentType<(x: string, y: string) => number>; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2344: Type '(x: string, y: string) => number' does not satisfy the constraint '(x: any) => any'. +!!! error TS2344: Target signature provides too few arguments. Expected 2 or more, but got 1. + type T25 = ArgumentType; // Error + ~~~~~~~~ +!!! error TS2344: Type 'Function' does not satisfy the constraint '(x: any) => any'. +!!! error TS2344: Type 'Function' provides no match for the signature '(x: any): any'. + type T26 = ArgumentType; // any + type T27 = ArgumentType; // never + + type X1 = T extends { x: infer X, y: infer Y } ? [X, Y] : any; + + type T30 = X1<{ x: any, y: any }>; // [any, any] + type T31 = X1<{ x: number, y: string }>; // [number, string] + type T32 = X1<{ x: number, y: string, z: boolean }>; // [number, string] + + type X2 = T extends { a: infer U, b: infer U } ? U : never; + + type T40 = X2<{}>; // never + type T41 = X2<{ a: string }>; // never + type T42 = X2<{ a: string, b: string }>; // string + type T43 = X2<{ a: number, b: string }>; // string | number + type T44 = X2<{ a: number, b: string, c: boolean }>; // string | number + + type X3 = T extends { a: (x: infer U) => void, b: (x: infer U) => void } ? U : never; + + type T50 = X3<{}>; // never + type T51 = X3<{ a: (x: string) => void }>; // never + type T52 = X3<{ a: (x: string) => void, b: (x: string) => void }>; // string + type T53 = X3<{ a: (x: number) => void, b: (x: string) => void }>; // never + type T54 = X3<{ a: (x: number) => void, b: () => void }>; // number + + type T60 = infer U; // Error + ~~~~~~~ +!!! error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. + type T61 = (infer A) extends infer B ? infer C : infer D; // Error + ~~~~~~~ +!!! error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. + ~~~~~~~ +!!! error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. + ~~~~~~~ +!!! error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. + type T62 = U extends (infer U)[] ? U : U; // Error + ~ +!!! error TS2304: Cannot find name 'U'. + ~ +!!! error TS4081: Exported type alias 'T62' has or is using private name 'U'. + ~ +!!! error TS2304: Cannot find name 'U'. + ~ +!!! error TS4081: Exported type alias 'T62' has or is using private name 'U'. + type T63 = T extends ((infer A) extends infer B ? infer C : infer D) ? string : number; + + type T70 = { x: T }; + type T71 = T extends T70 ? T70 : never; + + type T72 = { y: T }; + type T73 = T extends T72 ? T70 : never; // Error + ~ +!!! error TS2344: Type 'U' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' is not assignable to type 'string'. + + type T74 = { x: T, y: U }; + type T75 = T extends T74 ? T70 | T72 | T74 : never; + + type T76 = { x: T }; + type T77 = T extends T76 ? T76 : never; + type T78 = T extends T76 ? T76 : never; + + type Foo = [T, U]; + type Bar = T extends Foo ? Foo : never; + + type T90 = Bar<[string, string]>; // [string, string] + type T91 = Bar<[string, "a"]>; // [string, "a"] + type T92 = Bar<[string, "a"] & { x: string }>; // [string, "a"] + type T93 = Bar<["a", string]>; // never + type T94 = Bar<[number, number]>; // never + + // Example from #21496 + + type JsonifiedObject = { [K in keyof T]: Jsonified }; + + type Jsonified = + T extends string | number | boolean | null ? T + : T extends undefined | Function ? never // undefined and functions are removed + : T extends { toJSON(): infer R } ? R // toJSON is called if it exists (e.g. Date) + : T extends object ? JsonifiedObject + : "what is this"; + + type Example = { + str: "literalstring", + fn: () => void, + date: Date, + customClass: MyClass, + obj: { + prop: "property", + clz: MyClass, + nested: { attr: Date } + }, + } + + declare class MyClass { + toJSON(): "correct"; + } + + type JsonifiedExample = Jsonified; + declare let ex: JsonifiedExample; + const z1: "correct" = ex.customClass; + const z2: string = ex.obj.nested.attr; + + // Repros from #21631 + + type A1> = [T, U]; + type B1 = S extends A1 ? [T, U] : never; + + type A2 = [T, U]; + type B2 = S extends A2 ? [T, U] : never; + type C2 = S extends A2 ? [T, U] : never; + + // Repro from #21735 + + type A = T extends string ? { [P in T]: void; } : T; + type B = string extends T ? { [P in T]: void; } : T; // Error + ~ +!!! error TS2322: Type 'T' is not assignable to type 'string | number | symbol'. +!!! related TS2208 inferTypes1.ts:156:8: This type parameter might need an `extends string | number | symbol` constraint. + + // Repro from #22302 + + type MatchingKeys = + K extends keyof T ? T[K] extends U ? K : never : never; + + type VoidKeys = MatchingKeys; + + interface test { + a: 1, + b: void + } + + type T80 = MatchingKeys; + type T81 = VoidKeys; + + // Repro from #22221 + + type MustBeString = T; + type EnsureIsString = T extends MustBeString ? U : never; + + type Test1 = EnsureIsString<"hello">; // "hello" + type Test2 = EnsureIsString<42>; // never + + // Repros from #26856 + + function invoker (key: K, ...args: A): any>>(obj: T) => ReturnType { + return any>> (obj: T): ReturnType => obj[key](...args) + } + + const result: number = invoker('test', true)({ test: (a: boolean) => 123 }) + + type Foo2 = ReturnType<(...args: A) => string>; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/inferTypesInvalidExtendsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/inferTypesInvalidExtendsDeclaration.d.ts new file mode 100644 index 0000000000000..4e556fdb7e67b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/inferTypesInvalidExtendsDeclaration.d.ts @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/types/conditional/inferTypesInvalidExtendsDeclaration.ts] //// + +//// [inferTypesInvalidExtendsDeclaration.ts] +type Test = T extends infer A extends B ? number : string; + + +/// [Declarations] //// + + +/// [Errors] //// + +inferTypesInvalidExtendsDeclaration.ts(1,42): error TS2304: Cannot find name 'B'. +inferTypesInvalidExtendsDeclaration.ts(1,42): error TS4085: Extends clause for inferred type 'A' has or is using private name 'B'. + + +==== inferTypesInvalidExtendsDeclaration.ts (2 errors) ==== + type Test = T extends infer A extends B ? number : string; + ~ +!!! error TS2304: Cannot find name 'B'. + ~ +!!! error TS4085: Extends clause for inferred type 'A' has or is using private name 'B'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intraExpressionInferences.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intraExpressionInferences.d.ts.map new file mode 100644 index 0000000000000..527fe2475483d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intraExpressionInferences.d.ts.map @@ -0,0 +1,509 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts] //// + +//// [intraExpressionInferences.ts] +// Repros from #47599 + +declare function callIt(obj: { + produce: (n: number) => T, + consume: (x: T) => void +}): void; + +callIt({ + produce: () => 0, + consume: n => n.toFixed() +}); + +callIt({ + produce: _a => 0, + consume: n => n.toFixed(), +}); + +callIt({ + produce() { + return 0; + }, + consume: n => n.toFixed() +}); + +declare function callItT(obj: [(n: number) => T, (x: T) => void]): void; + +callItT([() => 0, n => n.toFixed()]); +callItT([_a => 0, n => n.toFixed()]); + +// Repro from #25092 + +interface MyInterface { + retrieveGeneric: (parameter: string) => T, + operateWithGeneric: (generic: T) => string +} + +const inferTypeFn = (generic: MyInterface): MyInterface => generic; + +const myGeneric: MyInterface = inferTypeFn({ + retrieveGeneric: parameter => 5, + operateWithGeneric: generic => generic.toFixed() +}); + +// Repro #38623 + +function make(o: { mutations: M, action: (m: M) => void }): void { } + +make({ + mutations: { + foo() { } + }, + action: (a) => { a.foo() } +}); + +// Repro from #38845 + +declare function foo(options: { a: A, b: (a: A) => void }): void; + +foo({ + a: () => { return 42 }, + b(a) {}, +}); + +foo({ + a: function () { return 42 }, + b(a) {}, +}); + +foo({ + a() { return 42 }, + b(a) {}, +}); + +// Repro from #38872 + +type Chain = { + a(): R1, + b(a: R1): R2; + c(b: R2): void; +}; + +function test(foo: Chain): void {} + +test({ + a: () => 0, + b: (a) => 'a', + c: (b) => { + const x: string = b; + } +}); + +test({ + a: () => 0, + b: (a) => a, + c: (b) => { + const x: number = b; + } +}); + +// Repro from #41712 + +class Wrapper { + public value?: T; +} + +type WrappedMap = Record; +type Unwrap = { + [K in keyof D]: D[K] extends Wrapper ? T : never; +}; + +type MappingComponent = { + setup(): { inputs: I; outputs: O }; + map?: (inputs: Unwrap) => Unwrap; +}; + +declare function createMappingComponent(def: MappingComponent): void; + +createMappingComponent({ + setup() { + return { + inputs: { + num: new Wrapper(), + str: new Wrapper() + }, + outputs: { + bool: new Wrapper(), + str: new Wrapper() + } + }; + }, + map(inputs) { + return { + bool: inputs.nonexistent, + str: inputs.num, // Causes error + } + } +}); + +// Repro from #48279 + +function simplified(props: { generator: () => T, receiver: (t: T) => any }): void {} + +function whatIWant(props: { generator: (bob: any) => T, receiver: (t: T) => any }): void {} + +function nonObject(generator: (bob: any) => T, receiver: (t: T) => any): void {} + +simplified({ generator: () => 123, receiver: (t) => console.log(t + 2) }) +whatIWant({ generator: (bob) => bob ? 1 : 2, receiver: (t) => console.log(t + 2) }) +nonObject((bob) => bob ? 1 : 2, (t) => console.log(t + 2)) + +// Repro from #48466 + +interface Opts { + fetch: (params: TParams, foo: number) => TDone, + map: (data: TDone) => TMapped +} + +function example(options: Opts): (params: TParams) => TMapped { + return (params: TParams) => { + const data = options.fetch(params, 123) + return options.map(data) + } +} + +interface Params { + one: number + two: string +} + +example({ + fetch: (params: Params) => 123, + map: (number) => String(number) +}); + +example({ + fetch: (params: Params, foo: number) => 123, + map: (number) => String(number) +}); + +example({ + fetch: (params: Params, foo) => 123, + map: (number) => String(number) +}); + +// Repro from #45255 + +declare const branch: + (_: { test: T, if: (t: T) => t is U, then: (u: U) => void }) => void + +declare const x: "a" | "b" + +branch({ + test: x, + if: (t): t is "a" => t === "a", + then: u => { + let test1: "a" = u + } +}) + +interface Props { + a: (x: string) => T; + b: (arg: T) => void; +} + +declare function Foo(props: Props): null; + +Foo({ + ...{ + a: (x) => 10, + b: (arg) => { + arg.toString(); + }, + }, +}); + +declare function nested(arg: { + prop: { + produce: (arg1: number) => T; + consume: (arg2: T) => void; + }; +}): T; + +const resNested: number[] = nested({ + prop: { + produce: (a) => [a], + consume: (arg) => arg.join(","), + }, +}); + +declare function twoConsumers(arg: { + a: (arg: string) => T; + consume1: (arg1: T) => void; + consume2: (arg2: T) => void; +}): T; + +const resTwoConsumers: string[] = twoConsumers({ + a: (arg) => [arg], + consume1: (arg1) => {}, + consume2: (arg2) => {}, +}); + +declare function multipleProducersBeforeConsumers(arg: { + a: (arg: string) => T; + b: (arg: string) => T2; + consume1: (arg1: T) => void; + consume2: (arg2: T2) => void; +}): [T, T2]; + +const resMultipleProducersBeforeConsumers: [ + string[], + number +] = multipleProducersBeforeConsumers({ + a: (arg) => [arg], + b: (arg) => Number(arg), + consume1: (arg1) => {}, + consume2: (arg2) => {}, +}); + +declare function withConditionalExpression(arg: { + a: (arg1: string) => T; + b: (arg2: T) => T2; + c: (arg2: T2) => T3; +}): [T, T2, T3]; + +const resWithConditionalExpression: [ + string[], + "first" | "two", + boolean +] = withConditionalExpression({ + a: (arg) => [arg], + b: Math.random() ? (arg) => "first" as const : (arg) => "two" as const, + c: (arg) => Boolean(arg), +}); + +declare function onion(arg: { + a: (arg1: string) => T; + nested: { + b: (arg2: T) => T2; + nested2: { + c: (arg2: T2) => T3; + }; + }; +}): [T, T2, T3]; + +const resOnion: [ + string[], + string, + boolean +] = onion({ + a: (arg) => [arg], + nested: { + b: (arg) => arg.join(","), + nested2: { + c: (arg) => Boolean(arg), + }, + }, +}); + +declare function onion2(arg: { + a: (arg1: string) => T; + nested: { + b: (arg2: T) => T2; + c: (arg3: T) => T3; + nested2: { + d: (arg4: T3) => T4; + }; + }; +}): [T, T2, T3, T4]; + +const resOnion2: [ + string[], + string, + number, + boolean +] = onion2({ + a: (arg) => [arg], + nested: { + b: (arg) => arg.join(","), + c: (arg) => Number(arg), + nested2: { + d: (arg) => Boolean(arg), + }, + }, +}); + +declare function distant(args: { + foo: { + bar: { + baz: { + producer: (arg: string) => T; + }; + }; + }; + consumer: (val: T) => unknown; +}): T; + +const distantRes: number = distant({ + foo: { + bar: { + baz: { + producer: (arg) => 1, + }, + }, + }, + consumer: (val) => {}, +}); + + +/// [Declarations] //// + + + +//// [intraExpressionInferences.d.ts] +declare function callIt(obj: { + produce: (n: number) => T; + consume: (x: T) => void; +}): void; +declare function callItT(obj: [(n: number) => T, (x: T) => void]): void; +interface MyInterface { + retrieveGeneric: (parameter: string) => T; + operateWithGeneric: (generic: T) => string; +} +declare const inferTypeFn: (generic: MyInterface) => MyInterface; +declare const myGeneric: MyInterface; +declare function make(o: { + mutations: M; + action: (m: M) => void; +}): void; +declare function foo(options: { + a: A; + b: (a: A) => void; +}): void; +type Chain = { + a(): R1; + b(a: R1): R2; + c(b: R2): void; +}; +declare function test(foo: Chain): void; +declare class Wrapper { + value?: T; +} +type WrappedMap = Record; +type Unwrap = { + [K in keyof D]: D[K] extends Wrapper ? T : never; +}; +type MappingComponent = { + setup(): { + inputs: I; + outputs: O; + }; + map?: (inputs: Unwrap) => Unwrap; +}; +declare function createMappingComponent(def: MappingComponent): void; +declare function simplified(props: { + generator: () => T; + receiver: (t: T) => any; +}): void; +declare function whatIWant(props: { + generator: (bob: any) => T; + receiver: (t: T) => any; +}): void; +declare function nonObject(generator: (bob: any) => T, receiver: (t: T) => any): void; +interface Opts { + fetch: (params: TParams, foo: number) => TDone; + map: (data: TDone) => TMapped; +} +declare function example(options: Opts): (params: TParams) => TMapped; +interface Params { + one: number; + two: string; +} +declare const branch: (_: { + test: T; + if: (t: T) => t is U; + then: (u: U) => void; +}) => void; +declare const x: "a" | "b"; +interface Props { + a: (x: string) => T; + b: (arg: T) => void; +} +declare function Foo(props: Props): null; +declare function nested(arg: { + prop: { + produce: (arg1: number) => T; + consume: (arg2: T) => void; + }; +}): T; +declare const resNested: number[]; +declare function twoConsumers(arg: { + a: (arg: string) => T; + consume1: (arg1: T) => void; + consume2: (arg2: T) => void; +}): T; +declare const resTwoConsumers: string[]; +declare function multipleProducersBeforeConsumers(arg: { + a: (arg: string) => T; + b: (arg: string) => T2; + consume1: (arg1: T) => void; + consume2: (arg2: T2) => void; +}): [T, T2]; +declare const resMultipleProducersBeforeConsumers: [ + string[], + number +]; +declare function withConditionalExpression(arg: { + a: (arg1: string) => T; + b: (arg2: T) => T2; + c: (arg2: T2) => T3; +}): [T, T2, T3]; +declare const resWithConditionalExpression: [ + string[], + "first" | "two", + boolean +]; +declare function onion(arg: { + a: (arg1: string) => T; + nested: { + b: (arg2: T) => T2; + nested2: { + c: (arg2: T2) => T3; + }; + }; +}): [T, T2, T3]; +declare const resOnion: [ + string[], + string, + boolean +]; +declare function onion2(arg: { + a: (arg1: string) => T; + nested: { + b: (arg2: T) => T2; + c: (arg3: T) => T3; + nested2: { + d: (arg4: T3) => T4; + }; + }; +}): [T, T2, T3, T4]; +declare const resOnion2: [ + string[], + string, + number, + boolean +]; +declare function distant(args: { + foo: { + bar: { + baz: { + producer: (arg: string) => T; + }; + }; + }; + consumer: (val: T) => unknown; +}): T; +declare const distantRes: number; +//# sourceMappingURL=intraExpressionInferences.d.ts.map + +/// [Declarations Maps] //// + + +//// [intraExpressionInferences.d.ts.map] +{"version":3,"file":"intraExpressionInferences.d.ts","sourceRoot":"","sources":["intraExpressionInferences.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE;IAC5B,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;IAC1B,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;CAC1B,GAAG,IAAI,CAAC;AAmBT,OAAO,UAAU,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;AAO3E,UAAU,WAAW,CAAC,CAAC;IACnB,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,CAAC,CAAC;IAC1C,kBAAkB,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,MAAM,CAAA;CAC7C;AAED,QAAA,MAAM,WAAW,eAAgB,YAAY,CAAC,CAAC,KAAG,YAAY,CAAC,CAAY,CAAC;AAE5E,QAAA,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAGjC,CAAC;AAIH,iBAAS,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE;IAAE,SAAS,EAAE,CAAC,CAAC;IAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;CAAE,GAAG,IAAI,CAAI;AAWxE,OAAO,UAAU,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE;IAAE,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;CAAE,GAAG,IAAI,CAAC;AAmBpE,KAAK,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI;IACjB,CAAC,IAAI,EAAE,CAAC;IACR,CAAC,CAAC,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mVzdGVkOiB7CiAgICBiOiAoYXJnKSA9PiBhcmcuam9pbigiLCIpLAogICAgYzogKGFyZykgPT4gTnVtYmVyKGFyZyksCiAgICBuZXN0ZWQyOiB7CiAgICAgIGQ6IChhcmcpID0+IEJvb2xlYW4oYXJnKSwKICAgIH0sCiAgfSwKfSk7CgpkZWNsYXJlIGZ1bmN0aW9uIGRpc3RhbnQ8VD4oYXJnczogewogIGZvbzogewogICAgYmFyOiB7CiAgICAgIGJhejogewogICAgICAgIHByb2R1Y2VyOiAoYXJnOiBzdHJpbmcpID0+IFQ7CiAgICAgIH07CiAgICB9OwogIH07CiAgY29uc3VtZXI6ICh2YWw6IFQpID0+IHVua25vd247Cn0pOiBUOwoKY29uc3QgZGlzdGFudFJlczogbnVtYmVyID0gZGlzdGFudCh7CiAgZm9vOiB7CiAgICBiYXI6IHsKICAgICAgYmF6OiB7CiAgICAgICAgcHJvZHVjZXI6IChhcmcpID0+IDEsCiAgICAgIH0sCiAgICB9LAogIH0sCiAgY29uc3VtZXI6ICh2YWwpID0+IHt9LAp9KTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intrinsics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intrinsics.d.ts new file mode 100644 index 0000000000000..ba3bd8762ca6f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intrinsics.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/intrinsics.ts] //// + +//// [intrinsics.ts] +var hasOwnProperty: hasOwnProperty; // Error + +module m1 { + export var __proto__: any; + interface __proto__ {} + + class C { } +} + +__proto__ = 0; // Error, __proto__ not defined +m1.__proto__ = 0; + +class Foo<__proto__> { } +var foo: (__proto__: number) => void; + +/// [Declarations] //// + + +/// [Errors] //// + +intrinsics.ts(1,21): error TS2749: 'hasOwnProperty' refers to a value, but is being used as a type here. Did you mean 'typeof hasOwnProperty'? +intrinsics.ts(1,21): error TS4025: Exported variable 'hasOwnProperty' has or is using private name 'hasOwnProperty'. +intrinsics.ts(10,1): error TS2304: Cannot find name '__proto__'. + + +==== intrinsics.ts (3 errors) ==== + var hasOwnProperty: hasOwnProperty; // Error + ~~~~~~~~~~~~~~ +!!! error TS2749: 'hasOwnProperty' refers to a value, but is being used as a type here. Did you mean 'typeof hasOwnProperty'? + ~~~~~~~~~~~~~~ +!!! error TS4025: Exported variable 'hasOwnProperty' has or is using private name 'hasOwnProperty'. + + module m1 { + export var __proto__: any; + interface __proto__ {} + + class C { } + } + + __proto__ = 0; // Error, __proto__ not defined + ~~~~~~~~~ +!!! error TS2304: Cannot find name '__proto__'. + m1.__proto__ = 0; + + class Foo<__proto__> { } + var foo: (__proto__: number) => void; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationBinderSignatures.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationBinderSignatures.d.ts.map new file mode 100644 index 0000000000000..8cec9201484f7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationBinderSignatures.d.ts.map @@ -0,0 +1,178 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderSignatures.ts] //// + +//// [isolatedDeclarationBinderSignatures.ts] +type N = "not used"; +const N = "not used" +export type F = () => N; + +export const fn = (): N => { + return null!; +} +export const fn2 = (p: N): void => { + return null! +} + + +export module M1 { + export type N = T extends T? N : never; + export function N(): typeof N { + return N + } +} + +export module M2 { + export interface N { + child: N + m(): N; + get X(): N + set X(value: N); + } +} + +export module M3 { + export interface N { + [n: string]: N + } +} +export module M3 { + export class N { child: N } + export function fn(): N { + return new N(); + } +} +export module M4 { + export module N { + export function fn(): typeof N { + return N; + } + } +} + + +export const fn3 = function (p: N): void { + +} + +export const fn4 = function (): { name: N } { + return null!; +} + +export interface I { + (): N; + new (): N + m(): N; +} + +export interface I2 { + [n: string]: N +} + +export interface I1 { + (): N; + new (): N + m(): N; +} + + +export interface I { + (): N; + new (): N + m(): N; +} + +export class C { + constructor(n: N) { + + } + m(): N { + return null!; + } + get N(): N { return null! } + set N(value) { } +} + +export class C2 { + m(): N { + return null!; + } +} + + + +/// [Declarations] //// + + + +//// [isolatedDeclarationBinderSignatures.d.ts] +export type F = () => N; +export declare const fn: () => N; +export declare const fn2: (p: N) => void; +export declare namespace M1 { + type N = T extends T ? N : never; + function N(): typeof N; +} +export declare namespace M2 { + interface N { + child: N; + m(): N; + get X(): N; + set X(value: N); + } +} +export declare namespace M3 { + interface N { + [n: string]: N; + } +} +export declare namespace M3 { + class N { + child: N; + } + function fn(): N; +} +export declare namespace M4 { + namespace N { + function fn(): typeof N; + } +} +export declare const fn3: (p: N) => void; +export declare const fn4: () => { + name: N; +}; +export interface I { + (): N; + new (): N; + m(): N; +} +export interface I2 { + [n: string]: N; +} +export interface I1 { + (): N; + new (): N; + m(): N; +} +export interface I { + (): N; + new (): N; + m(): N; +} +export declare class C { + constructor(n: N); + m(): N; + get N(): N; + set N(value: N); +} +export declare class C2 { + m(): N; +} +//# sourceMappingURL=isolatedDeclarationBinderSignatures.d.ts.map + +/// [Declarations Maps] //// + + +//// [isolatedDeclarationBinderSignatures.d.ts.map] +{"version":3,"file":"isolatedDeclarationBinderSignatures.d.ts","sourceRoot":"","sources":["isolatedDeclarationBinderSignatures.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;AAE3B,eAAO,MAAM,EAAE,WAAU,CAExB,CAAA;AACD,eAAO,MAAM,GAAG,SAAW,CAAC,KAAG,IAE9B,CAAA;AAGD,yBAAc,EAAE,CAAC;IACb,KAAY,CAAC,CAAC,CAAC,IAAK,CAAC,SAAS,CAAC,GAAE,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC9C,SAAgB,CAAC,IAAI,OAAO,CAAC,CAE5B;CACJ;AAED,yBAAc,EAAE,CAAC;IACb,UAAiB,CAAC;QACd,KAAK,EAAE,C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AE;IACX,CAAC,CAAC,CAAC,KAAK,CAAC;CAGZ"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgRiA9IDxOPigpID0+IE47DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjogPE4+KCkgPT4gTjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGZuMjogPE4+KHA6IE4pID0+IHZvaWQ7DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTEgew0KICAgIHR5cGUgTjxUPiA9IFQgZXh0ZW5kcyBUID8gTjxUPiA6IG5ldmVyOw0KICAgIGZ1bmN0aW9uIE4oKTogdHlwZW9mIE47DQp9DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTIgew0KICAgIGludGVyZmFjZSBOIHsNCiAgICAgICAgY2hpbGQ6IE47DQogICAgICAgIG0oKTogTjsNCiAgICAgICAgZ2V0IFgoKTogTjsNCiAgICAgICAgc2V0IFgodmFsdWU6IE4pOw0KICAgIH0NCn0NCmV4cG9ydCBkZWNsYXJlIG5hbWVzcGFjZSBNMyB7DQogICAgaW50ZXJmYWNlIE4gew0KICAgICAgICBbbjogc3RyaW5nXTogTjsNCiAgICB9DQp9DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTMgew0KICAgIGNsYXNzIE4gew0KICAgICAgICBjaGlsZDogTjsNCiAgICB9DQogICAgZnVuY3Rpb24gZm4oKTogTjsNCn0NCmV4cG9ydCBkZWNsYXJlIG5hbWVzcGFjZSBNNCB7DQogICAgbmFtZXNwYWNlIE4gew0KICAgICAgICBmdW5jdGlvbiBmbigpOiB0eXBlb2YgTjsNCiAgICB9DQp9DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjM6IDxOPihwOiBOKSA9PiB2b2lkOw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm40OiA8Tj4oKSA9PiB7DQogICAgbmFtZTogTjsNCn07DQpleHBvcnQgaW50ZXJmYWNlIEk8Tj4gew0KICA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xhc3MgQzxOPiB7CiAgICBjb25zdHJ1Y3RvcihuOiBOKSB7CgogICAgfQogICAgbSgpOiBOIHsKICAgICAgICByZXR1cm4gbnVsbCE7CiAgICB9CiAgICBnZXQgTigpOiBOIHsgcmV0dXJuIG51bGwhIH0KICAgIHNldCBOKHZhbHVlKSB7IH0KfQoKZXhwb3J0IGNsYXNzIEMyIHsKICAgIG08Tj4oKTogTiB7CiAgICAgICAgcmV0dXJuIG51bGwhOwogICAgfQp9Cgo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrors.d.ts new file mode 100644 index 0000000000000..eea40f9c56eca --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrors.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +//// [isolatedDeclarationErrors.ts] +function errorOnAssignmentBelowDecl(): void {} +errorOnAssignmentBelowDecl.a = ""; + +const errorOnAssignmentBelow: { + (): void; + a: string; +} = (): void => {} +errorOnAssignmentBelow.a = ""; + +const errorOnMissingReturn: { + (): void; + a: string; +} = (): void => {} +errorOnMissingReturn.a = ""; + + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrors.d.ts] +declare function errorOnAssignmentBelowDecl(): void; +declare namespace errorOnAssignmentBelowDecl { + var a: string; +} +declare const errorOnAssignmentBelow: { + (): void; + a: string; +}; +declare const errorOnMissingReturn: { + (): void; + a: string; +}; +//# sourceMappingURL=isolatedDeclarationErrors.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsClasses.d.ts new file mode 100644 index 0000000000000..e7a234f6373f8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsClasses.d.ts @@ -0,0 +1,180 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +//// [isolatedDeclarationErrorsClasses.ts] +export class Cls { + + field: number = 1 + 1; + method(): void {} + + methodOk(): void {} + + methodParams(p: any): void {} + methodParams2(p: number = 1 + 1): void {} + + get getOnly(): number { return 0 } + set setOnly(value: any) { } + + get getSetBad(): number { return 0 } + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } +} + +let noAnnotationStringName: string = "noAnnotationStringName"; +let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + +const noAnnotationLiteralName = "noAnnotationLiteralName"; +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + +export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName](): void { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName](): number { return 0;} + + set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + +} + +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsClasses.d.ts] +export declare class Cls { + field: number; + method(): void; + methodOk(): void; + methodParams(p: any): void; + methodParams2(p?: number): void; + get getOnly(): number; + set setOnly(value: any); + get getSetBad(): number; + set getSetBad(value: number); + get getSetOk(): number; + set getSetOk(value: number); + get getSetOk2(): number; + set getSetOk2(value: number); + get getSetOk3(): number; + set getSetOk3(value: number); +} +declare const noAnnotationLiteralName = "noAnnotationLiteralName"; +declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; +export declare class C { + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; +} +export interface I { + [noAnnotationLiteralName](): any; +} +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsClasses.ts(36,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. +isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + + +==== isolatedDeclarationErrorsClasses.ts (8 errors) ==== + export class Cls { + + field: number = 1 + 1; + method(): void {} + + methodOk(): void {} + + methodParams(p: any): void {} + methodParams2(p: number = 1 + 1): void {} + + get getOnly(): number { return 0 } + set setOnly(value: any) { } + + get getSetBad(): number { return 0 } + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } + } + + let noAnnotationStringName: string = "noAnnotationStringName"; + let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + + const noAnnotationLiteralName = "noAnnotationLiteralName"; + const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + + export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~ +!!! error TS2304: Cannot find name 'missing'. + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName](): void { } + + [noParamAnnotationStringName](v): void { } + ~ +!!! error TS7006: Parameter 'v' implicitly has an 'any' type. + + get [noAnnotationStringName](): number { return 0;} + + set [noParamAnnotationStringName](value) { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + + [("A" + "B") as "AB"] = 1; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + } + + export interface I { + [noAnnotationStringName]: 10; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + [noAnnotationLiteralName](); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsExpandoFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsExpandoFunctions.d.ts new file mode 100644 index 0000000000000..96e5dcbf714fd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsExpandoFunctions.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts] //// + +//// [isolatedDeclarationErrorsExpandoFunctions.ts] +export function foo(): void {} + +foo.apply = () => {} +foo.call = ()=> {} +foo.bind = ()=> {} +foo.caller = ()=> {} +foo.toString = ()=> {} +foo.length = 10 +foo.length = 10 + + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsExpandoFunctions.d.ts] +export declare function foo(): void; +export declare namespace foo { + var apply: () => void; + var call: () => void; + var bind: () => void; + var caller: () => void; + var toString: () => void; + var length: number; +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts new file mode 100644 index 0000000000000..f74be46fb85b1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts @@ -0,0 +1,359 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +//// [isolatedDeclarationErrorsObjects.ts] +export let o = { + a: 1, + b: "" +} + +export let oBad: { + a: number; +} = { + a: Math.random(), +} +export const V = 1; +export let oBad2: { + a: { + b: number; + }; + c: { + d: number; + e: number; + }; +} = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } +} + +export let oWithMethods: { + method(): void; + okMethod(): void; + a: number; + bad(): void; + e: number; +} = { + method(): void { }, + okMethod(): void { }, + a: 1, + bad(): void { }, + e: V, +} +export let oWithMethodsNested = { + foo: { + method(): void { }, + a: 1, + okMethod(): void { }, + bad(): void { } + } +} + + + +export let oWithAccessor = { + get singleGetterBad(): number { return 0 }, + set singleSetterBad(value: any) { }, + + get getSetBad(): number { return 0 }, + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, +} + +function prop(v: T): T { return v } + +const s: unique symbol = Symbol(); +const str: string = ""; +enum E { + V = 10, +} +export const oWithComputedProperties: { + [x: string]: number; + [x: number]: number; + 1: number; + 2: number; + [s]: number; + [E.V]: number; +} = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, +} + +const part = { a: 1 }; + +export const oWithSpread: { + c: number; + part: { + a: number; + }; + a: number; + b: number; +} = { + b: 1, + ...part, + c: 1, + part, +} + + +export const oWithSpread: { + [x: string]: number | { + a: number; + }; + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; +} = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, +} + + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsObjects.d.ts] +export declare let o: { + a: number; + b: string; +}; +export declare let oBad: { + a: number; +}; +export declare const V = 1; +export declare let oBad2: { + a: { + b: number; + }; + c: { + d: number; + e: number; + }; +}; +export declare let oWithMethods: { + method(): void; + okMethod(): void; + a: number; + bad(): void; + e: number; +}; +export declare let oWithMethodsNested: { + foo: { + method(): void; + a: number; + okMethod(): void; + bad(): void; + }; +}; +export declare let oWithAccessor: { + readonly singleGetterBad: number; + singleSetterBad: any; + getSetBad: number; + getSetOk: number; + getSetOk2: number; + getSetOk3: number; +}; +declare const s: unique symbol; +declare enum E { + V = 10 +} +export declare const oWithComputedProperties: { + [x: string]: number; + [x: number]: number; + 1: number; + 2: number; + [s]: number; + [E.V]: number; +}; +export declare const oWithSpread: { + c: number; + part: { + a: number; + }; + a: number; + b: number; +}; +export declare const oWithSpread: { + [x: string]: number | { + a: number; + }; + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; +}; +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsObjects.ts(96,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(111,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + + +==== isolatedDeclarationErrorsObjects.ts (2 errors) ==== + export let o = { + a: 1, + b: "" + } + + export let oBad: { + a: number; + } = { + a: Math.random(), + } + export const V = 1; + export let oBad2: { + a: { + b: number; + }; + c: { + d: number; + e: number; + }; + } = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } + } + + export let oWithMethods: { + method(): void; + okMethod(): void; + a: number; + bad(): void; + e: number; + } = { + method(): void { }, + okMethod(): void { }, + a: 1, + bad(): void { }, + e: V, + } + export let oWithMethodsNested = { + foo: { + method(): void { }, + a: 1, + okMethod(): void { }, + bad(): void { } + } + } + + + + export let oWithAccessor = { + get singleGetterBad(): number { return 0 }, + set singleSetterBad(value: any) { }, + + get getSetBad(): number { return 0 }, + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, + } + + function prop(v: T): T { return v } + + const s: unique symbol = Symbol(); + const str: string = ""; + enum E { + V = 10, + } + export const oWithComputedProperties: { + [x: string]: number; + [x: number]: number; + 1: number; + 2: number; + [s]: number; + [E.V]: number; + } = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, + } + + const part = { a: 1 }; + + export const oWithSpread: { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + c: number; + part: { + a: number; + }; + a: number; + b: number; + } = { + b: 1, + ...part, + c: 1, + part, + } + + + export const oWithSpread: { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + [x: string]: number | { + a: number; + }; + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; + } = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationLazySymbols.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationLazySymbols.d.ts new file mode 100644 index 0000000000000..69724d1fc0654 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationLazySymbols.d.ts @@ -0,0 +1,87 @@ +//// [tests/cases/compiler/isolatedDeclarationLazySymbols.ts] //// + +//// [isolatedDeclarationLazySymbols.ts] +export function foo(): void { + +} + +const o = { + ["prop.inner"]: "a", + prop: { + inner: "b", + } +} as const + +foo[o["prop.inner"]] ="A"; +foo[o.prop.inner] = "B"; + +export class Foo { + [o["prop.inner"]] ="A" + [o.prop.inner] = "B" +} + +export let oo: { + a: string; + [o.prop.inner]: string; +} = { + [o['prop.inner']]:"A", + [o.prop.inner]: "B", +} + +/// [Declarations] //// + + + +//// [isolatedDeclarationLazySymbols.d.ts] +export declare function foo(): void; +export declare namespace foo { + var b: string; +} +declare const o: { + readonly "prop.inner": "a"; + readonly prop: { + readonly inner: "b"; + }; +}; +export declare class Foo { +} +export declare let oo: { + a: string; + [o.prop.inner]: string; +}; +export {}; +//# sourceMappingURL=isolatedDeclarationLazySymbols.d.ts.map +/// [Errors] //// + +isolatedDeclarationLazySymbols.ts(16,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +==== isolatedDeclarationLazySymbols.ts (1 errors) ==== + export function foo(): void { + + } + + const o = { + ["prop.inner"]: "a", + prop: { + inner: "b", + } + } as const + + foo[o["prop.inner"]] ="A"; + foo[o.prop.inner] = "B"; + + export class Foo { + [o["prop.inner"]] ="A" + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [o.prop.inner] = "B" + } + + export let oo: { + a: string; + [o.prop.inner]: string; + } = { + [o['prop.inner']]:"A", + [o.prop.inner]: "B", + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isomorphicMappedTypeInference.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isomorphicMappedTypeInference.d.ts.map new file mode 100644 index 0000000000000..463d699f9b006 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isomorphicMappedTypeInference.d.ts.map @@ -0,0 +1,329 @@ +//// [tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts] //// + +//// [isomorphicMappedTypeInference.ts] +type Box = { + value: T; +} + +type Boxified = { + [P in keyof T]: Box; +} + +function box(x: T): Box { + return { value: x }; +} + +function unbox(x: Box): T { + return x.value; +} + +function boxify(obj: T): Boxified { + let result = {} as Boxified; + for (let k in obj) { + result[k] = box(obj[k]); + } + return result; +} + +function unboxify(obj: Boxified): T { + let result = {} as T; + for (let k in obj) { + result[k] = unbox(obj[k]); + } + return result; +} + +function assignBoxified(obj: Boxified, values: T): void { + for (let k in values) { + obj[k].value = values[k]; + } +} + +function f1(): void { + let v = { + a: 42, + b: "hello", + c: true + }; + let b = boxify(v); + let x: number = b.a.value; +} + +function f2(): void { + let b = { + a: box(42), + b: box("hello"), + c: box(true) + }; + let v = unboxify(b); + let x: number = v.a; +} + +function f3(): void { + let b = { + a: box(42), + b: box("hello"), + c: box(true) + }; + assignBoxified(b, { c: false }); +} + +function f4(): void { + let b = { + a: box(42), + b: box("hello"), + c: box(true) + }; + b = boxify(unboxify(b)); + b = unboxify(boxify(b)); +} + +function makeRecord(obj: { [P in K]: T }): { + [P in K]: T; +} { + return obj; +} + +function f5(s: string): void { + let b = makeRecord({ + a: box(42), + b: box("hello"), + c: box(true) + }); + let v = unboxify(b); + let x: string | number | boolean = v.a; +} + +function makeDictionary(obj: { [x: string]: T }): { + [x: string]: T; +} { + return obj; +} + +function f6(s: string): void { + let b = makeDictionary({ + a: box(42), + b: box("hello"), + c: box(true) + }); + let v = unboxify(b); + let x: string | number | boolean = v[s]; +} + +declare function validate(obj: { [P in keyof T]?: T[P] }): T; +declare function clone(obj: { readonly [P in keyof T]: T[P] }): T; +declare function validateAndClone(obj: { readonly [P in keyof T]?: T[P] }): T; + +type Foo = { + a?: number; + readonly b: string; +} + +function f10(foo: Foo): void { + let x = validate(foo); // { a: number, readonly b: string } + let y = clone(foo); // { a?: number, b: string } + let z = validateAndClone(foo); // { a: number, b: string } +} + +// Repro from #12606 + +type Func = (...args: any[]) => T; +type Spec = { + [P in keyof T]: Func | Spec ; +}; + +/** + * Given a spec object recursively mapping properties to functions, creates a function + * producing an object of the same structure, by mapping each property to the result + * of calling its associated function with the supplied arguments. + */ +declare function applySpec(obj: Spec): (...args: any[]) => T; + +// Infers g1: (...args: any[]) => { sum: number, nested: { mul: string } } +var g1: (...args: any[]) => { + sum: number; + nested: { + mul: string; + }; +} = applySpec({ + sum: (a: any) => 3, + nested: { + mul: (b: any) => "n" + } +}); + +// Infers g2: (...args: any[]) => { foo: { bar: { baz: boolean } } } +var g2: (...args: any[]) => { + foo: { + bar: { + baz: boolean; + }; + }; +} = applySpec({ foo: { bar: { baz: (x: any) => true } } }); + +// Repro from #12633 + +const foo = (object: T, partial: Partial): T => object; +let o = {a: 5, b: 7}; +foo(o, {b: 9}); +o = foo(o, {b: 9}); + +// Inferring to { [P in K]: X }, where K extends keyof T, produces same inferences as +// inferring to { [P in keyof T]: X }. + +declare function f20(obj: Pick): T; +declare function f21(obj: Pick): K; +declare function f22(obj: Boxified>): T; +declare function f23(obj: Pick): T; +declare function f24(obj: Pick): T & U; + +let x0: { + foo: number; + bar: string; +} = f20({ foo: 42, bar: "hello" }); +let x1: "foo" | "bar" = f21({ foo: 42, bar: "hello" }); +let x2: { + foo: number; + bar: string; +} = f22({ foo: { value: 42} , bar: { value: "hello" } }); +let x3: { + foo: number; + bar: string; +} = f23({ foo: 42, bar: "hello" }); +let x4: { + foo: number; + bar: string; +} & { + foo: number; + bar: string; +} = f24({ foo: 42, bar: "hello" }); + +// Repro from #29765 + +function getProps(obj: T, list: K[]): Pick { + return {} as any; +} + +const myAny: any = {}; + +const o1: Pick = getProps(myAny, ['foo', 'bar']); + +const o2: { foo: any; bar: any } = getProps(myAny, ['foo', 'bar']); + + +/// [Declarations] //// + + + +//// [isomorphicMappedTypeInference.d.ts] +type Box = { + value: T; +}; +type Boxified = { + [P in keyof T]: Box; +}; +declare function box(x: T): Box; +declare function unbox(x: Box): T; +declare function boxify(obj: T): Boxified; +declare function unboxify(obj: Boxified): T; +declare function assignBoxified(obj: Boxified, values: T): void; +declare function f1(): void; +declare function f2(): void; +declare function f3(): void; +declare function f4(): void; +declare function makeRecord(obj: { + [P in K]: T; +}): { + [P in K]: T; +}; +declare function f5(s: string): void; +declare function makeDictionary(obj: { + [x: string]: T; +}): { + [x: string]: T; +}; +declare function f6(s: string): void; +declare function validate(obj: { + [P in keyof T]?: T[P]; +}): T; +declare function clone(obj: { + readonly [P in keyof T]: T[P]; +}): T; +declare function validateAndClone(obj: { + readonly [P in keyof T]?: T[P]; +}): T; +type Foo = { + a?: number; + readonly b: string; +}; +declare function f10(foo: Foo): void; +type Func = (...args: any[]) => T; +type Spec = { + [P in keyof T]: Func | Spec; +}; +/** + * Given a spec object recursively mapping properties to functions, creates a function + * producing an object of the same structure, by mapping each property to the result + * of calling its associated function with the supplied arguments. + */ +declare function applySpec(obj: Spec): (...args: any[]) => T; +declare var g1: (...args: any[]) => { + sum: number; + nested: { + mul: string; + }; +}; +declare var g2: (...args: any[]) => { + foo: { + bar: { + baz: boolean; + }; + }; +}; +declare const foo: (object: T, partial: Partial) => T; +declare let o: { + a: number; + b: number; +}; +declare function f20(obj: Pick): T; +declare function f21(obj: Pick): K; +declare function f22(obj: Boxified>): T; +declare function f23(obj: Pick): T; +declare function f24(obj: Pick): T & U; +declare let x0: { + foo: number; + bar: string; +}; +declare let x1: "foo" | "bar"; +declare let x2: { + foo: number; + bar: string; +}; +declare let x3: { + foo: number; + bar: string; +}; +declare let x4: { + foo: number; + bar: string; +} & { + foo: number; + bar: string; +}; +declare function getProps(obj: T, list: K[]): Pick; +declare const myAny: any; +declare const o1: Pick; +declare const o2: { + foo: any; + bar: any; +}; +//# sourceMappingURL=isomorphicMappedTypeInference.d.ts.map + +/// [Declarations Maps] //// + + +//// [isomorphicMappedTypeInference.d.ts.map] +{"version":3,"file":"isomorphicMappedTypeInference.d.ts","sourceRoot":"","sources":["isomorphicMappedTypeInference.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,CAAC,CAAC,IAAI;IACV,KAAK,EAAE,CAAC,CAAC;CACZ,CAAA;AAED,KAAK,QAAQ,CAAC,CAAC,IAAI;KACd,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,CAAC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LnZhbHVlID0gdmFsdWVzW2tdOwogICAgfQp9CgpmdW5jdGlvbiBmMSgpOiB2b2lkIHsKICAgIGxldCB2ID0gewogICAgICAgIGE6IDQyLAogICAgICAgIGI6ICJoZWxsbyIsCiAgICAgICAgYzogdHJ1ZQogICAgfTsKICAgIGxldCBiID0gYm94aWZ5KHYpOwogICAgbGV0IHg6IG51bWJlciA9IGIuYS52YWx1ZTsKfQoKZnVuY3Rpb24gZjIoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBsZXQgdiA9IHVuYm94aWZ5KGIpOwogICAgbGV0IHg6IG51bWJlciA9IHYuYTsKfQoKZnVuY3Rpb24gZjMoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBhc3NpZ25Cb3hpZmllZChiLCB7IGM6IGZhbHNlIH0pOwp9CgpmdW5jdGlvbiBmNCgpOiB2b2lkIHsKICAgIGxldCBiID0gewogICAgICAgIGE6IGJveCg0MiksCiAgICAgICAgYjogYm94KCJoZWxsbyIpLAogICAgICAgIGM6IGJveCh0cnVlKQogICAgfTsKICAgIGIgPSBib3hpZnkodW5ib3hpZnkoYikpOwogICAgYiA9IHVuYm94aWZ5KGJveGlmeShiKSk7Cn0KCmZ1bmN0aW9uIG1ha2VSZWNvcmQ8VCwgSyBleHRlbmRzIHN0cmluZz4ob2JqOiB7IFtQIGluIEtdOiBUIH0pOiB7CiAgICBbUCBpbiBLXTogVDsKfSB7CiAgICByZXR1cm4gb2JqOwp9CgpmdW5jdGlvbiBmNShzOiBzdHJpbmcpOiB2b2lkIHsKICAgIGxldCBiID0gbWFrZVJlY29yZCh7CiAgICAgICAgYTogYm94KDQyKSwKICAg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ob2JqOiBQaWNrPFQgJiBVLCBLPik6IFQgJiBVOwoKbGV0IHgwOiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ID0gZjIwKHsgZm9vOiA0MiwgYmFyOiAiaGVsbG8iIH0pOwpsZXQgeDE6ICJmb28iIHwgImJhciIgPSBmMjEoeyBmb286IDQyLCBiYXI6ICJoZWxsbyIgfSk7CmxldCB4MjogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMih7IGZvbzogeyB2YWx1ZTogNDJ9ICwgYmFyOiB7IHZhbHVlOiAiaGVsbG8iIH0gfSk7CmxldCB4MzogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMyh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKbGV0IHg0OiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ICYgewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyNCh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKCi8vIFJlcHJvIGZyb20gIzI5NzY1CgpmdW5jdGlvbiBnZXRQcm9wczxULCBLIGV4dGVuZHMga2V5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+IHsKICAgIHJldHVybiB7fSBhcyBhbnk7Cn0KCmNvbnN0IG15QW55OiBhbnkgPSB7fTsKCmNvbnN0IG8xOiBQaWNrPGFueSwgImZvbyIgfCAiYmFyIj4gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwoKY29uc3QgbzI6IHsgZm9vOiBhbnk7IGJhcjogYW55IH0gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts new file mode 100644 index 0000000000000..de616154c7ef3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts] //// + +//// [a.ts] +class c { +} + +//// [a.d.ts] +declare function isC(): boolean; + +/// [Declarations] //// + + +/// [Errors] //// + +error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +==== a.ts (0 errors) ==== + class c { + } + +==== a.d.ts (0 errors) ==== + declare function isC(): boolean; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/keyofAndIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/keyofAndIndexedAccess.d.ts new file mode 100644 index 0000000000000..d9f17e140ff24 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/keyofAndIndexedAccess.d.ts @@ -0,0 +1,1709 @@ +//// [tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts] //// + +//// [keyofAndIndexedAccess.ts] +class Shape { + name: string; + width: number; + height: number; + visible: boolean; +} + +class TaggedShape extends Shape { + tag: string; +} + +class Item { + name: string; + price: number; +} + +class Options { + visible: "yes" | "no"; +} + +type Dictionary = { [x: string]: T }; +type NumericallyIndexed = { [x: number]: T }; + +const enum E { A, B, C } + +type K00 = keyof any; // string +type K01 = keyof string; // "toString" | "charAt" | ... +type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ... +type K03 = keyof boolean; // "valueOf" +type K04 = keyof void; // never +type K05 = keyof undefined; // never +type K06 = keyof null; // never +type K07 = keyof never; // string | number | symbol +type K08 = keyof unknown; // never + +type K10 = keyof Shape; // "name" | "width" | "height" | "visible" +type K11 = keyof Shape[]; // "length" | "toString" | ... +type K12 = keyof Dictionary; // string +type K13 = keyof {}; // never +type K14 = keyof Object; // "constructor" | "toString" | ... +type K15 = keyof E; // "toString" | "toFixed" | "toExponential" | ... +type K16 = keyof [string, number]; // "0" | "1" | "length" | "toString" | ... +type K17 = keyof (Shape | Item); // "name" +type K18 = keyof (Shape & Item); // "name" | "width" | "height" | "visible" | "price" +type K19 = keyof NumericallyIndexed // never + +type KeyOf = keyof T; + +type K20 = KeyOf; // "name" | "width" | "height" | "visible" +type K21 = KeyOf>; // string + +type NAME = "name"; +type WIDTH_OR_HEIGHT = "width" | "height"; + +type Q10 = Shape["name"]; // string +type Q11 = Shape["width" | "height"]; // number +type Q12 = Shape["name" | "visible"]; // string | boolean + +type Q20 = Shape[NAME]; // string +type Q21 = Shape[WIDTH_OR_HEIGHT]; // number + +type Q30 = [string, number][0]; // string +type Q31 = [string, number][1]; // number +type Q32 = [string, number][number]; // string | number +type Q33 = [string, number][E.A]; // string +type Q34 = [string, number][E.B]; // number +type Q35 = [string, number]["0"]; // string +type Q36 = [string, number]["1"]; // string + +type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" +type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" + +type Q50 = Dictionary["howdy"]; // Shape +type Q51 = Dictionary[123]; // Shape +type Q52 = Dictionary[E.B]; // Shape + +declare let cond: boolean; + +function getProperty(obj: T, key: K): T[K] { + return obj[key]; +} + +function setProperty(obj: T, key: K, value: T[K]): void { + obj[key] = value; +} + +function f10(shape: Shape): void { + let name = getProperty(shape, "name"); // string + let widthOrHeight = getProperty(shape, cond ? "width" : "height"); // number + let nameOrVisible = getProperty(shape, cond ? "name" : "visible"); // string | boolean + setProperty(shape, "name", "rectangle"); + setProperty(shape, cond ? "width" : "height", 10); + setProperty(shape, cond ? "name" : "visible", true); // Technically not safe +} + +function f11(a: Shape[]): void { + let len = getProperty(a, "length"); // number + setProperty(a, "length", len); +} + +function f12(t: [Shape, boolean]): void { + let len = getProperty(t, "length"); + let s2 = getProperty(t, "0"); // Shape + let b2 = getProperty(t, "1"); // boolean +} + +function f13(foo: any, bar: any): void { + let x = getProperty(foo, "x"); // any + let y = getProperty(foo, "100"); // any + let z = getProperty(foo, bar); // any +} + +class Component { + props: PropType; + getProperty(key: K): PropType[K] { + return this.props[key]; + } + setProperty(key: K, value: PropType[K]): void { + this.props[key] = value; + } +} + +function f20(component: Component): void { + let name = component.getProperty("name"); // string + let widthOrHeight = component.getProperty(cond ? "width" : "height"); // number + let nameOrVisible = component.getProperty(cond ? "name" : "visible"); // string | boolean + component.setProperty("name", "rectangle"); + component.setProperty(cond ? "width" : "height", 10) + component.setProperty(cond ? "name" : "visible", true); // Technically not safe +} + +function pluck(array: T[], key: K): T[K][] { + return array.map(x => x[key]); +} + +function f30(shapes: Shape[]): void { + let names = pluck(shapes, "name"); // string[] + let widths = pluck(shapes, "width"); // number[] + let nameOrVisibles = pluck(shapes, cond ? "name" : "visible"); // (string | boolean)[] +} + +function f31(key: K): Shape[K] { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] +} + +function f32(key: K): Shape[K] { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] +} + +function f33(shape: S, key: K): S[K] { + let name = getProperty(shape, "name"); + let prop = getProperty(shape, key); + return prop; +} + +function f34(ts: TaggedShape): void { + let tag1 = f33(ts, "tag"); + let tag2 = getProperty(ts, "tag"); +} + +class C { + public x: string; + protected y: string; + private z: string; +} + +// Indexed access expressions have always permitted access to private and protected members. +// For consistency we also permit such access in indexed access types. +function f40(c: C): void { + type X = C["x"]; + type Y = C["y"]; + type Z = C["z"]; + let x: X = c["x"]; + let y: Y = c["y"]; + let z: Z = c["z"]; +} + +function f50(k: keyof T, s: string): void { + const x1 = s as keyof T; + const x2 = k as string; +} + +function f51(k: K, s: string): void { + const x1 = s as keyof T; + const x2 = k as string; +} + +function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number): void { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; +} + +function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number): void { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; +} + +function f54(obj: T, key: keyof T): void { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; +} + +function f55(obj: T, key: K): void { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; +} + +function f60(source: T, target: T): void { + for (let k in source) { + target[k] = source[k]; + } +} + +function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void): void { + func<{ a: any, b: any }, { a: any, c: any }>('a', 'a'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'b'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'c'); +} + +function f71(func: (x: T, y: U) => Partial): void { + let x = func({ a: 1, b: "hello" }, { c: true }); + x.a; // number | undefined + x.b; // string | undefined + x.c; // boolean | undefined +} + +function f72(func: (x: T, y: U, k: K) => (T & U)[K]): void { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean +} + +function f73(func: (x: T, y: U, k: K) => (T & U)[K]): void { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean +} + +function f74(func: (x: T, y: U, k: K) => (T | U)[K]): void { + let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean +} + +function f80(obj: T): void { + let a1 = obj.a; // { x: any } + let a2 = obj['a']; // { x: any } + let a3 = obj['a'] as T['a']; // T["a"] + let x1 = obj.a.x; // any + let x2 = obj['a']['x']; // any + let x3 = obj['a']['x'] as T['a']['x']; // T["a"]["x"] +} + +function f81(obj: T): T["a"]["x"] { + return obj['a']['x'] as T['a']['x']; +} + +function f82(): void { + let x1 = f81({ a: { x: "hello" } }); // string + let x2 = f81({ a: { x: 42 } }); // number +} + +function f83(obj: T, key: K): T[K]["x"] { + return obj[key]['x'] as T[K]['x']; +} + +function f84(): void { + let x1 = f83({ foo: { x: "hello" } }, "foo"); // string + let x2 = f83({ bar: { x: 42 } }, "bar"); // number +} + +class C1 { + x: number; + get(key: K): this[K] { + return this[key]; + } + set(key: K, value: this[K]): void { + this[key] = value; + } + foo(): void { + let x1 = this.x; // number + let x2 = this["x"]; // number + let x3 = this.get("x"); // this["x"] + let x4 = getProperty(this, "x"); // this["x"] + this.x = 42; + this["x"] = 42; + this.set("x", 42); + setProperty(this, "x", 42); + } +} + +type S2 = { + a: string; + b: string; +}; + +function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]): void { + x1 = x2; + x1 = x3; + x2 = x1; + x2 = x3; + x3 = x1; + x3 = x2; + x1.length; + x2.length; + x3.length; +} + +function f91(x: T, y: T[keyof T], z: T[K]): void { + let a: {}; + a = x; + a = y; + a = z; +} + +function f92(x: T, y: T[keyof T], z: T[K]): void { + let a: {} | null | undefined; + a = x; + a = y; + a = z; +} + +// Repros from #12011 + +class Base { + get(prop: K): this[K] { + return this[prop]; + } + set(prop: K, value: this[K]): void { + this[prop] = value; + } +} + +class Person extends Base { + parts: number; + constructor(parts: number) { + super(); + this.set("parts", parts); + } + getParts(): this["parts"] { + return this.get("parts") + } +} + +class OtherPerson { + parts: number; + constructor(parts: number) { + setProperty(this, "parts", parts); + } + getParts(): this["parts"] { + return getProperty(this, "parts") + } +} + +// Modified repro from #12544 + +function path(obj: T, key1: K1): T[K1]; +function path(obj: T, key1: K1, key2: K2): T[K1][K2]; +function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; +function path(obj: any, ...keys: (string | number)[]): any; +function path(obj: any, ...keys: (string | number)[]): any { + let result = obj; + for (let k of keys) { + result = result[k]; + } + return result; +} + +type Thing = { + a: { x: number, y: string }, + b: boolean +}; + + +function f1(thing: Thing): void { + let x1 = path(thing, 'a'); // { x: number, y: string } + let x2 = path(thing, 'a', 'y'); // string + let x3 = path(thing, 'b'); // boolean + let x4 = path(thing, ...['a', 'x']); // any +} + +// Repro from comment in #12114 + +const assignTo2 = (object: T, key1: K1, key2: K2): (value: T[K1][K2]) => T[K1][K2] => + (value: T[K1][K2]) => object[key1][key2] = value; + +// Modified repro from #12573 + +declare function one(handler: (t: T) => void): T +var empty: unknown = one(() => {}) // inferred as {}, expected + +type Handlers = { [K in keyof T]: (t: T[K]) => void } +declare function on(handlerHash: Handlers): T +var hashOfEmpty1: { + test: unknown; +} = on({ test: () => {} }); // {} +var hashOfEmpty2: { + test: boolean; +} = on({ test: (x: boolean) => {} }); // { test: boolean } + +// Repro from #12624 + +interface Options1 { + data?: Data + computed?: Computed; +} + +declare class Component1 { + constructor(options: Options1); + get(key: K): (Data & Computed)[K]; +} + +let c1: Component1<{ + hello: string; +}, unknown> = new Component1({ + data: { + hello: "" + } +}); + +c1.get("hello"); + +// Repro from #12625 + +interface Options2 { + data?: Data + computed?: Computed; +} + +declare class Component2 { + constructor(options: Options2); + get(key: K): (Data & Computed)[K]; +} + +// Repro from #12641 + +interface R { + p: number; +} + +function f(p: K): void { + let a: any; + a[p].add; // any +} + +// Repro from #12651 + +type MethodDescriptor = { + name: string; + args: any[]; + returnValue: any; +} + +declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; + +type SomeMethodDescriptor = { + name: "someMethod"; + args: [string, number]; + returnValue: string[]; +} + +let result: string[] = dispatchMethod("someMethod", ["hello", 35]); + +// Repro from #13073 + +type KeyTypes = "a" | "b" +let MyThingy: { [key in KeyTypes]: string[] }; + +function addToMyThingy(key: S): void { + MyThingy[key].push("a"); +} + +// Repro from #13102 + +type Handler = { + onChange: (name: keyof T) => void; +}; + +function onChangeGenericFunction(handler: Handler): void { + handler.onChange('preset') +} + +// Repro from #13285 + +function updateIds, K extends string>( + obj: T, + idFields: K[], + idMapping: Partial> +): Record { + for (const idField of idFields) { + const newId: T[K] | undefined = idMapping[obj[idField]]; + if (newId) { + obj[idField] = newId; + } + } + return obj; +} + +// Repro from #13285 + +function updateIds2( + obj: T, + key: K, + stringMap: { [oldId: string]: string } +): void { + var x = obj[key]; + stringMap[x]; // Should be OK. +} + +// Repro from #13514 + +declare function head>(list: T): T[0]; + +// Repro from #13604 + +class A { + props: T & { foo: string }; +} + +class B extends A<{ x: number}> { + f(p: this["props"]): void { + p.x; + } +} + +// Repro from #13749 + +class Form { + private childFormFactories: {[K in keyof T]: (v: T[K]) => Form} + + public set(prop: K, value: T[K]): void { + this.childFormFactories[prop](value) + } +} + +// Repro from #13787 + +class SampleClass

{ + public props: Readonly

; + constructor(props: P) { + this.props = Object.freeze(props); + } +} + +interface Foo { + foo: string; +} + +declare function merge(obj1: T, obj2: U): T & U; + +class AnotherSampleClass extends SampleClass { + constructor(props: T) { + const foo: Foo = { foo: "bar" }; + super(merge(props, foo)); + } + + public brokenMethod(): void { + this.props.foo.concat; + } +} +new AnotherSampleClass({}); + +// Positive repro from #17166 +function f3>(t: T, k: K, tk: T[K]): void { + for (let key in t) { + key = k // ok, K ==> keyof T + t[key] = tk; // ok, T[K] ==> T[keyof T] + } +} + +// # 21185 +type Predicates = { + [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] +} + +// Repros from #23592 + +type Example = { [K in keyof T]: T[K]["prop"] }; +type Result = Example<{ a: { prop: string }; b: { prop: number } }>; + +type Helper2 = { [K in keyof T]: Extract }; +type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; +type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; + +// Repro from #23618 + +type DBBoolTable = { [k in K]: 0 | 1 } +enum Flag { + FLAG_1 = "flag_1", + FLAG_2 = "flag_2" +} + +type SimpleDBRecord = { staticField: number } & DBBoolTable +function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]): SimpleDBRecord[Flag] { + return record[flags[0]]; +} + +type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable +function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]): DynamicDBRecord[Flag] { + return record[flags[0]]; +} + +// Repro from #21368 + +interface I { + foo: string; +} + +declare function take(p: T): void; + +function fn(o: T, k: K): void { + take<{} | null | undefined>(o[k]); + take(o[k]); +} + +// Repro from #23133 + +class Unbounded { + foo(x: T[keyof T]): void { + let y: {} | undefined | null = x; + } +} + +// Repro from #23940 + +interface I7 { + x: any; +} +type Foo7 = T; +declare function f7(type: K): Foo7; + +// Repro from #21770 + +type Dict = { [key in T]: number }; +type DictDict = { [key in V]: Dict }; + +function ff1(dd: DictDict, k1: V, k2: T): number { + return dd[k1][k2]; +} + +function ff2(dd: DictDict, k1: V, k2: T): number { + const d: Dict = dd[k1]; + return d[k2]; +} + +// Repro from #26409 + +const cf1 = (t: T, k: K): void => +{ + const s: string = t[k]; + t.cool; +}; + +const cf2 = (t: T, k: K): void => +{ + const s: string = t[k]; + t.cool; +}; + + +/// [Declarations] //// + + + +//// [keyofAndIndexedAccess.d.ts] +declare class Shape { + name: string; + width: number; + height: number; + visible: boolean; +} +declare class TaggedShape extends Shape { + tag: string; +} +declare class Item { + name: string; + price: number; +} +declare class Options { + visible: "yes" | "no"; +} +type Dictionary = { + [x: string]: T; +}; +type NumericallyIndexed = { + [x: number]: T; +}; +declare const enum E { + A = 0, + B = 1, + C = 2 +} +type K00 = keyof any; +type K01 = keyof string; +type K02 = keyof number; +type K03 = keyof boolean; +type K04 = keyof void; +type K05 = keyof undefined; +type K06 = keyof null; +type K07 = keyof never; +type K08 = keyof unknown; +type K10 = keyof Shape; +type K11 = keyof Shape[]; +type K12 = keyof Dictionary; +type K13 = keyof {}; +type K14 = keyof Object; +type K15 = keyof E; +type K16 = keyof [string, number]; +type K17 = keyof (Shape | Item); +type K18 = keyof (Shape & Item); +type K19 = keyof NumericallyIndexed; +type KeyOf = keyof T; +type K20 = KeyOf; +type K21 = KeyOf>; +type NAME = "name"; +type WIDTH_OR_HEIGHT = "width" | "height"; +type Q10 = Shape["name"]; +type Q11 = Shape["width" | "height"]; +type Q12 = Shape["name" | "visible"]; +type Q20 = Shape[NAME]; +type Q21 = Shape[WIDTH_OR_HEIGHT]; +type Q30 = [string, number][0]; +type Q31 = [string, number][1]; +type Q32 = [string, number][number]; +type Q33 = [string, number][E.A]; +type Q34 = [string, number][E.B]; +type Q35 = [string, number]["0"]; +type Q36 = [string, number]["1"]; +type Q40 = (Shape | Options)["visible"]; +type Q41 = (Shape & Options)["visible"]; +type Q50 = Dictionary["howdy"]; +type Q51 = Dictionary[123]; +type Q52 = Dictionary[E.B]; +declare let cond: boolean; +declare function getProperty(obj: T, key: K): T[K]; +declare function setProperty(obj: T, key: K, value: T[K]): void; +declare function f10(shape: Shape): void; +declare function f11(a: Shape[]): void; +declare function f12(t: [Shape, boolean]): void; +declare function f13(foo: any, bar: any): void; +declare class Component { + props: PropType; + getProperty(key: K): PropType[K]; + setProperty(key: K, value: PropType[K]): void; +} +declare function f20(component: Component): void; +declare function pluck(array: T[], key: K): T[K][]; +declare function f30(shapes: Shape[]): void; +declare function f31(key: K): Shape[K]; +declare function f32(key: K): Shape[K]; +declare function f33(shape: S, key: K): S[K]; +declare function f34(ts: TaggedShape): void; +declare class C { + x: string; + protected y: string; + private z; +} +declare function f40(c: C): void; +declare function f50(k: keyof T, s: string): void; +declare function f51(k: K, s: string): void; +declare function f52(obj: { + [x: string]: boolean; +}, k: Exclude, s: string, n: number): void; +declare function f53>(obj: { + [x: string]: boolean; +}, k: K, s: string, n: number): void; +declare function f54(obj: T, key: keyof T): void; +declare function f55(obj: T, key: K): void; +declare function f60(source: T, target: T): void; +declare function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void): void; +declare function f71(func: (x: T, y: U) => Partial): void; +declare function f72(func: (x: T, y: U, k: K) => (T & U)[K]): void; +declare function f73(func: (x: T, y: U, k: K) => (T & U)[K]): void; +declare function f74(func: (x: T, y: U, k: K) => (T | U)[K]): void; +declare function f80(obj: T): void; +declare function f81(obj: T): T["a"]["x"]; +declare function f82(): void; +declare function f83(obj: T, key: K): T[K]["x"]; +declare function f84(): void; +declare class C1 { + x: number; + get(key: K): this[K]; + set(key: K, value: this[K]): void; + foo(): void; +} +type S2 = { + a: string; + b: string; +}; +declare function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]): void; +declare function f91(x: T, y: T[keyof T], z: T[K]): void; +declare function f92(x: T, y: T[keyof T], z: T[K]): void; +declare class Base { + get(prop: K): this[K]; + set(prop: K, value: this[K]): void; +} +declare class Person extends Base { + parts: number; + constructor(parts: number); + getParts(): this["parts"]; +} +declare class OtherPerson { + parts: number; + constructor(parts: number); + getParts(): this["parts"]; +} +declare function path(obj: T, key1: K1): T[K1]; +declare function path(obj: T, key1: K1, key2: K2): T[K1][K2]; +declare function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; +declare function path(obj: any, ...keys: (string | number)[]): any; +type Thing = { + a: { + x: number; + y: string; + }; + b: boolean; +}; +declare function f1(thing: Thing): void; +declare const assignTo2: (object: T, key1: K1, key2: K2) => (value: T[K1][K2]) => T[K1][K2]; +declare function one(handler: (t: T) => void): T; +declare var empty: unknown; +type Handlers = { + [K in keyof T]: (t: T[K]) => void; +}; +declare function on(handlerHash: Handlers): T; +declare var hashOfEmpty1: { + test: unknown; +}; +declare var hashOfEmpty2: { + test: boolean; +}; +interface Options1 { + data?: Data; + computed?: Computed; +} +declare class Component1 { + constructor(options: Options1); + get(key: K): (Data & Computed)[K]; +} +declare let c1: Component1<{ + hello: string; +}, unknown>; +interface Options2 { + data?: Data; + computed?: Computed; +} +declare class Component2 { + constructor(options: Options2); + get(key: K): (Data & Computed)[K]; +} +interface R { + p: number; +} +declare function f(p: K): void; +type MethodDescriptor = { + name: string; + args: any[]; + returnValue: any; +}; +declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; +type SomeMethodDescriptor = { + name: "someMethod"; + args: [string, number]; + returnValue: string[]; +}; +declare let result: string[]; +type KeyTypes = "a" | "b"; +declare let MyThingy: { + [key in KeyTypes]: string[]; +}; +declare function addToMyThingy(key: S): void; +type Handler = { + onChange: (name: keyof T) => void; +}; +declare function onChangeGenericFunction(handler: Handler): void; +declare function updateIds, K extends string>(obj: T, idFields: K[], idMapping: Partial>): Record; +declare function updateIds2(obj: T, key: K, stringMap: { + [oldId: string]: string; +}): void; +declare function head>(list: T): T[0]; +declare class A { + props: T & { + foo: string; + }; +} +declare class B extends A<{ + x: number; +}> { + f(p: this["props"]): void; +} +declare class Form { + private childFormFactories; + set(prop: K, value: T[K]): void; +} +declare class SampleClass

{ + props: Readonly

; + constructor(props: P); +} +interface Foo { + foo: string; +} +declare function merge(obj1: T, obj2: U): T & U; +declare class AnotherSampleClass extends SampleClass { + constructor(props: T); + brokenMethod(): void; +} +declare function f3>(t: T, k: K, tk: T[K]): void; +type Predicates = { + [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T]; +}; +type Example = { + [K in keyof T]: T[K]["prop"]; +}; +type Result = Example<{ + a: { + prop: string; + }; + b: { + prop: number; + }; +}>; +type Helper2 = { + [K in keyof T]: Extract; +}; +type Example2 = { + [K in keyof Helper2]: Helper2[K]["prop"]; +}; +type Result2 = Example2<{ + 1: { + prop: string; + }; + 2: { + prop: number; + }; +}>; +type DBBoolTable = { + [k in K]: 0 | 1; +}; +declare enum Flag { + FLAG_1 = "flag_1", + FLAG_2 = "flag_2" +} +type SimpleDBRecord = { + staticField: number; +} & DBBoolTable; +declare function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]): SimpleDBRecord[Flag]; +type DynamicDBRecord = ({ + dynamicField: number; +} | { + dynamicField: string; +}) & DBBoolTable; +declare function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]): DynamicDBRecord[Flag]; +interface I { + foo: string; +} +declare function take(p: T): void; +declare function fn(o: T, k: K): void; +declare class Unbounded { + foo(x: T[keyof T]): void; +} +interface I7 { + x: any; +} +type Foo7 = T; +declare function f7(type: K): Foo7; +type Dict = { + [key in T]: number; +}; +type DictDict = { + [key in V]: Dict; +}; +declare function ff1(dd: DictDict, k1: V, k2: T): number; +declare function ff2(dd: DictDict, k1: V, k2: T): number; +declare const cf1: (t: T, k: K) => void; +declare const cf2: (t: T, k: K) => void; +//# sourceMappingURL=keyofAndIndexedAccess.d.ts.map +/// [Errors] //// + +keyofAndIndexedAccess.ts(205,24): error TS2322: Type 'T[keyof T]' is not assignable to type 'object'. + Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'object'. + Type 'T[string]' is not assignable to type 'object'. +keyofAndIndexedAccess.ts(211,24): error TS2322: Type 'T[K]' is not assignable to type 'object'. + Type 'T[keyof T]' is not assignable to type 'object'. + Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'object'. + Type 'T[string]' is not assignable to type 'object'. +keyofAndIndexedAccess.ts(316,5): error TS2322: Type 'T' is not assignable to type '{}'. +keyofAndIndexedAccess.ts(317,5): error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. + Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. + Type 'T[string]' is not assignable to type '{}'. +keyofAndIndexedAccess.ts(318,5): error TS2322: Type 'T[K]' is not assignable to type '{}'. + Type 'T[keyof T]' is not assignable to type '{}'. + + +==== keyofAndIndexedAccess.ts (5 errors) ==== + class Shape { + name: string; + width: number; + height: number; + visible: boolean; + } + + class TaggedShape extends Shape { + tag: string; + } + + class Item { + name: string; + price: number; + } + + class Options { + visible: "yes" | "no"; + } + + type Dictionary = { [x: string]: T }; + type NumericallyIndexed = { [x: number]: T }; + + const enum E { A, B, C } + + type K00 = keyof any; // string + type K01 = keyof string; // "toString" | "charAt" | ... + type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ... + type K03 = keyof boolean; // "valueOf" + type K04 = keyof void; // never + type K05 = keyof undefined; // never + type K06 = keyof null; // never + type K07 = keyof never; // string | number | symbol + type K08 = keyof unknown; // never + + type K10 = keyof Shape; // "name" | "width" | "height" | "visible" + type K11 = keyof Shape[]; // "length" | "toString" | ... + type K12 = keyof Dictionary; // string + type K13 = keyof {}; // never + type K14 = keyof Object; // "constructor" | "toString" | ... + type K15 = keyof E; // "toString" | "toFixed" | "toExponential" | ... + type K16 = keyof [string, number]; // "0" | "1" | "length" | "toString" | ... + type K17 = keyof (Shape | Item); // "name" + type K18 = keyof (Shape & Item); // "name" | "width" | "height" | "visible" | "price" + type K19 = keyof NumericallyIndexed // never + + type KeyOf = keyof T; + + type K20 = KeyOf; // "name" | "width" | "height" | "visible" + type K21 = KeyOf>; // string + + type NAME = "name"; + type WIDTH_OR_HEIGHT = "width" | "height"; + + type Q10 = Shape["name"]; // string + type Q11 = Shape["width" | "height"]; // number + type Q12 = Shape["name" | "visible"]; // string | boolean + + type Q20 = Shape[NAME]; // string + type Q21 = Shape[WIDTH_OR_HEIGHT]; // number + + type Q30 = [string, number][0]; // string + type Q31 = [string, number][1]; // number + type Q32 = [string, number][number]; // string | number + type Q33 = [string, number][E.A]; // string + type Q34 = [string, number][E.B]; // number + type Q35 = [string, number]["0"]; // string + type Q36 = [string, number]["1"]; // string + + type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" + type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" + + type Q50 = Dictionary["howdy"]; // Shape + type Q51 = Dictionary[123]; // Shape + type Q52 = Dictionary[E.B]; // Shape + + declare let cond: boolean; + + function getProperty(obj: T, key: K): T[K] { + return obj[key]; + } + + function setProperty(obj: T, key: K, value: T[K]): void { + obj[key] = value; + } + + function f10(shape: Shape): void { + let name = getProperty(shape, "name"); // string + let widthOrHeight = getProperty(shape, cond ? "width" : "height"); // number + let nameOrVisible = getProperty(shape, cond ? "name" : "visible"); // string | boolean + setProperty(shape, "name", "rectangle"); + setProperty(shape, cond ? "width" : "height", 10); + setProperty(shape, cond ? "name" : "visible", true); // Technically not safe + } + + function f11(a: Shape[]): void { + let len = getProperty(a, "length"); // number + setProperty(a, "length", len); + } + + function f12(t: [Shape, boolean]): void { + let len = getProperty(t, "length"); + let s2 = getProperty(t, "0"); // Shape + let b2 = getProperty(t, "1"); // boolean + } + + function f13(foo: any, bar: any): void { + let x = getProperty(foo, "x"); // any + let y = getProperty(foo, "100"); // any + let z = getProperty(foo, bar); // any + } + + class Component { + props: PropType; + getProperty(key: K): PropType[K] { + return this.props[key]; + } + setProperty(key: K, value: PropType[K]): void { + this.props[key] = value; + } + } + + function f20(component: Component): void { + let name = component.getProperty("name"); // string + let widthOrHeight = component.getProperty(cond ? "width" : "height"); // number + let nameOrVisible = component.getProperty(cond ? "name" : "visible"); // string | boolean + component.setProperty("name", "rectangle"); + component.setProperty(cond ? "width" : "height", 10) + component.setProperty(cond ? "name" : "visible", true); // Technically not safe + } + + function pluck(array: T[], key: K): T[K][] { + return array.map(x => x[key]); + } + + function f30(shapes: Shape[]): void { + let names = pluck(shapes, "name"); // string[] + let widths = pluck(shapes, "width"); // number[] + let nameOrVisibles = pluck(shapes, cond ? "name" : "visible"); // (string | boolean)[] + } + + function f31(key: K): Shape[K] { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] + } + + function f32(key: K): Shape[K] { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] + } + + function f33(shape: S, key: K): S[K] { + let name = getProperty(shape, "name"); + let prop = getProperty(shape, key); + return prop; + } + + function f34(ts: TaggedShape): void { + let tag1 = f33(ts, "tag"); + let tag2 = getProperty(ts, "tag"); + } + + class C { + public x: string; + protected y: string; + private z: string; + } + + // Indexed access expressions have always permitted access to private and protected members. + // For consistency we also permit such access in indexed access types. + function f40(c: C): void { + type X = C["x"]; + type Y = C["y"]; + type Z = C["z"]; + let x: X = c["x"]; + let y: Y = c["y"]; + let z: Z = c["z"]; + } + + function f50(k: keyof T, s: string): void { + const x1 = s as keyof T; + const x2 = k as string; + } + + function f51(k: K, s: string): void { + const x1 = s as keyof T; + const x2 = k as string; + } + + function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number): void { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; + } + + function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number): void { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; + } + + function f54(obj: T, key: keyof T): void { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; + ~~~~~~~~ +!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'object'. + } + + function f55(obj: T, key: K): void { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; + ~~~~~~~~ +!!! error TS2322: Type 'T[K]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'object'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'object'. + } + + function f60(source: T, target: T): void { + for (let k in source) { + target[k] = source[k]; + } + } + + function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void): void { + func<{ a: any, b: any }, { a: any, c: any }>('a', 'a'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'b'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'c'); + } + + function f71(func: (x: T, y: U) => Partial): void { + let x = func({ a: 1, b: "hello" }, { c: true }); + x.a; // number | undefined + x.b; // string | undefined + x.c; // boolean | undefined + } + + function f72(func: (x: T, y: U, k: K) => (T & U)[K]): void { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean + } + + function f73(func: (x: T, y: U, k: K) => (T & U)[K]): void { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean + } + + function f74(func: (x: T, y: U, k: K) => (T | U)[K]): void { + let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean + } + + function f80(obj: T): void { + let a1 = obj.a; // { x: any } + let a2 = obj['a']; // { x: any } + let a3 = obj['a'] as T['a']; // T["a"] + let x1 = obj.a.x; // any + let x2 = obj['a']['x']; // any + let x3 = obj['a']['x'] as T['a']['x']; // T["a"]["x"] + } + + function f81(obj: T): T["a"]["x"] { + return obj['a']['x'] as T['a']['x']; + } + + function f82(): void { + let x1 = f81({ a: { x: "hello" } }); // string + let x2 = f81({ a: { x: 42 } }); // number + } + + function f83(obj: T, key: K): T[K]["x"] { + return obj[key]['x'] as T[K]['x']; + } + + function f84(): void { + let x1 = f83({ foo: { x: "hello" } }, "foo"); // string + let x2 = f83({ bar: { x: 42 } }, "bar"); // number + } + + class C1 { + x: number; + get(key: K): this[K] { + return this[key]; + } + set(key: K, value: this[K]): void { + this[key] = value; + } + foo(): void { + let x1 = this.x; // number + let x2 = this["x"]; // number + let x3 = this.get("x"); // this["x"] + let x4 = getProperty(this, "x"); // this["x"] + this.x = 42; + this["x"] = 42; + this.set("x", 42); + setProperty(this, "x", 42); + } + } + + type S2 = { + a: string; + b: string; + }; + + function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]): void { + x1 = x2; + x1 = x3; + x2 = x1; + x2 = x3; + x3 = x1; + x3 = x2; + x1.length; + x2.length; + x3.length; + } + + function f91(x: T, y: T[keyof T], z: T[K]): void { + let a: {}; + a = x; + ~ +!!! error TS2322: Type 'T' is not assignable to type '{}'. +!!! related TS2208 keyofAndIndexedAccess.ts:314:14: This type parameter might need an `extends {}` constraint. + a = y; + ~ +!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. +!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. +!!! error TS2322: Type 'T[string]' is not assignable to type '{}'. + a = z; + ~ +!!! error TS2322: Type 'T[K]' is not assignable to type '{}'. +!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. + } + + function f92(x: T, y: T[keyof T], z: T[K]): void { + let a: {} | null | undefined; + a = x; + a = y; + a = z; + } + + // Repros from #12011 + + class Base { + get(prop: K): this[K] { + return this[prop]; + } + set(prop: K, value: this[K]): void { + this[prop] = value; + } + } + + class Person extends Base { + parts: number; + constructor(parts: number) { + super(); + this.set("parts", parts); + } + getParts(): this["parts"] { + return this.get("parts") + } + } + + class OtherPerson { + parts: number; + constructor(parts: number) { + setProperty(this, "parts", parts); + } + getParts(): this["parts"] { + return getProperty(this, "parts") + } + } + + // Modified repro from #12544 + + function path(obj: T, key1: K1): T[K1]; + function path(obj: T, key1: K1, key2: K2): T[K1][K2]; + function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; + function path(obj: any, ...keys: (string | number)[]): any; + function path(obj: any, ...keys: (string | number)[]): any { + let result = obj; + for (let k of keys) { + result = result[k]; + } + return result; + } + + type Thing = { + a: { x: number, y: string }, + b: boolean + }; + + + function f1(thing: Thing): void { + let x1 = path(thing, 'a'); // { x: number, y: string } + let x2 = path(thing, 'a', 'y'); // string + let x3 = path(thing, 'b'); // boolean + let x4 = path(thing, ...['a', 'x']); // any + } + + // Repro from comment in #12114 + + const assignTo2 = (object: T, key1: K1, key2: K2): (value: T[K1][K2]) => T[K1][K2] => + (value: T[K1][K2]) => object[key1][key2] = value; + + // Modified repro from #12573 + + declare function one(handler: (t: T) => void): T + var empty: unknown = one(() => {}) // inferred as {}, expected + + type Handlers = { [K in keyof T]: (t: T[K]) => void } + declare function on(handlerHash: Handlers): T + var hashOfEmpty1: { + test: unknown; + } = on({ test: () => {} }); // {} + var hashOfEmpty2: { + test: boolean; + } = on({ test: (x: boolean) => {} }); // { test: boolean } + + // Repro from #12624 + + interface Options1 { + data?: Data + computed?: Computed; + } + + declare class Component1 { + constructor(options: Options1); + get(key: K): (Data & Computed)[K]; + } + + let c1: Component1<{ + hello: string; + }, unknown> = new Component1({ + data: { + hello: "" + } + }); + + c1.get("hello"); + + // Repro from #12625 + + interface Options2 { + data?: Data + computed?: Computed; + } + + declare class Component2 { + constructor(options: Options2); + get(key: K): (Data & Computed)[K]; + } + + // Repro from #12641 + + interface R { + p: number; + } + + function f(p: K): void { + let a: any; + a[p].add; // any + } + + // Repro from #12651 + + type MethodDescriptor = { + name: string; + args: any[]; + returnValue: any; + } + + declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; + + type SomeMethodDescriptor = { + name: "someMethod"; + args: [string, number]; + returnValue: string[]; + } + + let result: string[] = dispatchMethod("someMethod", ["hello", 35]); + + // Repro from #13073 + + type KeyTypes = "a" | "b" + let MyThingy: { [key in KeyTypes]: string[] }; + + function addToMyThingy(key: S): void { + MyThingy[key].push("a"); + } + + // Repro from #13102 + + type Handler = { + onChange: (name: keyof T) => void; + }; + + function onChangeGenericFunction(handler: Handler): void { + handler.onChange('preset') + } + + // Repro from #13285 + + function updateIds, K extends string>( + obj: T, + idFields: K[], + idMapping: Partial> + ): Record { + for (const idField of idFields) { + const newId: T[K] | undefined = idMapping[obj[idField]]; + if (newId) { + obj[idField] = newId; + } + } + return obj; + } + + // Repro from #13285 + + function updateIds2( + obj: T, + key: K, + stringMap: { [oldId: string]: string } + ): void { + var x = obj[key]; + stringMap[x]; // Should be OK. + } + + // Repro from #13514 + + declare function head>(list: T): T[0]; + + // Repro from #13604 + + class A { + props: T & { foo: string }; + } + + class B extends A<{ x: number}> { + f(p: this["props"]): void { + p.x; + } + } + + // Repro from #13749 + + class Form { + private childFormFactories: {[K in keyof T]: (v: T[K]) => Form} + + public set(prop: K, value: T[K]): void { + this.childFormFactories[prop](value) + } + } + + // Repro from #13787 + + class SampleClass

{ + public props: Readonly

; + constructor(props: P) { + this.props = Object.freeze(props); + } + } + + interface Foo { + foo: string; + } + + declare function merge(obj1: T, obj2: U): T & U; + + class AnotherSampleClass extends SampleClass { + constructor(props: T) { + const foo: Foo = { foo: "bar" }; + super(merge(props, foo)); + } + + public brokenMethod(): void { + this.props.foo.concat; + } + } + new AnotherSampleClass({}); + + // Positive repro from #17166 + function f3>(t: T, k: K, tk: T[K]): void { + for (let key in t) { + key = k // ok, K ==> keyof T + t[key] = tk; // ok, T[K] ==> T[keyof T] + } + } + + // # 21185 + type Predicates = { + [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] + } + + // Repros from #23592 + + type Example = { [K in keyof T]: T[K]["prop"] }; + type Result = Example<{ a: { prop: string }; b: { prop: number } }>; + + type Helper2 = { [K in keyof T]: Extract }; + type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; + type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; + + // Repro from #23618 + + type DBBoolTable = { [k in K]: 0 | 1 } + enum Flag { + FLAG_1 = "flag_1", + FLAG_2 = "flag_2" + } + + type SimpleDBRecord = { staticField: number } & DBBoolTable + function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]): SimpleDBRecord[Flag] { + return record[flags[0]]; + } + + type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable + function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]): DynamicDBRecord[Flag] { + return record[flags[0]]; + } + + // Repro from #21368 + + interface I { + foo: string; + } + + declare function take(p: T): void; + + function fn(o: T, k: K): void { + take<{} | null | undefined>(o[k]); + take(o[k]); + } + + // Repro from #23133 + + class Unbounded { + foo(x: T[keyof T]): void { + let y: {} | undefined | null = x; + } + } + + // Repro from #23940 + + interface I7 { + x: any; + } + type Foo7 = T; + declare function f7(type: K): Foo7; + + // Repro from #21770 + + type Dict = { [key in T]: number }; + type DictDict = { [key in V]: Dict }; + + function ff1(dd: DictDict, k1: V, k2: T): number { + return dd[k1][k2]; + } + + function ff2(dd: DictDict, k1: V, k2: T): number { + const d: Dict = dd[k1]; + return d[k2]; + } + + // Repro from #26409 + + const cf1 = (t: T, k: K): void => + { + const s: string = t[k]; + t.cool; + }; + + const cf2 = (t: T, k: K): void => + { + const s: string = t[k]; + t.cool; + }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts new file mode 100644 index 0000000000000..87f788b820468 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts] //// + +//// [index.ts] +export function foo(): void {} +foo.bar = 12; +const _private = Symbol(); +foo[_private] = "ok"; + +const x: string = foo[_private]; + + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare function foo(): void; +export declare namespace foo { + var bar: number; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/leaveOptionalParameterAsWritten.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/leaveOptionalParameterAsWritten.d.ts.map new file mode 100644 index 0000000000000..21f62d92fa996 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/leaveOptionalParameterAsWritten.d.ts.map @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts] //// + +//// [a.ts] +export interface Foo {} + +//// [b.ts] +import * as a from "./a"; +declare global { + namespace teams { + export namespace calling { + export import Foo = a.Foo; + } + } +} + +//// [c.ts] +type Foo = teams.calling.Foo; +export const bar = (p?: Foo): void => {} + +/// [Declarations] //// + + + +//// [/.src/dist/a.d.ts] +export interface Foo { +} +//# sourceMappingURL=a.d.ts.map +//// [/.src/dist/b.d.ts] +import * as a from "./a"; +declare global { + namespace teams { + namespace calling { + export import Foo = a.Foo; + } + } +} +//# sourceMappingURL=b.d.ts.map +//// [/.src/dist/c.d.ts] +type Foo = teams.calling.Foo; +export declare const bar: (p?: Foo) => void; +export {}; +//# sourceMappingURL=c.d.ts.map + +/// [Declarations Maps] //// + + +//// [/.src/dist/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../a.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;CAAG"} + + +//// [/.src/dist/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../b.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,UAAiB,OAAO,CAAC;YACvB,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;SAC3B;KACF;CACF"} + + +//// [/.src/dist/c.d.ts.map] +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../c.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAC7B,eAAO,MAAM,GAAG,OAAQ,GAAG,KAAG,IAAU,CAAA"} + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts new file mode 100644 index 0000000000000..d3dd921e4b972 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// + +//// [index.ts] +export const a = async () => (await import("inner")).x(); +//// [index.d.ts] +export { x } from "./other.js"; +//// [other.d.ts] +import { Thing } from "./private.js" +export const x: () => Thing; +//// [private.d.ts] +export interface Thing {} // not exported in export map, inaccessible under new module modes +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: () => Promise; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeConstraints2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeConstraints2.d.ts.map new file mode 100644 index 0000000000000..9c044af178b55 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeConstraints2.d.ts.map @@ -0,0 +1,111 @@ +//// [tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts] //// + +//// [mappedTypeConstraints2.ts] +type Mapped1 = { [P in K]: { a: P } }; + +function f1(obj: Mapped1, key: K): void { + const x: { a: K } = obj[key]; +} + +type Mapped2 = { [P in K as `get${P}`]: { a: P } }; + +function f2(obj: Mapped2, key: `get${K}`): void { + const x: { a: K } = obj[key]; // Error +} + +type Mapped3 = { [P in K as Uppercase

]: { a: P } }; + +function f3(obj: Mapped3, key: Uppercase): void { + const x: { a: K } = obj[key]; // Error +} + +// Repro from #47794 + +type Foo = { + [RemappedT in T as `get${RemappedT}`]: RemappedT; +}; + +const get = (t: T, foo: Foo): T => foo[`get${t}`]; // Type 'Foo[`get${T}`]' is not assignable to type 'T' + +// Repro from #48626 + +interface Bounds { + min: number; + max: number; +} + +type NumericBoundsOf = { + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +} + +function validate(obj: T, bounds: NumericBoundsOf): boolean { + for (const [key, val] of Object.entries(obj)) { + const boundsForKey = bounds[key as keyof NumericBoundsOf]; + if (boundsForKey) { + const { min, max } = boundsForKey; + if (min > val || max < val) return false; + } + } + return true; +} + +// repro from #50030 + +type ObjectWithUnderscoredKeys = { + [k in K as `_${k}`]: true; +}; + +function genericTest(objectWithUnderscoredKeys: ObjectWithUnderscoredKeys, key: K): void { + const shouldBeTrue: true = objectWithUnderscoredKeys[`_${key}`]; +} + + +/// [Declarations] //// + + + +//// [mappedTypeConstraints2.d.ts] +type Mapped1 = { + [P in K]: { + a: P; + }; +}; +declare function f1(obj: Mapped1, key: K): void; +type Mapped2 = { + [P in K as `get${P}`]: { + a: P; + }; +}; +declare function f2(obj: Mapped2, key: `get${K}`): void; +type Mapped3 = { + [P in K as Uppercase

]: { + a: P; + }; +}; +declare function f3(obj: Mapped3, key: Uppercase): void; +type Foo = { + [RemappedT in T as `get${RemappedT}`]: RemappedT; +}; +declare const get: (t: T, foo: Foo) => T; +interface Bounds { + min: number; + max: number; +} +type NumericBoundsOf = { + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +}; +declare function validate(obj: T, bounds: NumericBoundsOf): boolean; +type ObjectWithUnderscoredKeys = { + [k in K as `_${k}`]: true; +}; +declare function genericTest(objectWithUnderscoredKeys: ObjectWithUnderscoredKeys, key: K): void; +//# sourceMappingURL=mappedTypeConstraints2.d.ts.map + +/// [Declarations Maps] //// + + +//// [mappedTypeConstraints2.d.ts.map] +{"version":3,"file":"mappedTypeConstraints2.d.ts","sourceRoot":"","sources":["mappedTypeConstraints2.ts"],"names":[],"mappings":"AAAA,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,GAAG;QAAE,CAAC,EAAE,CAAC,CAAA;KAAE;CAAE,CAAC;AAExD,iBA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6IE51bWVyaWNCb3VuZHNPZjxUPik6IGJvb2xlYW4gewogICAgZm9yIChjb25zdCBba2V5LCB2YWxdIG9mIE9iamVjdC5lbnRyaWVzKG9iaikpIHsKICAgICAgICBjb25zdCBib3VuZHNGb3JLZXkgPSBib3VuZHNba2V5IGFzIGtleW9mIE51bWVyaWNCb3VuZHNPZjxUPl07CiAgICAgICAgaWYgKGJvdW5kc0ZvcktleSkgewogICAgICAgICAgICBjb25zdCB7IG1pbiwgbWF4IH0gPSBib3VuZHNGb3JLZXk7CiAgICAgICAgICAgIGlmIChtaW4gPiB2YWwgfHwgbWF4IDwgdmFsKSByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0KCi8vIHJlcHJvIGZyb20gIzUwMDMwCgp0eXBlIE9iamVjdFdpdGhVbmRlcnNjb3JlZEtleXM8SyBleHRlbmRzIHN0cmluZz4gPSB7CiAgICBbayBpbiBLIGFzIGBfJHtrfWBdOiB0cnVlOwp9OwoKZnVuY3Rpb24gZ2VuZXJpY1Rlc3Q8SyBleHRlbmRzIHN0cmluZz4ob2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czogT2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czxLPiwga2V5OiBLKTogdm9pZCB7CiAgY29uc3Qgc2hvdWxkQmVUcnVlOiB0cnVlID0gb2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5c1tgXyR7a2V5fWBdOwp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericIndexedAccess.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericIndexedAccess.d.ts.map new file mode 100644 index 0000000000000..cb73fceb8eb92 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericIndexedAccess.d.ts.map @@ -0,0 +1,97 @@ +//// [tests/cases/compiler/mappedTypeGenericIndexedAccess.ts] //// + +//// [mappedTypeGenericIndexedAccess.ts] +// Repro from #49242 + +type Types = { + first: { a1: true }; + second: { a2: true }; + third: { a3: true }; +} + +class Test { + entries: { [T in keyof Types]?: Types[T][] }; + + constructor() { + this.entries = {}; + } + + addEntry(name: T, entry: Types[T]): void { + if (!this.entries[name]) { + this.entries[name] = []; + } + this.entries[name]?.push(entry); + } +} + +// Repro from #49338 + +type TypesMap = { + [0]: { foo: 'bar'; }; + [1]: { a: 'b'; }; +}; + +type P = { t: T; } & TypesMap[T]; + +type TypeHandlers = { + [T in keyof TypesMap]?: (p: P) => void; +}; + +const typeHandlers: TypeHandlers = { + [0]: (p) => console.log(p.foo), + [1]: (p) => console.log(p.a), +}; + +const onSomeEvent = (p: P): void | undefined => + typeHandlers[p.t]?.(p); + + +/// [Declarations] //// + + + +//// [mappedTypeGenericIndexedAccess.d.ts] +type Types = { + first: { + a1: true; + }; + second: { + a2: true; + }; + third: { + a3: true; + }; +}; +declare class Test { + entries: { + [T in keyof Types]?: Types[T][]; + }; + constructor(); + addEntry(name: T, entry: Types[T]): void; +} +type TypesMap = { + [0]: { + foo: 'bar'; + }; + [1]: { + a: 'b'; + }; +}; +type P = { + t: T; +} & TypesMap[T]; +type TypeHandlers = { + [T in keyof TypesMap]?: (p: P) => void; +}; +declare const typeHandlers: TypeHandlers; +declare const onSomeEvent: (p: P) => void | undefined; +//# sourceMappingURL=mappedTypeGenericIndexedAccess.d.ts.map + +/// [Declarations Maps] //// + + +//// [mappedTypeGenericIndexedAccess.d.ts.map] +{"version":3,"file":"mappedTypeGenericIndexedAccess.d.ts","sourceRoot":"","sources":["mappedTypeGenericIndexedAccess.ts"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACT,KAAK,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;IACpB,MAAM,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;IACrB,KAAK,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC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KHApOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts new file mode 100644 index 0000000000000..a62da22501e6d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/mappedTypeGenericInstantiationPreservesHomomorphism.ts] //// + +//// [internal.ts] +export declare function usePrivateType(...args: T): PrivateMapped; + +type PrivateMapped = {[K in keyof Obj]: Obj[K]}; + +//// [api.ts] +import {usePrivateType} from './internal'; +export const mappedUnionWithPrivateType = (...args: T): T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never => usePrivateType(...args); + + +/// [Declarations] //// + + + +//// [api.d.ts] +export declare const mappedUnionWithPrivateType: (...args: T) => T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never; +//# sourceMappingURL=api.d.ts.map +//// [internal.d.ts] +export declare function usePrivateType(...args: T): PrivateMapped; +type PrivateMapped = { + [K in keyof Obj]: Obj[K]; +}; +export {}; +//# sourceMappingURL=internal.d.ts.map +/// [Errors] //// + +api.ts(2,149): error TS2322: Type 'PrivateMapped' is not assignable to type 'T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never'. + + +==== internal.ts (0 errors) ==== + export declare function usePrivateType(...args: T): PrivateMapped; + + type PrivateMapped = {[K in keyof Obj]: Obj[K]}; + +==== api.ts (1 errors) ==== + import {usePrivateType} from './internal'; + export const mappedUnionWithPrivateType = (...args: T): T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never => usePrivateType(...args); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'PrivateMapped' is not assignable to type 'T[any] extends infer T_1 ? { [K in keyof T_1]: T[any][K]; } : never'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericInstantiationPreservesInlineForm.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericInstantiationPreservesInlineForm.d.ts new file mode 100644 index 0000000000000..b3419fd68e527 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericInstantiationPreservesInlineForm.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/mappedTypeGenericInstantiationPreservesInlineForm.ts] //// + +//// [mappedTypeGenericInstantiationPreservesInlineForm.ts] +// repro from #53109 + +export const test1 = >(schema: { + [K in keyof Required]: T[K]; +}): void => {} + +export function test2>(schema: { + [K in keyof Required]: T[K]; +}): void {}; + + +/// [Declarations] //// + + + +//// [mappedTypeGenericInstantiationPreservesInlineForm.d.ts] +export declare const test1: >(schema: { [K in keyof Required]: T[K]; }) => void; +export declare function test2>(schema: { + [K in keyof Required]: T[K]; +}): void; +//# sourceMappingURL=mappedTypeGenericInstantiationPreservesInlineForm.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeNoTypeNoCrash.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeNoTypeNoCrash.d.ts new file mode 100644 index 0000000000000..10930ccd92f33 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeNoTypeNoCrash.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/mappedTypeNoTypeNoCrash.ts] //// + +//// [mappedTypeNoTypeNoCrash.ts] +type T0 = ({[K in keyof T]}) extends ({[key in K]: T[K]}) ? number : never; + +/// [Declarations] //// + + +/// [Errors] //// + +mappedTypeNoTypeNoCrash.ts(1,51): error TS2304: Cannot find name 'K'. +mappedTypeNoTypeNoCrash.ts(1,51): error TS4081: Exported type alias 'T0' has or is using private name 'K'. +mappedTypeNoTypeNoCrash.ts(1,57): error TS2304: Cannot find name 'K'. +mappedTypeNoTypeNoCrash.ts(1,57): error TS4081: Exported type alias 'T0' has or is using private name 'K'. + + +==== mappedTypeNoTypeNoCrash.ts (4 errors) ==== + type T0 = ({[K in keyof T]}) extends ({[key in K]: T[K]}) ? number : never; + ~ +!!! error TS2304: Cannot find name 'K'. + ~ +!!! error TS4081: Exported type alias 'T0' has or is using private name 'K'. + ~ +!!! error TS2304: Cannot find name 'K'. + ~ +!!! error TS4081: Exported type alias 'T0' has or is using private name 'K'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts new file mode 100644 index 0000000000000..d4f28415ec684 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts @@ -0,0 +1,107 @@ +//// [tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts] //// + +//// [mappedTypeWithAsClauseAndLateBoundProperty2.ts] +export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); + + +/// [Declarations] //// + + + +//// [mappedTypeWithAsClauseAndLateBoundProperty2.d.ts] +export declare const thing: { + [x: number]: number; + toString: () => string; + toLocaleString: () => string; + pop: () => number; + push: (...items: number[]) => number; + concat: { + (...items: ConcatArray[]): number[]; + (...items: (number | ConcatArray)[]): number[]; + }; + join: (separator?: string) => string; + reverse: () => number[]; + shift: () => number; + slice: (start?: number, end?: number) => number[]; + sort: (compareFn?: (a: number, b: number) => number) => number[]; + splice: { + (start: number, deleteCount?: number): number[]; + (start: number, deleteCount: number, ...items: number[]): number[]; + }; + unshift: (...items: number[]) => number; + indexOf: (searchElement: number, fromIndex?: number) => number; + lastIndexOf: (searchElement: number, fromIndex?: number) => number; + every: { + (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; + (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; + }; + some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; + forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; + map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; + filter: { + (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; + (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; + }; + reduce: { + (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; + (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; + (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; + }; + reduceRight: { + (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; + (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; + (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; + }; + find: { + (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; + (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; + }; + findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; + fill: (value: number, start?: number, end?: number) => number[]; + copyWithin: (target: number, start: number, end?: number) => number[]; + entries: () => IterableIterator<[number, number]>; + keys: () => IterableIterator; + values: () => IterableIterator; + includes: (searchElement: number, fromIndex?: number) => boolean; + flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; + flat: (this: A, depth?: D) => FlatArray[]; + [Symbol.iterator]: () => IterableIterator; + readonly [Symbol.unscopables]: { + [x: number]: boolean; + length?: boolean; + toString?: boolean; + toLocaleString?: boolean; + pop?: boolean; + push?: boolean; + concat?: boolean; + join?: boolean; + reverse?: boolean; + shift?: boolean; + slice?: boolean; + sort?: boolean; + splice?: boolean; + unshift?: boolean; + indexOf?: boolean; + lastIndexOf?: boolean; + every?: boolean; + some?: boolean; + forEach?: boolean; + map?: boolean; + filter?: boolean; + reduce?: boolean; + reduceRight?: boolean; + find?: boolean; + findIndex?: boolean; + fill?: boolean; + copyWithin?: boolean; + entries?: boolean; + keys?: boolean; + values?: boolean; + includes?: boolean; + flatMap?: boolean; + flat?: boolean; + [Symbol.iterator]?: boolean; + readonly [Symbol.unscopables]?: boolean; + }; +}; +//# sourceMappingURL=mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixinClassesAnnotated.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixinClassesAnnotated.d.ts.map new file mode 100644 index 0000000000000..63408dc9c498f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixinClassesAnnotated.d.ts.map @@ -0,0 +1,117 @@ +//// [tests/cases/conformance/classes/mixinClassesAnnotated.ts] //// + +//// [mixinClassesAnnotated.ts] +type Constructor = new(...args: any[]) => T; + +class Base { + constructor(public x: number, public y: number) {} +} + +class Derived extends Base { + constructor(x: number, y: number, public z: number) { + super(x, y); + } +} + +interface Printable { + print(): void; +} + +const Printable = >(superClass: T): Constructor & { message: string } & T => + class extends superClass { + static message = "hello"; + print() { + const output = this.x + "," + this.y; + } + } + +interface Tagged { + _tag: string; +} + +function Tagged>(superClass: T): Constructor & T { + class C extends superClass { + _tag: string; + constructor(...args: any[]) { + super(...args); + this._tag = "hello"; + } + } + return C; +} + +const Thing1: Constructor & typeof Derived = Tagged(Derived); +const Thing2: Constructor & Constructor & { + message: string; +} & typeof Derived = Tagged(Printable(Derived)); +Thing2.message; + +function f1(): void { + const thing = new Thing1(1, 2, 3); + thing.x; + thing._tag; +} + +function f2(): void { + const thing = new Thing2(1, 2, 3); + thing.x; + thing._tag; + thing.print(); +} + +class Thing3 extends Thing2 { + constructor(tag: string) { + super(10, 20, 30); + this._tag = tag; + } + test(): void { + this.print(); + } +} + + +/// [Declarations] //// + + + +//// [mixinClassesAnnotated.d.ts] +type Constructor = new (...args: any[]) => T; +declare class Base { + x: number; + y: number; + constructor(x: number, y: number); +} +declare class Derived extends Base { + z: number; + constructor(x: number, y: number, z: number); +} +interface Printable { + print(): void; +} +declare const Printable: >(superClass: T) => Constructor & { + message: string; +} & T; +interface Tagged { + _tag: string; +} +declare function Tagged>(superClass: T): Constructor & T; +declare const Thing1: Constructor & typeof Derived; +declare const Thing2: Constructor & Constructor & { + message: string; +} & typeof Derived; +declare function f1(): void; +declare function f2(): void; +declare class Thing3 extends Thing2 { + constructor(tag: string); + test(): void; +} +//# sourceMappingURL=mixinClassesAnnotated.d.ts.map + +/// [Declarations Maps] //// + + +//// [mixinClassesAnnotated.d.ts.map] +{"version":3,"file":"mixinClassesAnnotated.d.ts","sourceRoot":"","sources":["mixinClassesAnnotated.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,CAAC,CAAC,IAAI,KAAI,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAE/C,cAAM,IAAI;IACa,CAAC,EAAE,MAAM;IAAS,CAAC,EAAE,MAAM;gBAA3B,CAAC,EAAE,MAAM,EAAS,CAAC,EAAE,MAAM;CACjD;AAED,cAAM,OAAQ,SAAQ,IAAI;IACmB,CAAC,EAAE,MAAM;gBAAtC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAS,CAAC,EAAE,MAAM;CAGrD;AAED,UAAU,SAAS;IACf,KAAK,IAAI,IAAI,CAAC;CACjB;AAED,QAAA,MAAM,SAAS,4CAA6C,CAAC,KAAG,YAAY,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,CAM1G,CAAA;AAEL,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,iBAAS,MAAM,CAAC,CAAC,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3RvcjxUPiA9IG5ldyguLi5hcmdzOiBhbnlbXSkgPT4gVDsKCmNsYXNzIEJhc2UgewogICAgY29uc3RydWN0b3IocHVibGljIHg6IG51bWJlciwgcHVibGljIHk6IG51bWJlcikge30KfQoKY2xhc3MgRGVyaXZlZCBleHRlbmRzIEJhc2UgewogICAgY29uc3RydWN0b3IoeDogbnVtYmVyLCB5OiBudW1iZXIsIHB1YmxpYyB6OiBudW1iZXIpIHsKICAgICAgICBzdXBlcih4LCB5KTsKICAgIH0KfQoKaW50ZXJmYWNlIFByaW50YWJsZSB7CiAgICBwcmludCgpOiB2b2lkOwp9Cgpjb25zdCBQcmludGFibGUgPSA8VCBleHRlbmRzIENvbnN0cnVjdG9yPEJhc2U+PihzdXBlckNsYXNzOiBUKTogQ29uc3RydWN0b3I8UHJpbnRhYmxlPiAmIHsgbWVzc2FnZTogc3RyaW5nIH0gJiBUID0+CiAgICBjbGFzcyBleHRlbmRzIHN1cGVyQ2xhc3MgewogICAgICAgIHN0YXRpYyBtZXNzYWdlID0gImhlbGxvIjsKICAgICAgICBwcmludCgpIHsKICAgICAgICAgICAgY29uc3Qgb3V0cHV0ID0gdGhpcy54ICsgIiwiICsgdGhpcy55OwogICAgICAgIH0KICAgIH0KCmludGVyZmFjZSBUYWdnZWQgewogICAgX3RhZzogc3RyaW5nOwp9CgpmdW5jdGlvbiBUYWdnZWQ8VCBleHRlbmRzIENvbnN0cnVjdG9yPHt9Pj4oc3VwZXJDbGFzczogVCk6IENvbnN0cnVjdG9yPFRhZ2dlZD4gJiBUIHsKICAgIGNsYXNzIEMgZXh0ZW5kcyBzdXBlckNsYXNzIHsKICAgICAgICBfdGFnOiBzdHJpbmc7CiAgICAgICAgY29uc3RydWN0b3IoLi4uYXJnczogYW55W10pIHsKICAgICAgICAgICAgc3VwZXIoLi4uYXJncyk7CiAgICAgICAgICAgIHRoaXMuX3RhZyA9ICJoZWxsbyI7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIEM7Cn0KCmNvbnN0IFRoaW5nMTogQ29uc3RydWN0b3I8VGFnZ2VkPiAmIHR5cGVvZiBEZXJpdmVkID0gVGFnZ2VkKERlcml2ZWQpOwpjb25zdCBUaGluZzI6IENvbnN0cnVjdG9yPFRhZ2dlZD4gJiBDb25zdHJ1Y3RvcjxQcmludGFibGU+ICYgewogICAgbWVzc2FnZTogc3RyaW5nOwp9ICYgdHlwZW9mIERlcml2ZWQgPSBUYWdnZWQoUHJpbnRhYmxlKERlcml2ZWQpKTsKVGhpbmcyLm1lc3NhZ2U7CgpmdW5jdGlvbiBmMSgpOiB2b2lkIHsKICAgIGNvbnN0IHRoaW5nID0gbmV3IFRoaW5nMSgxLCAyLCAzKTsKICAgIHRoaW5nLng7CiAgICB0aGluZy5fdGFnOwp9CgpmdW5jdGlvbiBmMigpOiB2b2lkIHsKICAgIGNvbnN0IHRoaW5nID0gbmV3IFRoaW5nMigxLCAyLCAzKTsKICAgIHRoaW5nLng7CiAgICB0aGluZy5fdGFnOwogICAgdGhpbmcucHJpbnQoKTsKfQoKY2xhc3MgVGhpbmczIGV4dGVuZHMgVGhpbmcyIHsKICAgIGNvbnN0cnVjdG9yKHRhZzogc3RyaW5nKSB7CiAgICAgICAgc3VwZXIoMTAsIDIwLCAzMCk7CiAgICAgICAgdGhpcy5fdGFnID0gdGFnOwogICAgfQogICAgdGVzdCgpOiB2b2lkIHsKICAgICAgICB0aGlzLnByaW50KCk7CiAgICB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map new file mode 100644 index 0000000000000..ec4840d8fcb02 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map @@ -0,0 +1,76 @@ +//// [tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts] //// + +//// [index.ts] +export * from "./account"; + +//// [account.ts] +export interface Account { + myAccNum: number; +} +interface Account2 { + myAccNum: number; +} +export { Account2 as Acc }; + +//// [index.ts] +declare global { + interface Account { + someProp: number; + } + interface Acc { + someProp: number; + } +} +import * as model from "./model"; +export const func = (account: model.Account, acc2: model.Acc): void => {}; + + +/// [Declarations] //// + + + +//// [index.d.ts] +declare global { + interface Account { + someProp: number; + } + interface Acc { + someProp: number; + } +} +import * as model from "./model"; +export declare const func: (account: model.Account, acc2: model.Acc) => void; +//# sourceMappingURL=index.d.ts.map +//// [model/index.d.ts] +export * from "./account"; +//# sourceMappingURL=index.d.ts.map +//// [/.src/model/account.d.ts] +export interface Account { + myAccNum: number; +} +interface Account2 { + myAccNum: number; +} +export { Account2 as Acc }; +//# sourceMappingURL=account.d.ts.map + +/// [Declarations Maps] //// + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO;QACb,QAAQ,EAAE,MAAM,CAAC;KACpB;IACD,UAAU,GAAG;QACT,QAAQ,EAAE,MAAM,CAAC;KACpB;CACJ;AACD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,eAAO,MAAM,IAAI,YAAa,aAAa,QAAQ,SAAS,KAAG,IAAU,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBnbG9iYWwgew0KICAgIGludGVyZmFjZSBBY2NvdW50IHsNCiAgICAgICAgc29tZVByb3A6IG51bWJlcjsNCiAgICB9DQogICAgaW50ZXJmYWNlIEFjYyB7DQogICAgICAgIHNvbWVQcm9wOiBudW1iZXI7DQogICAgfQ0KfQ0KaW1wb3J0ICogYXMgbW9kZWwgZnJvbSAiLi9tb2RlbCI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmdW5jOiAoYWNjb3VudDogbW9kZWwuQWNjb3VudCwgYWNjMjogbW9kZWwuQWNjKSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sQ0FBQyxNQUFNLENBQUM7SUFDWCxVQUFVLE9BQU87UUFDYixRQUFRLEVBQUUsTUFBTSxDQUFDO0tBQ3BCO0lBQ0QsVUFBVSxHQUFHO1FBQ1QsUUFBUSxFQUFFLE1BQU0sQ0FBQztLQUNwQjtDQUNKO0FBQ0QsT0FBTyxLQUFLLEtBQUssTUFBTSxTQUFTLENBQUM7QUFDakMsZUFBTyxNQUFNLElBQUksWUFBYSxhQUFhLFFBQVEsU0FBUyxLQUFHLElBQVUsQ0FBQyJ9,ZXhwb3J0ICogZnJvbSAiLi9hY2NvdW50IjsK + + +//// [model/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBnbG9iYWwgew0KICAgIGludGVyZmFjZSBBY2NvdW50IHsNCiAgICAgICAgc29tZVByb3A6IG51bWJlcjsNCiAgICB9DQogICAgaW50ZXJmYWNlIEFjYyB7DQogICAgICAgIHNvbWVQcm9wOiBudW1iZXI7DQogICAgfQ0KfQ0KaW1wb3J0ICogYXMgbW9kZWwgZnJvbSAiLi9tb2RlbCI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmdW5jOiAoYWNjb3VudDogbW9kZWwuQWNjb3VudCwgYWNjMjogbW9kZWwuQWNjKSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsV0FBVyxDQUFDIn0=,ZXhwb3J0ICogZnJvbSAiLi9hY2NvdW50IjsK + + +//// [/.src/model/account.d.ts.map] +{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["account.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACpB,QAAQ,EAAE,MAAM,CAAC;CACpB;AACD,UAAU,QAAQ;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB;AACD,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBBY2NvdW50IHsNCiAgICBteUFjY051bTogbnVtYmVyOw0KfQ0KaW50ZXJmYWNlIEFjY291bnQyIHsNCiAgICBteUFjY051bTogbnVtYmVyOw0KfQ0KZXhwb3J0IHsgQWNjb3VudDIgYXMgQWNjIH07DQovLyMgc291cmNlTWFwcGluZ1VSTD1hY2NvdW50LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3VudC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYWNjb3VudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFdBQVcsT0FBTztJQUNwQixRQUFRLEVBQUUsTUFBTSxDQUFDO0NBQ3BCO0FBQ0QsVUFBVSxRQUFRO0lBQ2QsUUFBUSxFQUFFLE1BQU0sQ0FBQztDQUNwQjtBQUNELE9BQU8sRUFBRSxRQUFRLElBQUksR0FBRyxFQUFFLENBQUMifQ==,ZXhwb3J0IGludGVyZmFjZSBBY2NvdW50IHsKICAgIG15QWNjTnVtOiBudW1iZXI7Cn0KaW50ZXJmYWNlIEFjY291bnQyIHsKICAgIG15QWNjTnVtOiBudW1iZXI7Cn0KZXhwb3J0IHsgQWNjb3VudDIgYXMgQWNjIH07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/namedTupleMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/namedTupleMembers.d.ts new file mode 100644 index 0000000000000..a20f41fbb4843 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/namedTupleMembers.d.ts @@ -0,0 +1,125 @@ +//// [tests/cases/conformance/types/tuple/named/namedTupleMembers.ts] //// + +//// [namedTupleMembers.ts] +export type Segment = [length: number, count: number]; + +export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number +]; + +declare var a: Segment; +declare var b: SegmentAnnotated; +declare var c: [number, number]; +declare var d: [a: number, b: number]; + +a = b; +a = c; +a = d; + +b = a; +b = c; +b = d; + +c = a; +c = b; +c = d; + +d = a; +d = b; +d = c; + +export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; + +export type Func = (...x: T) => void; + +export const func = null as any as Func; + +export function useState(initial: T): [value: T, setter: (T: any) => void] { + return null as any; +} + + +export type Iter = Func<[step: number, iterations: number]>; + +export function readSegment([length, count]: [number, number]): void {} + +// documenting binding pattern behavior (currently does _not_ generate tuple names) +export const val = null as any as Parameters[0]; + +export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; + +export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; + +declare var q: RecursiveTupleA; +declare var r: RecursiveTupleB; + +q = r; +r = q; + +export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; +export type RecusiveRest2 = [string, ...RecusiveRest2[]]; + +declare var x: RecusiveRest; +declare var y: RecusiveRest2; + +x = y; +y = x; + +declare function f(...x: T): T; +declare function g(elem: object, index: number): object; +declare function getArgsForInjection any>(x: T): Parameters; + +export const argumentsOfGAsFirstArgument: [ + [elem: object, index: number] +] = f(getArgsForInjection(g)); // one tuple with captures arguments as first member +export const argumentsOfG: [ + elem: object, + index: number +] = f(...getArgsForInjection(g)); // captured arguments list re-spread + + +/// [Declarations] //// + + + +//// [namedTupleMembers.d.ts] +export type Segment = [length: number, count: number]; +export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number +]; +export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; +export type Func = (...x: T) => void; +export declare const func: Func; +export declare function useState(initial: T): [value: T, setter: (T: any) => void]; +export type Iter = Func<[step: number, iterations: number]>; +export declare function readSegment([length, count]: [number, number]): void; +export declare const val: [number, number]; +export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; +export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; +export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; +export type RecusiveRest2 = [string, ...RecusiveRest2[]]; +export declare const argumentsOfGAsFirstArgument: [ + [ + elem: object, + index: number + ] +]; +export declare const argumentsOfG: [ + elem: object, + index: number +]; +//# sourceMappingURL=namedTupleMembers.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noEmitOnError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noEmitOnError.d.ts new file mode 100644 index 0000000000000..3165d13eface1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noEmitOnError.d.ts @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/noEmitOnError.ts] //// + +//// [noEmitOnError.ts] +var x: number = ""; + + +/// [Declarations] //// + + +/// [Errors] //// + +noEmitOnError.ts(1,5): error TS2322: Type 'string' is not assignable to type 'number'. + + +==== noEmitOnError.ts (1 errors) ==== + var x: number = ""; + ~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noInferRedeclaration.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noInferRedeclaration.d.ts.map new file mode 100644 index 0000000000000..6ae33129108d9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noInferRedeclaration.d.ts.map @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/noInferRedeclaration.ts] //// + +//// [a.ts] +export const f = (x: T, y: NoInfer): T => x; + +//// [b.ts] +import { f } from "./a"; + +type NoInfer = T & number; + +export const g: (x: T, y: globalThis.NoInfer) => T = f; + + +/// [Declarations] //// + + + +//// [a.d.ts] +export declare const f: (x: T, y: NoInfer) => T; +//# sourceMappingURL=a.d.ts.map +//// [b.d.ts] +export declare const g: (x: T, y: globalThis.NoInfer) => T; +//# sourceMappingURL=b.d.ts.map + +/// [Declarations Maps] //// + + +//// [a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,SAAU,CAAC,KAAK,QAAQ,CAAC,CAAC,KAAG,CAAM,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZjogPFQ+KHg6IFQsIHk6IE5vSW5mZXI8VD4pID0+IFQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1hLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sQ0FBQyxTQUFVLENBQUMsS0FBSyxRQUFRLENBQUMsQ0FBQyxLQUFHLENBQU0sQ0FBQyJ9,ZXhwb3J0IGNvbnN0IGYgPSA8VD4oeDogVCwgeTogTm9JbmZlcjxUPik6IFQgPT4geDsK + + +//// [b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAK,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZzogPFQ+KHg6IFQsIHk6IGdsb2JhbFRoaXMuTm9JbmZlcjxUPikgPT4gVDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWIuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxlQUFPLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLFVBQVUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBSyxDQUFDIn0=,aW1wb3J0IHsgZiB9IGZyb20gIi4vYSI7Cgp0eXBlIE5vSW5mZXI8VD4gPSBUICYgbnVtYmVyOwoKZXhwb3J0IGNvbnN0IGc6IDxUPih4OiBULCB5OiBnbG9iYWxUaGlzLk5vSW5mZXI8VD4pID0+IFQgPSBmOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts new file mode 100644 index 0000000000000..9e25dcd7b8d0f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// + +//// [index.d.ts] +export interface PrismaClientOptions { + rejectOnNotFound?: any; +} + +export class PrismaClient { + private fetcher; +} + +//// [index.d.ts] +export * from ".prisma/client"; + +//// [index.ts] +import { PrismaClient } from "@prisma/client"; +declare const enhancePrisma: (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; +const EnhancedPrisma = enhancePrisma(PrismaClient); +export default new EnhancedPrisma(); + + +/// [Declarations] //// + + + +//// [/index.d.ts] +import { PrismaClient } from "@prisma/client"; +declare const _default: PrismaClient; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts new file mode 100644 index 0000000000000..47ab9a3f95713 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// + +//// [index.ts] +// cjs format file +export * from "fs"; +export * as fs from "fs"; +//// [index.js] +// esm format file +export * from "fs"; +export * as fs from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +/// +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS6504: File 'index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? + The file is in the program because: + Root file specified for compilation +subfolder/index.ts(2,1): error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +subfolder/index.ts(3,1): error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +!!! error TS6504: File 'index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? +!!! error TS6504: The file is in the program because: +!!! error TS6504: Root file specified for compilation +==== subfolder/index.ts (2 errors) ==== + // cjs format file + export * from "fs"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + export * as fs from "fs"; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.js (0 errors) ==== + // esm format file + export * from "fs"; + export * as fs from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts new file mode 100644 index 0000000000000..47ab9a3f95713 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// + +//// [index.ts] +// cjs format file +export * from "fs"; +export * as fs from "fs"; +//// [index.js] +// esm format file +export * from "fs"; +export * as fs from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +/// +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS6504: File 'index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? + The file is in the program because: + Root file specified for compilation +subfolder/index.ts(2,1): error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +subfolder/index.ts(3,1): error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +!!! error TS6504: File 'index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? +!!! error TS6504: The file is in the program because: +!!! error TS6504: Root file specified for compilation +==== subfolder/index.ts (2 errors) ==== + // cjs format file + export * from "fs"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + export * as fs from "fs"; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.js (0 errors) ==== + // esm format file + export * from "fs"; + export * as fs from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts new file mode 100644 index 0000000000000..7f6bca552c9e2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" +} + +/// [Declarations] //// + + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ +!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts new file mode 100644 index 0000000000000..7f6bca552c9e2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" +} + +/// [Declarations] //// + + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ +!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=node16).d.ts new file mode 100644 index 0000000000000..3a8730e1e97bc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=node16).d.ts @@ -0,0 +1,85 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +import {a as a2} from "package"; +//// [index.ts] +// esm format file +export { x } from "./other.js"; +//// [other.ts] +// esm format file +export interface Thing {} +export const x: () => Thing = null as any; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.ts" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" +} + +/// [Declarations] //// + + + +//// [/.src/node_modules/inner/index.d.ts] +export { x } from "./other.js"; +//# sourceMappingURL=index.d.ts.map +//// [/.src/node_modules/inner/other.d.ts] +export interface Thing { +} +export declare const x: () => Thing; +//# sourceMappingURL=other.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ +!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + import {a as a2} from "package"; +==== node_modules/inner/index.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing = null as any; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.ts" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=nodenext).d.ts new file mode 100644 index 0000000000000..3a8730e1e97bc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=nodenext).d.ts @@ -0,0 +1,85 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +import {a as a2} from "package"; +//// [index.ts] +// esm format file +export { x } from "./other.js"; +//// [other.ts] +// esm format file +export interface Thing {} +export const x: () => Thing = null as any; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.ts" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" +} + +/// [Declarations] //// + + + +//// [/.src/node_modules/inner/index.d.ts] +export { x } from "./other.js"; +//# sourceMappingURL=index.d.ts.map +//// [/.src/node_modules/inner/other.d.ts] +export interface Thing { +} +export declare const x: () => Thing; +//# sourceMappingURL=other.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (4 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~ +!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + import {a as a2} from "package"; +==== node_modules/inner/index.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing = null as any; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.ts" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts new file mode 100644 index 0000000000000..4568663e72ef1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other.js"; // should fail +export const a = (await import("inner")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: import("inner/other").Thing; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (3 errors) ==== + // esm format file + import { Thing } from "inner/other.js"; // should fail + ~~~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts new file mode 100644 index 0000000000000..4568663e72ef1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other.js"; // should fail +export const a = (await import("inner")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: import("inner/other").Thing; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (3 errors) ==== + // esm format file + import { Thing } from "inner/other.js"; // should fail + ~~~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. + export const a = (await import("inner")).x(); + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts new file mode 100644 index 0000000000000..3473da5aa83a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts @@ -0,0 +1,79 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner/index.js")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: import("inner/other.js").Thing; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (3 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts new file mode 100644 index 0000000000000..3473da5aa83a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts @@ -0,0 +1,79 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner/index.js")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: import("inner/other.js").Thing; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (3 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts new file mode 100644 index 0000000000000..5c0b944aae7f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts @@ -0,0 +1,79 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner/index.js")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: import("inner/other.js").Thing; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (3 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts new file mode 100644 index 0000000000000..5c0b944aae7f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts @@ -0,0 +1,79 @@ +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner/index.js")).x(); +//// [index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } +} + +/// [Declarations] //// + + + +//// [index.d.ts] +export declare const a: import("inner/other.js").Thing; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. +index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== index.ts (3 errors) ==== + // esm format file + import { Thing } from "inner/other"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. + export const a = (await import("inner/index.js")).x(); + ~~~~~ +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +==== node_modules/inner/index.d.ts (0 errors) ==== + // esm format file + export { x } from "./other.js"; +==== node_modules/inner/other.d.ts (0 errors) ==== + // esm format file + export interface Thing {} + export const x: () => Thing; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" + } +==== node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=node16).d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=node16).d.ts.map new file mode 100644 index 0000000000000..ea15cfdd8f016 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=node16).d.ts.map @@ -0,0 +1,195 @@ +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + +//// [index.ts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [package.json] +{ +} +//// [package.json] +{ + "type": "module" +} + +/// [Declarations] //// + + + +//// [index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder2/another/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder2/another/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder2/another/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder2/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder2/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder2/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=nodenext).d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=nodenext).d.ts.map new file mode 100644 index 0000000000000..ea15cfdd8f016 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=nodenext).d.ts.map @@ -0,0 +1,195 @@ +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + +//// [index.ts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.mts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [index.cts] +// cjs format file +const x = (): T => (void 0); +export {x}; +//// [index.ts] +// esm format file +const x = (): T => (void 0); +export {x}; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [package.json] +{ +} +//// [package.json] +{ + "type": "module" +} + +/// [Declarations] //// + + + +//// [index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder2/another/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder2/another/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder2/another/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map +//// [subfolder2/index.d.cts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.cts.map +//// [subfolder2/index.d.mts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.mts.map +//// [subfolder2/index.d.ts] +declare const x: () => T; +export { x }; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/another/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.cts.map] +{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["index.cts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5jdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5jdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5jdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsUUFBQSxNQUFNLENBQUMsV0FBVSxDQUFxQixDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxDQUFDLEVBQUMsQ0FBQyJ9,Ly8gZXNtIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + + +//// [subfolder2/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,CAAC,WAAU,CAAqB,CAAC;AACvC,OAAO,EAAC,CAAC,EAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiA8VD4oKSA9PiBUOw0KZXhwb3J0IHsgeCB9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLFFBQUEsTUFBTSxDQUFDLFdBQVUsQ0FBcUIsQ0FBQztBQUN2QyxPQUFPLEVBQUMsQ0FBQyxFQUFDLENBQUMifQ==,Ly8gY2pzIGZvcm1hdCBmaWxlCmNvbnN0IHggPSA8VD4oKTogVCA9PiA8VD48YW55Pih2b2lkIDApOwpleHBvcnQge3h9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAssignments(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAssignments(module=node16).d.ts new file mode 100644 index 0000000000000..474b8e0f3f3e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAssignments(module=node16).d.ts @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// + +//// [index.ts] +// cjs format file +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [index.ts] +// esm format file +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [file.ts] +// esm format file +const __require = null; +const _createRequire = null; +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; + +/// [Declarations] //// + + + +//// [file.d.ts] +/// +export import fs2 = require("fs"); +//# sourceMappingURL=file.d.ts.map +//// [index.d.ts] +/// +export import fs2 = require("fs"); +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +/// +export import fs2 = require("fs"); +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAssignments(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAssignments(module=nodenext).d.ts new file mode 100644 index 0000000000000..474b8e0f3f3e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAssignments(module=nodenext).d.ts @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// + +//// [index.ts] +// cjs format file +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [index.ts] +// esm format file +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [file.ts] +// esm format file +const __require = null; +const _createRequire = null; +import fs = require("fs"); +fs.readFile; +export import fs2 = require("fs"); +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; + +/// [Declarations] //// + + + +//// [file.d.ts] +/// +export import fs2 = require("fs"); +//# sourceMappingURL=file.d.ts.map +//// [index.d.ts] +/// +export import fs2 = require("fs"); +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +/// +export import fs2 = require("fs"); +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts new file mode 100644 index 0000000000000..7febf988ab1b4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts new file mode 100644 index 0000000000000..7febf988ab1b4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions2(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions2(module=node16).d.ts new file mode 100644 index 0000000000000..c5dbe11f7f018 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions2(module=node16).d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// + +//// [index.ts] +// cjs format file +export * from "fs"; +export * as fs from "fs"; +//// [index.ts] +// esm format file +export * from "fs"; +export * as fs from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [index.d.ts] +/// +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +/// +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +subfolder/index.ts(2,1): error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +subfolder/index.ts(3,1): error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +==== subfolder/index.ts (2 errors) ==== + // cjs format file + export * from "fs"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + export * as fs from "fs"; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.ts (0 errors) ==== + // esm format file + export * from "fs"; + export * as fs from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts new file mode 100644 index 0000000000000..c5dbe11f7f018 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// + +//// [index.ts] +// cjs format file +export * from "fs"; +export * as fs from "fs"; +//// [index.ts] +// esm format file +export * from "fs"; +export * as fs from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [index.d.ts] +/// +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +/// +export * from "fs"; +export * as fs from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +subfolder/index.ts(2,1): error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +subfolder/index.ts(3,1): error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +==== subfolder/index.ts (2 errors) ==== + // cjs format file + export * from "fs"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__exportStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + export * as fs from "fs"; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importStar' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.ts (0 errors) ==== + // esm format file + export * from "fs"; + export * as fs from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions3(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions3(module=node16).d.ts new file mode 100644 index 0000000000000..cd7340b8c7c9d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions3(module=node16).d.ts @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// + +//// [index.ts] +// cjs format file +export {default} from "fs"; +//// [index.ts] +// esm format file +export {default} from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [index.d.ts] +/// +export { default } from "fs"; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +/// +export { default } from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +subfolder/index.ts(2,9): error TS2343: This syntax requires an imported helper named '__importDefault' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +==== subfolder/index.ts (1 errors) ==== + // cjs format file + export {default} from "fs"; + ~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importDefault' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.ts (0 errors) ==== + // esm format file + export {default} from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts new file mode 100644 index 0000000000000..cd7340b8c7c9d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// + +//// [index.ts] +// cjs format file +export {default} from "fs"; +//// [index.ts] +// esm format file +export {default} from "fs"; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module" +} +//// [package.json] +{ + "type": "commonjs" +} +//// [types.d.ts] +declare module "fs"; +declare module "tslib" { + export {}; + // intentionally missing all helpers +} + +/// [Declarations] //// + + + +//// [index.d.ts] +/// +export { default } from "fs"; +//# sourceMappingURL=index.d.ts.map +//// [subfolder/index.d.ts] +/// +export { default } from "fs"; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +subfolder/index.ts(2,9): error TS2343: This syntax requires an imported helper named '__importDefault' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. + + +==== subfolder/index.ts (1 errors) ==== + // cjs format file + export {default} from "fs"; + ~~~~~~~ +!!! error TS2343: This syntax requires an imported helper named '__importDefault' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +==== index.ts (0 errors) ==== + // esm format file + export {default} from "fs"; +==== package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } +==== types.d.ts (0 errors) ==== + declare module "fs"; + declare module "tslib" { + export {}; + // intentionally missing all helpers + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts new file mode 100644 index 0000000000000..fc9b903a10276 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts new file mode 100644 index 0000000000000..fc9b903a10276 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts new file mode 100644 index 0000000000000..64f7388d0ac9b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts @@ -0,0 +1,175 @@ +//// [tests/cases/conformance/declarationEmit/nullPropertyName.ts] //// + +//// [nullPropertyName.ts] +function foo(): void {} +// properties +foo.x = 1; +foo.y = 1; + +// keywords +foo.break = 1; +foo.case = 1; +foo.catch = 1; +foo.class = 1; +foo.const = 1; +foo.continue = 1; +foo.debugger = 1; +foo.default = 1; +foo.delete = 1; +foo.do = 1; +foo.else = 1; +foo.enum = 1; +foo.export = 1; +foo.extends = 1; +foo.false = 1; +foo.finally = 1; +foo.for = 1; +foo.function = 1; +foo.if = 1; +foo.import = 1; +foo.in = 1; +foo.instanceof = 1; +foo.new = 1; +foo.null = 1; +foo.return = 1; +foo.super = 1; +foo.switch = 1; +foo.this = 1; +foo.throw = 1; +foo.true = 1; +foo.try = 1; +foo.typeof = 1; +foo.var = 1; +foo.void = 1; +foo.while = 1; +foo.with = 1; +foo.implements = 1; +foo.interface = 1; +foo.let = 1; +foo.package = 1; +foo.private = 1; +foo.protected = 1; +foo.public = 1; +foo.static = 1; +foo.yield = 1; +foo.abstract = 1; +foo.as = 1; +foo.asserts = 1; +foo.any = 1; +foo.async = 1; +foo.await = 1; +foo.boolean = 1; +foo.constructor = 1; +foo.declare = 1; +foo.get = 1; +foo.infer = 1; +foo.is = 1; +foo.keyof = 1; +foo.module = 1; +foo.namespace = 1; +foo.never = 1; +foo.readonly = 1; +foo.require = 1; +foo.number = 1; +foo.object = 1; +foo.set = 1; +foo.string = 1; +foo.symbol = 1; +foo.type = 1; +foo.undefined = 1; +foo.unique = 1; +foo.unknown = 1; +foo.from = 1; +foo.global = 1; +foo.bigint = 1; +foo.of = 1; + + +/// [Declarations] //// + + + +//// [nullPropertyName.d.ts] +declare function foo(): void; +declare namespace foo { + export var x: number; + export var y: number; + var _a: number; + var _b: number; + var _c: number; + var _d: number; + var _e: number; + var _f: number; + var _g: number; + var _h: number; + var _j: number; + var _k: number; + var _l: number; + var _m: number; + var _o: number; + var _p: number; + var _q: number; + var _r: number; + var _s: number; + var _t: number; + var _u: number; + var _v: number; + var _w: number; + var _x: number; + var _y: number; + var _z: number; + var _0: number; + var _1: number; + var _2: number; + var _3: number; + var _4: number; + var _5: number; + var _6: number; + var _7: number; + var _8: number; + var _9: number; + var _10: number; + var _11: number; + var _12: number; + var _13: number; + var _14: number; + var _15: number; + var _16: number; + var _17: number; + var _18: number; + var _19: number; + var _20: number; + export var abstract: number; + export var as: number; + export var asserts: number; + export var any: number; + export var async: number; + export var await: number; + export var boolean: number; + export var constructor: number; + export var declare: number; + export var get: number; + export var infer: number; + export var is: number; + export var keyof: number; + export var module: number; + export var namespace: number; + export var never: number; + export var readonly: number; + export var require: number; + export var number: number; + export var object: number; + export var set: number; + export var string: number; + export var symbol: number; + export var type: number; + export var undefined: number; + export var unique: number; + export var unknown: number; + export var from: number; + export var global: number; + export var bigint: number; + export var of: number; + export { _a as break, _b as case, _c as catch, _d as class, _e as const, _f as continue, _g as debugger, _h as default, _j as delete, _k as do, _l as else, _m as enum, _o as export, _p as extends, _q as false, _r as finally, _s as for, _t as function, _u as if, _v as import, _w as in, _x as instanceof, _y as new, _z as null, _0 as return, _1 as super, _2 as switch, _3 as this, _4 as throw, _5 as true, _6 as try, _7 as typeof, _8 as var, _9 as void, _10 as while, _11 as with, _12 as implements, _13 as interface, _14 as let, _15 as package, _16 as private, _17 as protected, _18 as public, _19 as static, _20 as yield }; +} +//# sourceMappingURL=nullPropertyName.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts new file mode 100644 index 0000000000000..fdb8538d0a2eb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts @@ -0,0 +1,86 @@ +//// [tests/cases/compiler/numericEnumMappedType.ts] //// + +//// [numericEnumMappedType.ts] +// Repro from #31771 + +enum E1 { ONE, TWO, THREE } +declare enum E2 { ONE, TWO, THREE } + +type Bins1 = { [k in E1]?: string; } +type Bins2 = { [k in E2]?: string; } + +const b1: Bins1 = {}; +const b2: Bins2 = {}; + +const e1: E1 = E1.ONE; +const e2: E2 = E2.ONE; + +b1[1] = "a"; +b1[e1] = "b"; + +b2[1] = "a"; +b2[e2] = "b"; + +// Multiple numeric enum types accrue to the same numeric index signature in a mapped type + +declare function val(): number; + +enum N1 { A = val(), B = val() } +enum N2 { C = val(), D = val() } + +type T1 = { [K in N1 | N2]: K }; + +// Enum types with string valued members are always literal enum types and therefore +// ONE and TWO below are not computed members but rather just numerically valued members +// with auto-incremented values. + +declare enum E { ONE, TWO, THREE = 'x' } +const e: E = E.ONE; +const x: E.ONE = e; + + +/// [Declarations] //// + + + +//// [numericEnumMappedType.d.ts] +declare enum E1 { + ONE = 0, + TWO = 1, + THREE = 2 +} +declare enum E2 { + ONE, + TWO, + THREE +} +type Bins1 = { + [k in E1]?: string; +}; +type Bins2 = { + [k in E2]?: string; +}; +declare const b1: Bins1; +declare const b2: Bins2; +declare const e1: E1; +declare const e2: E2; +declare function val(): number; +declare enum N1 { + A, + B +} +declare enum N2 { + C, + D +} +type T1 = { + [K in N1 | N2]: K; +}; +declare enum E { + ONE, + TWO, + THREE = "x" +} +declare const e: E; +declare const x: E.ONE; +//# sourceMappingURL=numericEnumMappedType.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralComputedNameNoDeclarationError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralComputedNameNoDeclarationError.d.ts new file mode 100644 index 0000000000000..7dcd2449e9172 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralComputedNameNoDeclarationError.d.ts @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts] //// + +//// [objectLiteralComputedNameNoDeclarationError.ts] +const Foo = { + BANANA: 'banana' as 'banana', +} + +export const Baa = { + [Foo.BANANA]: 1 +}; + +/// [Declarations] //// + + + +//// [objectLiteralComputedNameNoDeclarationError.d.ts] +export declare const Baa: { + banana: number; +}; +//# sourceMappingURL=objectLiteralComputedNameNoDeclarationError.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map new file mode 100644 index 0000000000000..99b389ae3a6f8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map @@ -0,0 +1,102 @@ +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + +//// [optionalMethods.ts] +interface Foo { + a: number; + b?: number; + f(): number; + g?(): number; +} + +function test1(x: Foo): void { + x.a; + x.b; + x.f; + x.g; + let f1 = x.f(); + let g1 = x.g && x.g(); + let g2 = x.g ? x.g() : 0; +} + +class Bar { + a: number; + b?: number; + c? = 2; + constructor(public d?: number, public e = 10) {} + f(): number { + return 1; + } + g?(): number; // Body of optional method can be omitted + h?(): number { + return 2; + } +} + +function test2(x: Bar): void { + x.a; + x.b; + x.c; + x.d; + x.e; + x.f; + x.g; + let f1 = x.f(); + let g1 = x.g && x.g(); + let g2 = x.g ? x.g() : 0; + let h1 = x.h && x.h(); + let h2 = x.h ? x.h() : 0; +} + +class Base { + a?: number; + f?(): number; +} + +class Derived extends Base { + a = 1; + f(): number { return 1; } +} + + +/// [Declarations] //// + + + +//// [optionalMethods.d.ts] +interface Foo { + a: number; + b?: number; + f(): number; + g?(): number; +} +declare function test1(x: Foo): void; +declare class Bar { + d?: number | undefined; + e: number; + a: number; + b?: number; + c?: number | undefined; + constructor(d?: number | undefined, e?: number); + f(): number; + g?(): number; + h?(): number; +} +declare function test2(x: Bar): void; +declare class Base { + a?: number; + f?(): number; +} +declare class Derived extends Base { + a: number; + f(): number; +} +//# sourceMappingURL=optionalMethods.d.ts.map + +/// [Declarations Maps] //// + + +//// [optionalMethods.d.ts.map] +{"version":3,"file":"optionalMethods.d.ts","sourceRoot":"","sources":["optionalMethods.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,IAAI,MAAM,CAAC;IACZ,CAAC,CAAC,IAAI,MAAM,CAAC;CAChB;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAQ3B;AAED,cAAM,GAAG;IAIc,CAAC,CAAC;IAAiB,CAAC;IAHvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,qBAAK;gBACY,CAAC,CAAC,oBAAQ,EAAS,CAAC,SAAK;IAC5C,CAAC,IAAI,MAAM;IAGX,CAAC,CAAC,IAAI,MAAM;IACZ,CAAC,CAAC,IAAI,MAAM;CAGf;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAa3B;AAED,cAAM,IAAI;IACN,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,IAAI,MAAM;CACf;AAED,cAAM,OAAQ,SAAQ,IAAI;IACtB,CAAC,SAAK;IACN,CAAC,IAAI,MAAM;CACd"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogbnVtYmVyOw0KICAgIGI/OiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KfQ0KZGVjbGFyZSBmdW5jdGlvbiB0ZXN0MSh4OiBGb28pOiB2b2lkOw0KZGVjbGFyZSBjbGFzcyBCYXIgew0KICAgIGQ/OiBudW1iZXIgfCB1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ICAgIH0KfQoKZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZCB7CiAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalProperties01.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalProperties01.d.ts.map new file mode 100644 index 0000000000000..321c0d7b5a28f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalProperties01.d.ts.map @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts] //// + +//// [optionalProperties01.ts] +interface Foo { + required1: string; + required2: string; + optional?: string; +} + +const foo1 = { required1: "hello" } as Foo; +const foo2 = { required1: "hello", optional: "bar" } as Foo; + + +/// [Declarations] //// + + + +//// [optionalProperties01.d.ts] +interface Foo { + required1: string; + required2: string; + optional?: string; +} +declare const foo1: Foo; +declare const foo2: Foo; +//# sourceMappingURL=optionalProperties01.d.ts.map + +/// [Declarations Maps] //// + + +//// [optionalProperties01.d.ts.map] +{"version":3,"file":"optionalProperties01.d.ts","sourceRoot":"","sources":["optionalProperties01.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACX,SAAS,EAAE,MAAM,CAAC;IACl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+ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parameterDestructuringObjectLiteral.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parameterDestructuringObjectLiteral.d.ts.map new file mode 100644 index 0000000000000..da7eb7b50fdc7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parameterDestructuringObjectLiteral.d.ts.map @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/parameterDestructuringObjectLiteral.ts] //// + +//// [parameterDestructuringObjectLiteral.ts] +// Repro from #22644 + +const fn1 = (options: { headers?: {} }): void => { }; +fn1({ headers: { foo: 1 } }); + +const fn2 = ({ headers = {} }: { + headers?: {}; + }): void => { }; +fn2({ headers: { foo: 1 } }); + + +/// [Declarations] //// + + + +//// [parameterDestructuringObjectLiteral.d.ts] +declare const fn1: (options: { + headers?: {}; +}) => void; +declare const fn2: ({ headers }: { + headers?: {}; +}) => void; +//# sourceMappingURL=parameterDestructuringObjectLiteral.d.ts.map + +/// [Declarations Maps] //// + + +//// [parameterDestructuringObjectLiteral.d.ts.map] +{"version":3,"file":"parameterDestructuringObjectLiteral.d.ts","sourceRoot":"","sources":["parameterDestructuringObjectLiteral.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG,YAAa;IAAE,OAAO,CAAC,EAAE,EAAE,CAAA;CAAE,KAAG,IAAW,CAAC;AAGrD,QAAA,MAAM,GAAG;cACS,EAAE;MACZ,IAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmbjE6IChvcHRpb25zOiB7DQogICAgaGVhZGVycz86IHt9Ow0KfSkgPT4gdm9pZDsNCmRlY2xhcmUgY29uc3QgZm4yOiAoeyBoZWFkZXJzIH06IHsNCiAgICBoZWFkZXJzPzoge307DQp9KSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cGFyYW1ldGVyRGVzdHJ1Y3R1cmluZ09iamVjdExpdGVyYWwuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1ldGVyRGVzdHJ1Y3R1cmluZ09iamVjdExpdGVyYWwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhcmFtZXRlckRlc3RydWN0dXJpbmdPYmplY3RMaXRlcmFsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsTUFBTSxHQUFHLFlBQWE7SUFBRSxPQUFPLENBQUMsRUFBRSxFQUFFLENBQUE7Q0FBRSxLQUFHLElBQVcsQ0FBQztBQUdyRCxRQUFBLE1BQU0sR0FBRztjQUNTLEVBQUU7TUFDWixJQUFXLENBQUMifQ==,Ly8gUmVwcm8gZnJvbSAjMjI2NDQKCmNvbnN0IGZuMSA9IChvcHRpb25zOiB7IGhlYWRlcnM/OiB7fSB9KTogdm9pZCA9PiB7IH07CmZuMSh7IGhlYWRlcnM6IHsgZm9vOiAxIH0gfSk7Cgpjb25zdCBmbjIgPSAoeyBoZWFkZXJzID0ge30gfTogewogICAgICAgIGhlYWRlcnM/OiB7fTsKICAgIH0pOiB2b2lkID0+IHsgfTsKZm4yKHsgaGVhZGVyczogeyBmb286IDEgfSB9KTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map new file mode 100644 index 0000000000000..e9a34dcbc9d36 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts] //// + +//// [parenthesisDoesNotBlockAliasSymbolCreation.ts] +export type InvalidKeys = { [P in K]? : never }; +export type InvalidKeys2 = ( + { [P in K]? : never } +); + +export type A = ( + T & InvalidKeys<"a"> +); +export type A2 = ( + T & InvalidKeys2<"a"> +); + +export const a = null as A<{ x : number }>; +export const a2 = null as A2<{ x : number }>; +export const a3 = null as { x : number } & InvalidKeys<"a">; +export const a4 = null as { x : number } & InvalidKeys2<"a">; + + +/// [Declarations] //// + + + +//// [parenthesisDoesNotBlockAliasSymbolCreation.d.ts] +export type InvalidKeys = { + [P in K]?: never; +}; +export type InvalidKeys2 = ({ + [P in K]?: never; +}); +export type A = (T & InvalidKeys<"a">); +export type A2 = (T & InvalidKeys2<"a">); +export declare const a: A<{ + x: number; +}>; +export declare const a2: A2<{ + x: number; +}>; +export declare const a3: { + x: number; +} & InvalidKeys<"a">; +export declare const a4: { + x: number; +} & InvalidKeys2<"a">; +//# sourceMappingURL=parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map + +/// [Declarations Maps] //// + + +//// [parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map] +{"version":3,"file":"parenthesisDoesNotBlockAliasSymbolCreation.d.ts","sourceRoot":"","sources":["parenthesisDoesNotBlockAliasSymbolCreation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAC,MAAM,GAAC,MAAM,IAAI;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAG,KAAK;CAAE,CAAC;AAChF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAC,MAAM,GAAC,MAAM,IAAI,CACvD;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAG,KAAK;CAAE,CACxB,CAAC;AAEF,MAAM,MAAM,CAAC,CAAC,CAAC,IAAI,CACf,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CACvB,CAAC;AACF,MAAM,MAAM,EAAE,CAAC,CAAC,IAAI,CAChB,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,CACxB,CAAC;AAEF,eAAO,MAAM,CAAC;OAAmB,MAAM;EAAG,CAAC;AAC3C,eAAO,MAAM,EAAE;OAAoB,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dPyA6IG5ldmVyIH0KKTsKCmV4cG9ydCB0eXBlIEE8VD4gPSAoCiAgICBUICYgSW52YWxpZEtleXM8ImEiPgopOwpleHBvcnQgdHlwZSBBMjxUPiA9ICgKICAgIFQgJiBJbnZhbGlkS2V5czI8ImEiPgopOwoKZXhwb3J0IGNvbnN0IGEgPSBudWxsIGFzIEE8eyB4IDogbnVtYmVyIH0+OwpleHBvcnQgY29uc3QgYTIgPSBudWxsIGFzIEEyPHsgeCA6IG51bWJlciB9PjsKZXhwb3J0IGNvbnN0IGEzID0gbnVsbCBhcyB7IHggOiBudW1iZXIgfSAmIEludmFsaWRLZXlzPCJhIj47CmV4cG9ydCBjb25zdCBhNCA9IG51bGwgYXMgeyB4IDogbnVtYmVyIH0gJiBJbnZhbGlkS2V5czI8ImEiPjsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportWrittenCorrectlyInDeclaration.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportWrittenCorrectlyInDeclaration.d.ts.map new file mode 100644 index 0000000000000..40e555d25afe8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportWrittenCorrectlyInDeclaration.d.ts.map @@ -0,0 +1,69 @@ +//// [tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts] //// + +//// [ThingA.ts] +// https://github.com/Microsoft/TypeScript/issues/8612 +export class ThingA { } + +//// [ThingB.ts] +export class ThingB { } + +//// [Things.ts] +export {ThingA} from "./ThingA"; +export {ThingB} from "./ThingB"; + +//// [Test.ts] +import * as things from "./Things"; + +export class Test { + public method = (input: things.ThingA): void => { }; +} + +/// [Declarations] //// + + + +//// [Test.d.ts] +import * as things from "./Things"; +export declare class Test { + method: (input: things.ThingA) => void; +} +//# sourceMappingURL=Test.d.ts.map +//// [ThingA.d.ts] +export declare class ThingA { +} +//# sourceMappingURL=ThingA.d.ts.map +//// [ThingB.d.ts] +export declare class ThingB { +} +//# sourceMappingURL=ThingB.d.ts.map +//// [Things.d.ts] +export { ThingA } from "./ThingA"; +export { ThingB } from "./ThingB"; +//# sourceMappingURL=Things.d.ts.map + +/// [Declarations Maps] //// + + +//// [Test.d.ts.map] +{"version":3,"file":"Test.d.ts","sourceRoot":"","sources":["Test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACN,MAAM,UAAW,OAAO,MAAM,KAAG,IAAI,CAAS;CACxD"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vVGhpbmdzIjsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIFRlc3Qgew0KICAgIG1ldGhvZDogKGlucHV0OiB0aGluZ3MuVGhpbmdBKSA9PiB2b2lkOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9VGVzdC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGVzdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiVGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssTUFBTSxNQUFNLFVBQVUsQ0FBQztBQUVuQyxxQkFBYSxJQUFJO0lBQ04sTUFBTSxVQUFXLE9BQU8sTUFBTSxLQUFHLElBQUksQ0FBUztDQUN4RCJ9,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vVGhpbmdzIjsKCmV4cG9ydCBjbGFzcyBUZXN0IHsKICAgIHB1YmxpYyBtZXRob2QgPSAoaW5wdXQ6IHRoaW5ncy5UaGluZ0EpOiB2b2lkICA9PiB7IH07Cn0= + + +//// [ThingA.d.ts.map] +{"version":3,"file":"ThingA.d.ts","sourceRoot":"","sources":["ThingA.ts"],"names":[],"mappings":"AACA,qBAAa,MAAM;CAAI"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgVGhpbmdBIHsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPVRoaW5nQS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGhpbmdBLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJUaGluZ0EudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EscUJBQWEsTUFBTTtDQUFJIn0=,Ly8gaHR0cHM6Ly9naXRodWIuY29tL01pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy84NjEyCmV4cG9ydCBjbGFzcyBUaGluZ0EgeyB9IAo= + + +//// [ThingB.d.ts.map] +{"version":3,"file":"ThingB.d.ts","sourceRoot":"","sources":["ThingB.ts"],"names":[],"mappings":"AAAA,qBAAa,MAAM;CAAI"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgVGhpbmdCIHsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPVRoaW5nQi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGhpbmdCLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJUaGluZ0IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEscUJBQWEsTUFBTTtDQUFJIn0=,ZXhwb3J0IGNsYXNzIFRoaW5nQiB7IH0K + + +//// [Things.d.ts.map] +{"version":3,"file":"Things.d.ts","sourceRoot":"","sources":["Things.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHsgVGhpbmdBIH0gZnJvbSAiLi9UaGluZ0EiOw0KZXhwb3J0IHsgVGhpbmdCIH0gZnJvbSAiLi9UaGluZ0IiOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9VGhpbmdzLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGhpbmdzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJUaGluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLE1BQU0sRUFBQyxNQUFNLFVBQVUsQ0FBQztBQUNoQyxPQUFPLEVBQUMsTUFBTSxFQUFDLE1BQU0sVUFBVSxDQUFDIn0=,ZXhwb3J0IHtUaGluZ0F9IGZyb20gIi4vVGhpbmdBIjsKZXhwb3J0IHtUaGluZ0J9IGZyb20gIi4vVGhpbmdCIjsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/renamingDestructuredPropertyInFunctionType.d.ts new file mode 100644 index 0000000000000..abf707ae15de1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/renamingDestructuredPropertyInFunctionType.d.ts @@ -0,0 +1,405 @@ +//// [tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts] //// + +//// [renamingDestructuredPropertyInFunctionType.ts] +// GH#37454, GH#41044 + +type O = { a?: string; b: number; c: number; }; +type F1 = (arg: number) => any; // OK +type F2 = ({ a: string }: O) => any; // Error +type F3 = ({ a: string, b, c }: O) => any; // Error +type F4 = ({ a: string }: O) => any; // Error +type F5 = ({ a: string, b, c }: O) => any; // Error +type F6 = ({ a: string }: { + a: any; +}) => typeof string; // OK +type F7 = ({ a: string, b: number }: { + a: any; + b: any; +}) => typeof number; // Error +type F8 = ({ a, b: number }: { + a: any; + b: any; +}) => typeof number; // OK +type F9 = ([a, b, c]: [ + any, + any, + any +]) => void; // OK + +type G1 = new (arg: number) => any; // OK +type G2 = new ({ a: string }: O) => any; // Error +type G3 = new ({ a: string, b, c }: O) => any; // Error +type G4 = new ({ a: string }: O) => any; // Error +type G5 = new ({ a: string, b, c }: O) => any; // Error +type G6 = new ({ a: string }: { + a: any; + }) => typeof string; // OK +type G7 = new ({ a: string, b: number }: { + a: any; + b: any; + }) => typeof number; // Error +type G8 = new ({ a, b: number }: { + a: any; + b: any; + }) => typeof number; // OK +type G9 = new ([a, b, c]: [ + any, + any, + any + ]) => void; // OK + +// Below are Error but renaming is retained in declaration emit, +// since elinding it would leave invalid syntax. +type F10 = ({ "a": string }: { + a: any; +}) => void; // Error +type F11 = ({ 2: string }: { + 2: any; +}) => void; // Error +type F12 = ({ ["a"]: string }: O) => void; // Error +type F13 = ({ [2]: string }: { + 2: any; +}) => void; // Error +type G10 = new ({ "a": string }: { + a: any; + }) => void; // Error +type G11 = new ({ 2: string }: { + 2: any; + }) => void; // Error +type G12 = new ({ ["a"]: string }: O) => void; // Error +type G13 = new ({ [2]: string }: { + 2: any; + }) => void; // Error + +interface I { + method1(arg: number): any; // OK + method2({ a: string }: { + a: any; + }): any; // Error + + (arg: number): any; // OK + ({ a: string }: { + a: any; + }): any; // Error + + new (arg: number): any; // OK + new ({ a: string }: { + a: any; + }): any; // Error +} + +// Below are OK but renaming should be removed from declaration emit +function f1({ a: string }: O): void { } +const f2 = function({ a: string }: O): void { }; +const f3 = ({ a: string, b, c }: O): void => { }; +const f4 = function({ a: string }: O): typeof string { return string; }; +const f5 = ({ a: string, b, c }: O): typeof string => ''; +const obj1 = { + method({ a: string }: O): void { } +}; +const obj2 = { + method({ a: string }: O): typeof string { return string; } +}; +function f6({ a: string = "" }: O): void { } +const f7 = ({ a: string = "", b, c }: O): void => { }; +const f8 = ({ "a": string }: O): void => { }; +function f9 ({ 2: string }: { + 2: any; + }): void { }; +function f10 ({ ["a"]: string }: O): void { }; +const f11 = ({ [2]: string }: { + 2: any; + }): void => { }; + +// In below case `string` should be kept because it is used +function f12({ a: string = "" }: O): typeof string { return "a"; } + +/// [Declarations] //// + + + +//// [renamingDestructuredPropertyInFunctionType.d.ts] +type O = { + a?: string; + b: number; + c: number; +}; +type F1 = (arg: number) => any; +type F2 = ({ a: string }: O) => any; +type F3 = ({ a: string, b, c }: O) => any; +type F4 = ({ a: string }: O) => any; +type F5 = ({ a: string, b, c }: O) => any; +type F6 = ({ a: string }: { + a: any; +}) => typeof string; +type F7 = ({ a: string, b: number }: { + a: any; + b: any; +}) => typeof number; +type F8 = ({ a, b: number }: { + a: any; + b: any; +}) => typeof number; +type F9 = ([a, b, c]: [ + any, + any, + any +]) => void; +type G1 = new (arg: number) => any; +type G2 = new ({ a: string }: O) => any; +type G3 = new ({ a: string, b, c }: O) => any; +type G4 = new ({ a: string }: O) => any; +type G5 = new ({ a: string, b, c }: O) => any; +type G6 = new ({ a: string }: { + a: any; +}) => typeof string; +type G7 = new ({ a: string, b: number }: { + a: any; + b: any; +}) => typeof number; +type G8 = new ({ a, b: number }: { + a: any; + b: any; +}) => typeof number; +type G9 = new ([a, b, c]: [ + any, + any, + any +]) => void; +type F10 = ({ "a": string }: { + a: any; +}) => void; +type F11 = ({ 2: string }: { + 2: any; +}) => void; +type F12 = ({ ["a"]: string }: O) => void; +type F13 = ({ [2]: string }: { + 2: any; +}) => void; +type G10 = new ({ "a": string }: { + a: any; +}) => void; +type G11 = new ({ 2: string }: { + 2: any; +}) => void; +type G12 = new ({ ["a"]: string }: O) => void; +type G13 = new ({ [2]: string }: { + 2: any; +}) => void; +interface I { + method1(arg: number): any; + method2({ a: string }: { + a: any; + }): any; + (arg: number): any; + ({ a: string }: { + a: any; + }): any; + new (arg: number): any; + new ({ a: string }: { + a: any; + }): any; +} +declare function f1({ a: string }: O): void; +declare const f2: ({ a: string }: O) => void; +declare const f3: ({ a: string, b, c }: O) => void; +declare const f4: ({ a: string }: O) => string; +declare const f5: ({ a: string, b, c }: O) => string; +declare const obj1: { + method({ a: string }: O): void; +}; +declare const obj2: { + method({ a: string }: O): string; +}; +declare function f6({ a: string }: O): void; +declare const f7: ({ a: string, b, c }: O) => void; +declare const f8: ({ "a": string }: O) => void; +declare function f9({ 2: string }: { + 2: any; +}): void; +declare function f10({ ["a"]: string }: O): void; +declare const f11: ({ [2]: string }: { + 2: any; +}) => void; +declare function f12({ a: string }: O): typeof string; +//# sourceMappingURL=renamingDestructuredPropertyInFunctionType.d.ts.map +/// [Errors] //// + +renamingDestructuredPropertyInFunctionType.ts(5,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(6,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(7,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(8,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(12,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(27,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(28,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(29,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(30,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(34,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(50,20): error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(53,18): error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(56,22): error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(57,20): error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(60,24): error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(63,22): error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(66,26): error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(67,24): error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(73,16): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(78,9): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(83,13): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + + +==== renamingDestructuredPropertyInFunctionType.ts (21 errors) ==== + // GH#37454, GH#41044 + + type O = { a?: string; b: number; c: number; }; + type F1 = (arg: number) => any; // OK + type F2 = ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F3 = ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F4 = ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F5 = ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F6 = ({ a: string }: { + a: any; + }) => typeof string; // OK + type F7 = ({ a: string, b: number }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + b: any; + }) => typeof number; // Error + type F8 = ({ a, b: number }: { + a: any; + b: any; + }) => typeof number; // OK + type F9 = ([a, b, c]: [ + any, + any, + any + ]) => void; // OK + + type G1 = new (arg: number) => any; // OK + type G2 = new ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G3 = new ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G4 = new ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G5 = new ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G6 = new ({ a: string }: { + a: any; + }) => typeof string; // OK + type G7 = new ({ a: string, b: number }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + b: any; + }) => typeof number; // Error + type G8 = new ({ a, b: number }: { + a: any; + b: any; + }) => typeof number; // OK + type G9 = new ([a, b, c]: [ + any, + any, + any + ]) => void; // OK + + // Below are Error but renaming is retained in declaration emit, + // since elinding it would leave invalid syntax. + type F10 = ({ "a": string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? + a: any; + }) => void; // Error + type F11 = ({ 2: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? + 2: any; + }) => void; // Error + type F12 = ({ ["a"]: string }: O) => void; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? + type F13 = ({ [2]: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? + 2: any; + }) => void; // Error + type G10 = new ({ "a": string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? + a: any; + }) => void; // Error + type G11 = new ({ 2: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? + 2: any; + }) => void; // Error + type G12 = new ({ ["a"]: string }: O) => void; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? + type G13 = new ({ [2]: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? + 2: any; + }) => void; // Error + + interface I { + method1(arg: number): any; // OK + method2({ a: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + }): any; // Error + + (arg: number): any; // OK + ({ a: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + }): any; // Error + + new (arg: number): any; // OK + new ({ a: string }: { + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + a: any; + }): any; // Error + } + + // Below are OK but renaming should be removed from declaration emit + function f1({ a: string }: O): void { } + const f2 = function({ a: string }: O): void { }; + const f3 = ({ a: string, b, c }: O): void => { }; + const f4 = function({ a: string }: O): typeof string { return string; }; + const f5 = ({ a: string, b, c }: O): typeof string => ''; + const obj1 = { + method({ a: string }: O): void { } + }; + const obj2 = { + method({ a: string }: O): typeof string { return string; } + }; + function f6({ a: string = "" }: O): void { } + const f7 = ({ a: string = "", b, c }: O): void => { }; + const f8 = ({ "a": string }: O): void => { }; + function f9 ({ 2: string }: { + 2: any; + }): void { }; + function f10 ({ ["a"]: string }: O): void { }; + const f11 = ({ [2]: string }: { + 2: any; + }): void => { }; + + // In below case `string` should be kept because it is used + function f12({ a: string = "" }: O): typeof string { return "a"; } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit10.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit10.d.ts.map new file mode 100644 index 0000000000000..42d4050bbb029 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit10.d.ts.map @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts] //// + +//// [symbolDeclarationEmit10.ts] +var obj = { + get [Symbol.isConcatSpreadable](): string { return '' }, + set [Symbol.isConcatSpreadable](x) { } +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit10.d.ts] +declare var obj: { + [Symbol.isConcatSpreadable]: string; +}; +//# sourceMappingURL=symbolDeclarationEmit10.d.ts.map + +/// [Declarations Maps] //// + + +//// [symbolDeclarationEmit10.d.ts.map] +{"version":3,"file":"symbolDeclarationEmit10.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit10.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;;CAGN,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdOiBzdHJpbmc7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0MTAuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0MTAuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN5bWJvbERlY2xhcmF0aW9uRW1pdDEwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxHQUFHOztDQUdOLENBQUEifQ==,dmFyIG9iaiA9IHsKICAgIGdldCBbU3ltYm9sLmlzQ29uY2F0U3ByZWFkYWJsZV0oKTogc3RyaW5nIHsgcmV0dXJuICcnIH0sCiAgICBzZXQgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdKHgpIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts new file mode 100644 index 0000000000000..92984de958c6f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// + +//// [symbolDeclarationEmit12.ts] +module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + set [Symbol.toPrimitive](x: I) { } + } +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit12.d.ts] +declare namespace M { + interface I { + } + export class C { + [Symbol.iterator]: I; + [Symbol.isConcatSpreadable](): I; + get [Symbol.toPrimitive](): I; + set [Symbol.toPrimitive](x: I); + } + export {}; +} +//# sourceMappingURL=symbolDeclarationEmit12.d.ts.map +/// [Errors] //// + +symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. +symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +==== symbolDeclarationEmit12.ts (2 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + set [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit8.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit8.d.ts.map new file mode 100644 index 0000000000000..07fccbe138732 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit8.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts] //// + +//// [symbolDeclarationEmit8.ts] +var obj = { + [Symbol.isConcatSpreadable]: 0 +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit8.d.ts] +declare var obj: { + [Symbol.isConcatSpreadable]: number; +}; +//# sourceMappingURL=symbolDeclarationEmit8.d.ts.map + +/// [Declarations Maps] //// + + +//// [symbolDeclarationEmit8.d.ts.map] +{"version":3,"file":"symbolDeclarationEmit8.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit8.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;;CAEN,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0OC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0OC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sRGVjbGFyYXRpb25FbWl0OC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLElBQUksR0FBRzs7Q0FFTixDQUFBIn0=,dmFyIG9iaiA9IHsKICAgIFtTeW1ib2wuaXNDb25jYXRTcHJlYWRhYmxlXTogMAp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit9.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit9.d.ts.map new file mode 100644 index 0000000000000..36c97ea28dba9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit9.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts] //// + +//// [symbolDeclarationEmit9.ts] +var obj = { + [Symbol.isConcatSpreadable](): void { } +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit9.d.ts] +declare var obj: { + [Symbol.isConcatSpreadable](): void; +}; +//# sourceMappingURL=symbolDeclarationEmit9.d.ts.map + +/// [Declarations Maps] //// + + +//// [symbolDeclarationEmit9.d.ts.map] +{"version":3,"file":"symbolDeclarationEmit9.d.ts","sourceRoot":"","sources":["symbolDeclarationEmit9.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG;mCAC4B,IAAI;CACtC,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgb2JqOiB7DQogICAgW1N5bWJvbC5pc0NvbmNhdFNwcmVhZGFibGVdKCk6IHZvaWQ7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3ltYm9sRGVjbGFyYXRpb25FbWl0OS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sRGVjbGFyYXRpb25FbWl0OS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sRGVjbGFyYXRpb25FbWl0OS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLElBQUksR0FBRzttQ0FDNEIsSUFBSTtDQUN0QyxDQUFBIn0=,dmFyIG9iaiA9IHsKICAgIFtTeW1ib2wuaXNDb25jYXRTcHJlYWRhYmxlXSgpOiB2b2lkIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts new file mode 100644 index 0000000000000..50b77177cdc35 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// + +//// [index.ts] +import { styles } from "package-a"; + +export function getStyles() { + return styles; +} + +//// [index.d.ts] +export declare const styles: import("styled-components").InterpolationValue[]; + +//// [package.json] +{ + "name": "styled-components", + "version": "3.3.3", + "typings": "typings/styled-components.d.ts" +} + +//// [styled-components.d.ts] +export interface InterpolationValue {} + +/// [Declarations] //// + + + +//// [Folder/monorepo/core/index.d.ts] +export declare function getStyles(): import("styled-components").InterpolationValue[]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map new file mode 100644 index 0000000000000..b2cf0e68c5c99 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts] //// + +//// [symbolObserverMismatchingPolyfillsWorkTogether.ts] +interface SymbolConstructor { + readonly observer: symbol; +} +interface SymbolConstructor { + readonly observer: unique symbol; +} + +const obj = { + [Symbol.observer]: 0 +}; + +/// [Declarations] //// + + + +//// [symbolObserverMismatchingPolyfillsWorkTogether.d.ts] +interface SymbolConstructor { + readonly observer: symbol; +} +interface SymbolConstructor { + readonly observer: unique symbol; +} +declare const obj: { + [Symbol.observer]: number; +}; +//# sourceMappingURL=symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map + +/// [Declarations Maps] //// + + +//// [symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map] +{"version":3,"file":"symbolObserverMismatchingPolyfillsWorkTogether.d.ts","sourceRoot":"","sources":["symbolObserverMismatchingPolyfillsWorkTogether.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B;AACD,UAAU,iBAAiB;IACvB,QAAQ,CAAC,QAAQ,EAAE,OAAO,MAAM,CAAC;CACpC;AAED,QAAA,MAAM,GAAG;;CAER,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsNCiAgICByZWFkb25seSBvYnNlcnZlcjogc3ltYm9sOw0KfQ0KaW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsNCiAgICByZWFkb25seSBvYnNlcnZlcjogdW5pcXVlIHN5bWJvbDsNCn0NCmRlY2xhcmUgY29uc3Qgb2JqOiB7DQogICAgW1N5bWJvbC5vYnNlcnZlcl06IG51bWJlcjsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1zeW1ib2xPYnNlcnZlck1pc21hdGNoaW5nUG9seWZpbGxzV29ya1RvZ2V0aGVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sT2JzZXJ2ZXJNaXNtYXRjaGluZ1BvbHlmaWxsc1dvcmtUb2dldGhlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sT2JzZXJ2ZXJNaXNtYXRjaGluZ1BvbHlmaWxsc1dvcmtUb2dldGhlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxVQUFVLGlCQUFpQjtJQUN2QixRQUFRLENBQUMsUUFBUSxFQUFFLE1BQU0sQ0FBQztDQUM3QjtBQUNELFVBQVUsaUJBQWlCO0lBQ3ZCLFFBQVEsQ0FBQyxRQUFRLEVBQUUsT0FBTyxNQUFNLENBQUM7Q0FDcEM7QUFFRCxRQUFBLE1BQU0sR0FBRzs7Q0FFUixDQUFDIn0=,aW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsKICAgIHJlYWRvbmx5IG9ic2VydmVyOiBzeW1ib2w7Cn0KaW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsKICAgIHJlYWRvbmx5IG9ic2VydmVyOiB1bmlxdWUgc3ltYm9sOwp9Cgpjb25zdCBvYmogPSB7CiAgICBbU3ltYm9sLm9ic2VydmVyXTogMAp9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts new file mode 100644 index 0000000000000..73ff81f28b957 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts @@ -0,0 +1,784 @@ +//// [tests/cases/conformance/types/literal/templateLiteralTypes4.ts] //// + +//// [templateLiteralTypes4.ts] +// infer from number +type TNumber0 = "100" extends `${infer N extends number}` ? N : never; // 100 +type TNumber1 = "-100" extends `${infer N extends number}` ? N : never; // -100 +type TNumber2 = "1.1" extends `${infer N extends number}` ? N : never; // 1.1 +type TNumber3 = "8e-11" extends `${infer N extends number}` ? N : never; // 8e-11 (0.00000000008) +type TNumber4 = "0x10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) +type TNumber5 = "0o10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) +type TNumber6 = "0b10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) +type TNumber7 = "10e2" extends `${infer N extends number}` ? N : never; // number (not round-trippable) +type TNumber8 = "abcd" extends `${infer N extends number}` ? N : never; // never + +// infer from bigint +type TBigInt0 = "100" extends `${infer N extends bigint}` ? N : never; // 100n +type TBigInt1 = "-100" extends `${infer N extends bigint}` ? N : never; // -100n +type TBigInt2 = "0x10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) +type TBigInt3 = "0o10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) +type TBigInt4 = "0b10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) +type TBigInt5 = "1.1" extends `${infer N extends bigint}` ? N : never; // never +type TBigInt6 = "10e2" extends `${infer N extends bigint}` ? N : never; // never +type TBigInt7 = "abcd" extends `${infer N extends bigint}` ? N : never; // never + +// infer from boolean +type TBoolean0 = "true" extends `${infer T extends boolean}` ? T : never; // true +type TBoolean1 = "false" extends `${infer T extends boolean}` ? T : never; // false +type TBoolean2 = "abcd" extends `${infer T extends boolean}` ? T : never; // never + +// infer from null +type TNull0 = "null" extends `${infer T extends null}` ? T : never; // null +type TNull1 = "abcd" extends `${infer T extends null}` ? T : never; // never + +// infer from undefined +type TUndefined0 = "undefined" extends `${infer T extends undefined}` ? T : never; // undefined +type TUndefined1 = "abcd" extends `${infer T extends undefined}` ? T : never; // never + +// infer from literal enums +const enum StringLiteralEnum { Zero = "0", True = "true", False = "false", Undefined = "undefined", Null = "null" } +type TStringLiteralEnum0 = "0" extends `${infer T extends StringLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + +const enum NumberLiteralEnum { Zero, One } +type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; // NumberLiteralEnum.Zero + +// infer from non-literal enums +const enum NonLiteralEnum { Zero = NumberLiteralEnum.Zero, One = NumberLiteralEnum.One } +type TNonLiteralEnum0 = "0" extends `${infer T extends NonLiteralEnum}` ? T : never; // 0 + +// infer using priority: +// string > template-literal > (string-literal | string-literal-enum) > +// number > enum > (number-literal | number-literal-enum) > +// bigint > bigint-literal > +// boolean > (boolean-literal | undefined | null) + +// #region string +// string > string-literal-enum +type PString00 = "0" extends `${infer T extends string | StringLiteralEnum}` ? T : never; // "0" + +// string > number +type PString01 = "0" extends `${infer T extends string | number}` ? T : never; // "0" + +// string > enum +type PString02 = "0" extends `${infer T extends string | NonLiteralEnum}` ? T : never; // "0" + +// string > (number-literal | number-literal-enum) +type PString03 = "0" extends `${infer T extends string | 0}` ? T : never; // "0" +type PString04 = "0" extends `${infer T extends string | NumberLiteralEnum}` ? T : never; // "0" + +// string > bigint +type PString05 = "0" extends `${infer T extends string | bigint}` ? T : never; // "0" + +// string > bigint-literal +type PString06 = "0" extends `${infer T extends string | 0n}` ? T : never; // "0" + +// string > boolean +type PString07 = "true" extends `${infer T extends string | boolean}` ? T : never; // "true" +type PString08 = "false" extends `${infer T extends string | boolean}` ? T : never; // "false" + +// string > (boolean-literal | undefined | null) +type PString09 = "true" extends `${infer T extends string | true}` ? T : never; // "true" +type PString10 = "false" extends `${infer T extends string | false}` ? T : never; // "false" +type PString11 = "undefined" extends `${infer T extends string | undefined}` ? T : never; // "undefined" +type PString12 = "null" extends `${infer T extends string | null}` ? T : never; // "null" +// #endregion string + +// #region template-literal +// template-literal > number +type PTemplate00 = "10" extends `${infer T extends `1${string}` | number}` ? T : never; // "10" + +// template-literal > enum +type PTemplate01 = "10" extends `${infer T extends `1${string}` | NonLiteralEnum}` ? T : never; // "10" + +// template-literal > (number-literal | number-literal-enum) +type PTemplate02 = "10" extends `${infer T extends `1${string}` | 10}` ? T : never; // "10" +type PTemplate03 = "10" extends `${infer T extends `1${string}` | NumberLiteralEnum}` ? T : never; // "10" + +// template-literal > bigint +type PTemplate04 = "10" extends `${infer T extends `1${string}` | bigint}` ? T : never; // "10" + +// template-literal > bigint-literal +type PTemplate05 = "10" extends `${infer T extends `1${string}` | 10n}` ? T : never; // "10" + +// template-literal > boolean +type PTemplate06 = "true" extends `${infer T extends `${string}e` | boolean}` ? T : never; // "true" +type PTemplate07 = "false" extends `${infer T extends `${string}e` | boolean}` ? T : never; // "false" + +// template-literal > (boolean-literal | undefined | null) +type PTemplate08 = "true" extends `${infer T extends `${"t"}${string}` | true}` ? T : never; // "true" +type PTemplate09 = "false" extends `${infer T extends `${"f"}${string}` | false}` ? T : never; // "false" +type PTemplate10 = "undefined" extends `${infer T extends `${"u"}${string}` | undefined}` ? T : never; // "undefined" +type PTemplate11 = "null" extends `${infer T extends `${"n"}${string}` | null}` ? T : never; // "null" +// #endregion template-literal + +// #region string-literal +// string-literal > number +type PStringLiteral00 = "0" extends `${infer T extends "0" | number}` ? T : never; // "0" + +// string-literal > enum +type PStringLiteral01 = "0" extends `${infer T extends "0" | NonLiteralEnum}` ? T : never; // "0" + +// string-literal > (number-literal | number-literal-enum) +type PStringLiteral02 = "0" extends `${infer T extends "0" | 0}` ? T : never; // "0" +type PStringLiteral03 = "0" extends `${infer T extends "0" | NumberLiteralEnum}` ? T : never; // "0" + +// string-literal > bigint +type PStringLiteral04 = "0" extends `${infer T extends "0" | bigint}` ? T : never; // "0" + +// string-literal > bigint-literal +type PStringLiteral05 = "0" extends `${infer T extends "0" | 0n}` ? T : never; // "0" + +// string-literal > boolean +type PStringLiteral06 = "true" extends `${infer T extends "true" | "false" | boolean}` ? T : never; // "true" +type PStringLiteral07 = "false" extends `${infer T extends "true" | "false" | boolean}` ? T : never; // "false" + +// string-literal > (boolean-literal | undefined | null) +type PStringLiteral08 = "true" extends `${infer T extends "true" | true}` ? T : never; // "true" +type PStringLiteral09 = "false" extends `${infer T extends "false" | false}` ? T : never; // "false" +type PStringLiteral10 = "undefined" extends `${infer T extends "undefined" | undefined}` ? T : never; // "undefined" +type PStringLiteral11 = "null" extends `${infer T extends "null" | null}` ? T : never; // "null" +// #endregion string-literal + +// #region string-literal-enum +// string-literal-enum > number +type PStringLiteralEnum00 = "0" extends `${infer T extends StringLiteralEnum | number}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > enum +type PStringLiteralEnum01 = "0" extends `${infer T extends StringLiteralEnum | NonLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > (number-literal | number-literal-enum) +type PStringLiteralEnum02 = "0" extends `${infer T extends StringLiteralEnum | 0}` ? T : never; // StringLiteralEnum.Zero +type PStringLiteralEnum03 = "0" extends `${infer T extends StringLiteralEnum | NumberLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > bigint +type PStringLiteralEnum04 = "0" extends `${infer T extends StringLiteralEnum | bigint}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > bigint-literal +type PStringLiteralEnum05 = "0" extends `${infer T extends StringLiteralEnum | 0n}` ? T : never; // StringLiteralEnum.Zero + +// string-literal-enum > boolean +type PStringLiteralEnum06 = "true" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; // StringLiteralEnum.True +type PStringLiteralEnum07 = "false" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; // StringLiteralEnum.False + +// string-literal-enum > (boolean-literal | undefined | null) +type PStringLiteralEnum08 = "true" extends `${infer T extends StringLiteralEnum | true}` ? T : never; // StringLiteralEnum.True +type PStringLiteralEnum09 = "false" extends `${infer T extends StringLiteralEnum | false}` ? T : never; // StringLiteralEnum.False +type PStringLiteralEnum10 = "undefined" extends `${infer T extends StringLiteralEnum | undefined}` ? T : never; // StringLiteralEnum.Undefined +type PStringLiteralEnum11 = "null" extends `${infer T extends StringLiteralEnum | null}` ? T : never; // StringLiteralEnum.Null +// #endregion string-literal-enum + +// #region number +// number > enum +type PNumber0 = "0" extends `${infer T extends number | NonLiteralEnum}` ? T : never; // 0 + +// number > number-literal-enum +type PNumber1 = "0" extends `${infer T extends number | NumberLiteralEnum}` ? T : never; // 0 + +// number > bigint +type PNumber2 = "0" extends `${infer T extends number | bigint}` ? T : never; // 0 + +// number > bigint-literal +type PNumber3 = "0" extends `${infer T extends number | 0n}` ? T : never; // 0 +// #endregion number + +// #region enum +// enum > number-literal-enum +type PEnum0 = "0" extends `${infer T extends NonLiteralEnum | NumberLiteralEnum}` ? T : never; // 0 + +// enum > bigint +type PEnum1 = "0" extends `${infer T extends NonLiteralEnum | bigint}` ? T : never; // 0 + +// enum > bigint-literal +type PEnum2 = "0" extends `${infer T extends NonLiteralEnum | 0n}` ? T : never; // 0 +// #endregion enum + +// #region number-literal +// number-literal > bigint +type PNumberLiteral0 = "0" extends `${infer T extends 0 | bigint}` ? T : never; // 0 + +// number-literal > bigint-literal +type PNumberLiteral1 = "0" extends `${infer T extends 0 | 0n}` ? T : never; // 0 +// #endregion number-literal + +// #region number-literal-enum +// number-literal-enum > bigint +type PNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum | bigint}` ? T : never; // NumberLiteralEnum.Zero + +// number-literal-enum > bigint-literal +type PNumberLiteralEnum1 = "0" extends `${infer T extends NumberLiteralEnum | 0n}` ? T : never; // NumberLiteralEnum.Zero +// #endregion number-literal-enum + +// non-matchable constituents are excluded +type PExclude0 = "0" extends `${infer T extends "1" | number}` ? T : never; // 0 +type PExclude1 = "0" extends `${infer T extends `1${string}` | number}` ? T : never; // 0 +type PExclude2 = "0" extends `${infer T extends 1 | bigint}` ? T : never; // 0n +type PExclude3 = "0" extends `${infer T extends NumberLiteralEnum.One | bigint}` ? T : never; // 0n +type PExclude4 = "100000000000000000000000" extends `${infer T extends number | bigint}` ? T : never; // 100000000000000000000000n + +// infer to prefix from string +type TPrefix0 = "100" extends `${infer T extends number}${string}` ? T : never; // 1 +type TPrefix1 = "trueabc" extends `${infer T extends boolean}${string}` ? T : never; // boolean (T only receives 't', not the whole string) +type TPrefix2 = `100:${string}` extends `${infer T extends number}:${string}` ? T : never; // 100 (T receives '100' because it scans until ':') + +// can use union w/multiple branches to extract each possibility +type ExtractPrimitives = + | T + | (T extends `${infer U extends number}` ? U : never) + | (T extends `${infer U extends bigint}` ? U : never) + | (T extends `${infer U extends boolean | null | undefined}` ? U : never) + ; + +type TExtract0 = ExtractPrimitives<"100">; // "100" | 100 | 100n +type TExtract1 = ExtractPrimitives<"1.1">; // "1.1" | 1.1 +type TExtract2 = ExtractPrimitives<"true">; // "true" | true + + + +// example use case (based on old TypedObjects proposal): + +// Use constrained `infer` in template literal to get ordinal indices as numbers: +type IndexFor = S extends `${infer N extends number}` ? N : never; +type IndicesOf = IndexFor>; // ordinal indices as number literals + +interface FieldDefinition { + readonly name: string; + readonly type: "i8" | "i16" | "i32" | "i64" | "u8" | "u16" | "u32" | "u64" | "f32" | "f64"; +} + +type FieldType = + T extends "i8" | "i16" | "i32" | "u8" | "u16" | "u32" | "f32" | "f64" ? number : + T extends "f32" | "f64" ? bigint : + never; + +// Generates named members like `{ x: number, y: bigint }` from `[{ name: "x", type: "i32" }, { name: "y", type: "i64" }]` +type TypedObjectNamedMembers = { + [P in TDef[number]["name"]]: FieldType["type"]>; +}; + +// Generates ordinal members like `{ 0: number, 1: bigint }` from `[{ name: "x", type: "i32" }, { name: "y", type: "i64" }]` +type TypedObjectOrdinalMembers = { + [I in Extract]: FieldType["type"]>; +}; + +// Default members +interface TypedObjectMembers { + // get/set a field by name + get(key: K): FieldType["type"]>; + set(key: K, value: FieldType["type"]>): void; + + // get/set a field by index + getIndex>(index: I): FieldType["type"]>; + setIndex>(index: I, value: FieldType["type"]>): void; +} + +type TypedObject = + & TypedObjectMembers + & TypedObjectNamedMembers + & TypedObjectOrdinalMembers; + +// NOTE: type would normally be created from something like `const Point = TypedObject([...])` from which we would infer the type +type Point = TypedObject<[ + { name: "x", type: "f64" }, + { name: "y", type: "f64" }, +]>; + +declare const p: Point; +p.getIndex(0); // ok, 0 is a valid index +p.getIndex(1); // ok, 1 is a valid index +p.getIndex(2); // error, 2 is not a valid index + +p.setIndex(0, 0); // ok, 0 is a valid index +p.setIndex(1, 0); // ok, 1 is a valid index +p.setIndex(2, 3); // error, 2 is not a valid index + +// function inference +declare function f1(s: `**${T}**`): T; +f1("**123**"); // "123" + +declare function f2(s: `**${T}**`): T; +f2("**123**"); // 123 + +declare function f3(s: `**${T}**`): T; +f3("**123**"); // 123n + +declare function f4(s: `**${T}**`): T; +f4("**true**"); // true | "true" +f4("**false**"); // false | "false" + + +/// [Declarations] //// + + + +//// [templateLiteralTypes4.d.ts] +type TNumber0 = "100" extends `${infer N extends number}` ? N : never; +type TNumber1 = "-100" extends `${infer N extends number}` ? N : never; +type TNumber2 = "1.1" extends `${infer N extends number}` ? N : never; +type TNumber3 = "8e-11" extends `${infer N extends number}` ? N : never; +type TNumber4 = "0x10" extends `${infer N extends number}` ? N : never; +type TNumber5 = "0o10" extends `${infer N extends number}` ? N : never; +type TNumber6 = "0b10" extends `${infer N extends number}` ? N : never; +type TNumber7 = "10e2" extends `${infer N extends number}` ? N : never; +type TNumber8 = "abcd" extends `${infer N extends number}` ? N : never; +type TBigInt0 = "100" extends `${infer N extends bigint}` ? N : never; +type TBigInt1 = "-100" extends `${infer N extends bigint}` ? N : never; +type TBigInt2 = "0x10" extends `${infer N extends bigint}` ? N : never; +type TBigInt3 = "0o10" extends `${infer N extends bigint}` ? N : never; +type TBigInt4 = "0b10" extends `${infer N extends bigint}` ? N : never; +type TBigInt5 = "1.1" extends `${infer N extends bigint}` ? N : never; +type TBigInt6 = "10e2" extends `${infer N extends bigint}` ? N : never; +type TBigInt7 = "abcd" extends `${infer N extends bigint}` ? N : never; +type TBoolean0 = "true" extends `${infer T extends boolean}` ? T : never; +type TBoolean1 = "false" extends `${infer T extends boolean}` ? T : never; +type TBoolean2 = "abcd" extends `${infer T extends boolean}` ? T : never; +type TNull0 = "null" extends `${infer T extends null}` ? T : never; +type TNull1 = "abcd" extends `${infer T extends null}` ? T : never; +type TUndefined0 = "undefined" extends `${infer T extends undefined}` ? T : never; +type TUndefined1 = "abcd" extends `${infer T extends undefined}` ? T : never; +declare const enum StringLiteralEnum { + Zero = "0", + True = "true", + False = "false", + Undefined = "undefined", + Null = "null" +} +type TStringLiteralEnum0 = "0" extends `${infer T extends StringLiteralEnum}` ? T : never; +declare const enum NumberLiteralEnum { + Zero = 0, + One = 1 +} +type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; +declare const enum NonLiteralEnum { + Zero = 0, + One = 1 +} +type TNonLiteralEnum0 = "0" extends `${infer T extends NonLiteralEnum}` ? T : never; +type PString00 = "0" extends `${infer T extends string | StringLiteralEnum}` ? T : never; +type PString01 = "0" extends `${infer T extends string | number}` ? T : never; +type PString02 = "0" extends `${infer T extends string | NonLiteralEnum}` ? T : never; +type PString03 = "0" extends `${infer T extends string | 0}` ? T : never; +type PString04 = "0" extends `${infer T extends string | NumberLiteralEnum}` ? T : never; +type PString05 = "0" extends `${infer T extends string | bigint}` ? T : never; +type PString06 = "0" extends `${infer T extends string | 0n}` ? T : never; +type PString07 = "true" extends `${infer T extends string | boolean}` ? T : never; +type PString08 = "false" extends `${infer T extends string | boolean}` ? T : never; +type PString09 = "true" extends `${infer T extends string | true}` ? T : never; +type PString10 = "false" extends `${infer T extends string | false}` ? T : never; +type PString11 = "undefined" extends `${infer T extends string | undefined}` ? T : never; +type PString12 = "null" extends `${infer T extends string | null}` ? T : never; +type PTemplate00 = "10" extends `${infer T extends `1${string}` | number}` ? T : never; +type PTemplate01 = "10" extends `${infer T extends `1${string}` | NonLiteralEnum}` ? T : never; +type PTemplate02 = "10" extends `${infer T extends `1${string}` | 10}` ? T : never; +type PTemplate03 = "10" extends `${infer T extends `1${string}` | NumberLiteralEnum}` ? T : never; +type PTemplate04 = "10" extends `${infer T extends `1${string}` | bigint}` ? T : never; +type PTemplate05 = "10" extends `${infer T extends `1${string}` | 10n}` ? T : never; +type PTemplate06 = "true" extends `${infer T extends `${string}e` | boolean}` ? T : never; +type PTemplate07 = "false" extends `${infer T extends `${string}e` | boolean}` ? T : never; +type PTemplate08 = "true" extends `${infer T extends `${"t"}${string}` | true}` ? T : never; +type PTemplate09 = "false" extends `${infer T extends `${"f"}${string}` | false}` ? T : never; +type PTemplate10 = "undefined" extends `${infer T extends `${"u"}${string}` | undefined}` ? T : never; +type PTemplate11 = "null" extends `${infer T extends `${"n"}${string}` | null}` ? T : never; +type PStringLiteral00 = "0" extends `${infer T extends "0" | number}` ? T : never; +type PStringLiteral01 = "0" extends `${infer T extends "0" | NonLiteralEnum}` ? T : never; +type PStringLiteral02 = "0" extends `${infer T extends "0" | 0}` ? T : never; +type PStringLiteral03 = "0" extends `${infer T extends "0" | NumberLiteralEnum}` ? T : never; +type PStringLiteral04 = "0" extends `${infer T extends "0" | bigint}` ? T : never; +type PStringLiteral05 = "0" extends `${infer T extends "0" | 0n}` ? T : never; +type PStringLiteral06 = "true" extends `${infer T extends "true" | "false" | boolean}` ? T : never; +type PStringLiteral07 = "false" extends `${infer T extends "true" | "false" | boolean}` ? T : never; +type PStringLiteral08 = "true" extends `${infer T extends "true" | true}` ? T : never; +type PStringLiteral09 = "false" extends `${infer T extends "false" | false}` ? T : never; +type PStringLiteral10 = "undefined" extends `${infer T extends "undefined" | undefined}` ? T : never; +type PStringLiteral11 = "null" extends `${infer T extends "null" | null}` ? T : never; +type PStringLiteralEnum00 = "0" extends `${infer T extends StringLiteralEnum | number}` ? T : never; +type PStringLiteralEnum01 = "0" extends `${infer T extends StringLiteralEnum | NonLiteralEnum}` ? T : never; +type PStringLiteralEnum02 = "0" extends `${infer T extends StringLiteralEnum | 0}` ? T : never; +type PStringLiteralEnum03 = "0" extends `${infer T extends StringLiteralEnum | NumberLiteralEnum}` ? T : never; +type PStringLiteralEnum04 = "0" extends `${infer T extends StringLiteralEnum | bigint}` ? T : never; +type PStringLiteralEnum05 = "0" extends `${infer T extends StringLiteralEnum | 0n}` ? T : never; +type PStringLiteralEnum06 = "true" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; +type PStringLiteralEnum07 = "false" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; +type PStringLiteralEnum08 = "true" extends `${infer T extends StringLiteralEnum | true}` ? T : never; +type PStringLiteralEnum09 = "false" extends `${infer T extends StringLiteralEnum | false}` ? T : never; +type PStringLiteralEnum10 = "undefined" extends `${infer T extends StringLiteralEnum | undefined}` ? T : never; +type PStringLiteralEnum11 = "null" extends `${infer T extends StringLiteralEnum | null}` ? T : never; +type PNumber0 = "0" extends `${infer T extends number | NonLiteralEnum}` ? T : never; +type PNumber1 = "0" extends `${infer T extends number | NumberLiteralEnum}` ? T : never; +type PNumber2 = "0" extends `${infer T extends number | bigint}` ? T : never; +type PNumber3 = "0" extends `${infer T extends number | 0n}` ? T : never; +type PEnum0 = "0" extends `${infer T extends NonLiteralEnum | NumberLiteralEnum}` ? T : never; +type PEnum1 = "0" extends `${infer T extends NonLiteralEnum | bigint}` ? T : never; +type PEnum2 = "0" extends `${infer T extends NonLiteralEnum | 0n}` ? T : never; +type PNumberLiteral0 = "0" extends `${infer T extends 0 | bigint}` ? T : never; +type PNumberLiteral1 = "0" extends `${infer T extends 0 | 0n}` ? T : never; +type PNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum | bigint}` ? T : never; +type PNumberLiteralEnum1 = "0" extends `${infer T extends NumberLiteralEnum | 0n}` ? T : never; +type PExclude0 = "0" extends `${infer T extends "1" | number}` ? T : never; +type PExclude1 = "0" extends `${infer T extends `1${string}` | number}` ? T : never; +type PExclude2 = "0" extends `${infer T extends 1 | bigint}` ? T : never; +type PExclude3 = "0" extends `${infer T extends NumberLiteralEnum.One | bigint}` ? T : never; +type PExclude4 = "100000000000000000000000" extends `${infer T extends number | bigint}` ? T : never; +type TPrefix0 = "100" extends `${infer T extends number}${string}` ? T : never; +type TPrefix1 = "trueabc" extends `${infer T extends boolean}${string}` ? T : never; +type TPrefix2 = `100:${string}` extends `${infer T extends number}:${string}` ? T : never; +type ExtractPrimitives = T | (T extends `${infer U extends number}` ? U : never) | (T extends `${infer U extends bigint}` ? U : never) | (T extends `${infer U extends boolean | null | undefined}` ? U : never); +type TExtract0 = ExtractPrimitives<"100">; +type TExtract1 = ExtractPrimitives<"1.1">; +type TExtract2 = ExtractPrimitives<"true">; +type IndexFor = S extends `${infer N extends number}` ? N : never; +type IndicesOf = IndexFor>; +interface FieldDefinition { + readonly name: string; + readonly type: "i8" | "i16" | "i32" | "i64" | "u8" | "u16" | "u32" | "u64" | "f32" | "f64"; +} +type FieldType = T extends "i8" | "i16" | "i32" | "u8" | "u16" | "u32" | "f32" | "f64" ? number : T extends "f32" | "f64" ? bigint : never; +type TypedObjectNamedMembers = { + [P in TDef[number]["name"]]: FieldType["type"]>; +}; +type TypedObjectOrdinalMembers = { + [I in Extract]: FieldType["type"]>; +}; +interface TypedObjectMembers { + get(key: K): FieldType["type"]>; + set(key: K, value: FieldType["type"]>): void; + getIndex>(index: I): FieldType["type"]>; + setIndex>(index: I, value: FieldType["type"]>): void; +} +type TypedObject = TypedObjectMembers & TypedObjectNamedMembers & TypedObjectOrdinalMembers; +type Point = TypedObject<[ + { + name: "x"; + type: "f64"; + }, + { + name: "y"; + type: "f64"; + } +]>; +declare const p: Point; +declare function f1(s: `**${T}**`): T; +declare function f2(s: `**${T}**`): T; +declare function f3(s: `**${T}**`): T; +declare function f4(s: `**${T}**`): T; +//# sourceMappingURL=templateLiteralTypes4.d.ts.map +/// [Errors] //// + +templateLiteralTypes4.ts(285,12): error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. +templateLiteralTypes4.ts(289,12): error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. + + +==== templateLiteralTypes4.ts (2 errors) ==== + // infer from number + type TNumber0 = "100" extends `${infer N extends number}` ? N : never; // 100 + type TNumber1 = "-100" extends `${infer N extends number}` ? N : never; // -100 + type TNumber2 = "1.1" extends `${infer N extends number}` ? N : never; // 1.1 + type TNumber3 = "8e-11" extends `${infer N extends number}` ? N : never; // 8e-11 (0.00000000008) + type TNumber4 = "0x10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) + type TNumber5 = "0o10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) + type TNumber6 = "0b10" extends `${infer N extends number}` ? N : never; // number (not round-trippable) + type TNumber7 = "10e2" extends `${infer N extends number}` ? N : never; // number (not round-trippable) + type TNumber8 = "abcd" extends `${infer N extends number}` ? N : never; // never + + // infer from bigint + type TBigInt0 = "100" extends `${infer N extends bigint}` ? N : never; // 100n + type TBigInt1 = "-100" extends `${infer N extends bigint}` ? N : never; // -100n + type TBigInt2 = "0x10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) + type TBigInt3 = "0o10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) + type TBigInt4 = "0b10" extends `${infer N extends bigint}` ? N : never; // bigint (not round-trippable) + type TBigInt5 = "1.1" extends `${infer N extends bigint}` ? N : never; // never + type TBigInt6 = "10e2" extends `${infer N extends bigint}` ? N : never; // never + type TBigInt7 = "abcd" extends `${infer N extends bigint}` ? N : never; // never + + // infer from boolean + type TBoolean0 = "true" extends `${infer T extends boolean}` ? T : never; // true + type TBoolean1 = "false" extends `${infer T extends boolean}` ? T : never; // false + type TBoolean2 = "abcd" extends `${infer T extends boolean}` ? T : never; // never + + // infer from null + type TNull0 = "null" extends `${infer T extends null}` ? T : never; // null + type TNull1 = "abcd" extends `${infer T extends null}` ? T : never; // never + + // infer from undefined + type TUndefined0 = "undefined" extends `${infer T extends undefined}` ? T : never; // undefined + type TUndefined1 = "abcd" extends `${infer T extends undefined}` ? T : never; // never + + // infer from literal enums + const enum StringLiteralEnum { Zero = "0", True = "true", False = "false", Undefined = "undefined", Null = "null" } + type TStringLiteralEnum0 = "0" extends `${infer T extends StringLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + + const enum NumberLiteralEnum { Zero, One } + type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; // NumberLiteralEnum.Zero + + // infer from non-literal enums + const enum NonLiteralEnum { Zero = NumberLiteralEnum.Zero, One = NumberLiteralEnum.One } + type TNonLiteralEnum0 = "0" extends `${infer T extends NonLiteralEnum}` ? T : never; // 0 + + // infer using priority: + // string > template-literal > (string-literal | string-literal-enum) > + // number > enum > (number-literal | number-literal-enum) > + // bigint > bigint-literal > + // boolean > (boolean-literal | undefined | null) + + // #region string + // string > string-literal-enum + type PString00 = "0" extends `${infer T extends string | StringLiteralEnum}` ? T : never; // "0" + + // string > number + type PString01 = "0" extends `${infer T extends string | number}` ? T : never; // "0" + + // string > enum + type PString02 = "0" extends `${infer T extends string | NonLiteralEnum}` ? T : never; // "0" + + // string > (number-literal | number-literal-enum) + type PString03 = "0" extends `${infer T extends string | 0}` ? T : never; // "0" + type PString04 = "0" extends `${infer T extends string | NumberLiteralEnum}` ? T : never; // "0" + + // string > bigint + type PString05 = "0" extends `${infer T extends string | bigint}` ? T : never; // "0" + + // string > bigint-literal + type PString06 = "0" extends `${infer T extends string | 0n}` ? T : never; // "0" + + // string > boolean + type PString07 = "true" extends `${infer T extends string | boolean}` ? T : never; // "true" + type PString08 = "false" extends `${infer T extends string | boolean}` ? T : never; // "false" + + // string > (boolean-literal | undefined | null) + type PString09 = "true" extends `${infer T extends string | true}` ? T : never; // "true" + type PString10 = "false" extends `${infer T extends string | false}` ? T : never; // "false" + type PString11 = "undefined" extends `${infer T extends string | undefined}` ? T : never; // "undefined" + type PString12 = "null" extends `${infer T extends string | null}` ? T : never; // "null" + // #endregion string + + // #region template-literal + // template-literal > number + type PTemplate00 = "10" extends `${infer T extends `1${string}` | number}` ? T : never; // "10" + + // template-literal > enum + type PTemplate01 = "10" extends `${infer T extends `1${string}` | NonLiteralEnum}` ? T : never; // "10" + + // template-literal > (number-literal | number-literal-enum) + type PTemplate02 = "10" extends `${infer T extends `1${string}` | 10}` ? T : never; // "10" + type PTemplate03 = "10" extends `${infer T extends `1${string}` | NumberLiteralEnum}` ? T : never; // "10" + + // template-literal > bigint + type PTemplate04 = "10" extends `${infer T extends `1${string}` | bigint}` ? T : never; // "10" + + // template-literal > bigint-literal + type PTemplate05 = "10" extends `${infer T extends `1${string}` | 10n}` ? T : never; // "10" + + // template-literal > boolean + type PTemplate06 = "true" extends `${infer T extends `${string}e` | boolean}` ? T : never; // "true" + type PTemplate07 = "false" extends `${infer T extends `${string}e` | boolean}` ? T : never; // "false" + + // template-literal > (boolean-literal | undefined | null) + type PTemplate08 = "true" extends `${infer T extends `${"t"}${string}` | true}` ? T : never; // "true" + type PTemplate09 = "false" extends `${infer T extends `${"f"}${string}` | false}` ? T : never; // "false" + type PTemplate10 = "undefined" extends `${infer T extends `${"u"}${string}` | undefined}` ? T : never; // "undefined" + type PTemplate11 = "null" extends `${infer T extends `${"n"}${string}` | null}` ? T : never; // "null" + // #endregion template-literal + + // #region string-literal + // string-literal > number + type PStringLiteral00 = "0" extends `${infer T extends "0" | number}` ? T : never; // "0" + + // string-literal > enum + type PStringLiteral01 = "0" extends `${infer T extends "0" | NonLiteralEnum}` ? T : never; // "0" + + // string-literal > (number-literal | number-literal-enum) + type PStringLiteral02 = "0" extends `${infer T extends "0" | 0}` ? T : never; // "0" + type PStringLiteral03 = "0" extends `${infer T extends "0" | NumberLiteralEnum}` ? T : never; // "0" + + // string-literal > bigint + type PStringLiteral04 = "0" extends `${infer T extends "0" | bigint}` ? T : never; // "0" + + // string-literal > bigint-literal + type PStringLiteral05 = "0" extends `${infer T extends "0" | 0n}` ? T : never; // "0" + + // string-literal > boolean + type PStringLiteral06 = "true" extends `${infer T extends "true" | "false" | boolean}` ? T : never; // "true" + type PStringLiteral07 = "false" extends `${infer T extends "true" | "false" | boolean}` ? T : never; // "false" + + // string-literal > (boolean-literal | undefined | null) + type PStringLiteral08 = "true" extends `${infer T extends "true" | true}` ? T : never; // "true" + type PStringLiteral09 = "false" extends `${infer T extends "false" | false}` ? T : never; // "false" + type PStringLiteral10 = "undefined" extends `${infer T extends "undefined" | undefined}` ? T : never; // "undefined" + type PStringLiteral11 = "null" extends `${infer T extends "null" | null}` ? T : never; // "null" + // #endregion string-literal + + // #region string-literal-enum + // string-literal-enum > number + type PStringLiteralEnum00 = "0" extends `${infer T extends StringLiteralEnum | number}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > enum + type PStringLiteralEnum01 = "0" extends `${infer T extends StringLiteralEnum | NonLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > (number-literal | number-literal-enum) + type PStringLiteralEnum02 = "0" extends `${infer T extends StringLiteralEnum | 0}` ? T : never; // StringLiteralEnum.Zero + type PStringLiteralEnum03 = "0" extends `${infer T extends StringLiteralEnum | NumberLiteralEnum}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > bigint + type PStringLiteralEnum04 = "0" extends `${infer T extends StringLiteralEnum | bigint}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > bigint-literal + type PStringLiteralEnum05 = "0" extends `${infer T extends StringLiteralEnum | 0n}` ? T : never; // StringLiteralEnum.Zero + + // string-literal-enum > boolean + type PStringLiteralEnum06 = "true" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; // StringLiteralEnum.True + type PStringLiteralEnum07 = "false" extends `${infer T extends StringLiteralEnum | boolean}` ? T : never; // StringLiteralEnum.False + + // string-literal-enum > (boolean-literal | undefined | null) + type PStringLiteralEnum08 = "true" extends `${infer T extends StringLiteralEnum | true}` ? T : never; // StringLiteralEnum.True + type PStringLiteralEnum09 = "false" extends `${infer T extends StringLiteralEnum | false}` ? T : never; // StringLiteralEnum.False + type PStringLiteralEnum10 = "undefined" extends `${infer T extends StringLiteralEnum | undefined}` ? T : never; // StringLiteralEnum.Undefined + type PStringLiteralEnum11 = "null" extends `${infer T extends StringLiteralEnum | null}` ? T : never; // StringLiteralEnum.Null + // #endregion string-literal-enum + + // #region number + // number > enum + type PNumber0 = "0" extends `${infer T extends number | NonLiteralEnum}` ? T : never; // 0 + + // number > number-literal-enum + type PNumber1 = "0" extends `${infer T extends number | NumberLiteralEnum}` ? T : never; // 0 + + // number > bigint + type PNumber2 = "0" extends `${infer T extends number | bigint}` ? T : never; // 0 + + // number > bigint-literal + type PNumber3 = "0" extends `${infer T extends number | 0n}` ? T : never; // 0 + // #endregion number + + // #region enum + // enum > number-literal-enum + type PEnum0 = "0" extends `${infer T extends NonLiteralEnum | NumberLiteralEnum}` ? T : never; // 0 + + // enum > bigint + type PEnum1 = "0" extends `${infer T extends NonLiteralEnum | bigint}` ? T : never; // 0 + + // enum > bigint-literal + type PEnum2 = "0" extends `${infer T extends NonLiteralEnum | 0n}` ? T : never; // 0 + // #endregion enum + + // #region number-literal + // number-literal > bigint + type PNumberLiteral0 = "0" extends `${infer T extends 0 | bigint}` ? T : never; // 0 + + // number-literal > bigint-literal + type PNumberLiteral1 = "0" extends `${infer T extends 0 | 0n}` ? T : never; // 0 + // #endregion number-literal + + // #region number-literal-enum + // number-literal-enum > bigint + type PNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum | bigint}` ? T : never; // NumberLiteralEnum.Zero + + // number-literal-enum > bigint-literal + type PNumberLiteralEnum1 = "0" extends `${infer T extends NumberLiteralEnum | 0n}` ? T : never; // NumberLiteralEnum.Zero + // #endregion number-literal-enum + + // non-matchable constituents are excluded + type PExclude0 = "0" extends `${infer T extends "1" | number}` ? T : never; // 0 + type PExclude1 = "0" extends `${infer T extends `1${string}` | number}` ? T : never; // 0 + type PExclude2 = "0" extends `${infer T extends 1 | bigint}` ? T : never; // 0n + type PExclude3 = "0" extends `${infer T extends NumberLiteralEnum.One | bigint}` ? T : never; // 0n + type PExclude4 = "100000000000000000000000" extends `${infer T extends number | bigint}` ? T : never; // 100000000000000000000000n + + // infer to prefix from string + type TPrefix0 = "100" extends `${infer T extends number}${string}` ? T : never; // 1 + type TPrefix1 = "trueabc" extends `${infer T extends boolean}${string}` ? T : never; // boolean (T only receives 't', not the whole string) + type TPrefix2 = `100:${string}` extends `${infer T extends number}:${string}` ? T : never; // 100 (T receives '100' because it scans until ':') + + // can use union w/multiple branches to extract each possibility + type ExtractPrimitives = + | T + | (T extends `${infer U extends number}` ? U : never) + | (T extends `${infer U extends bigint}` ? U : never) + | (T extends `${infer U extends boolean | null | undefined}` ? U : never) + ; + + type TExtract0 = ExtractPrimitives<"100">; // "100" | 100 | 100n + type TExtract1 = ExtractPrimitives<"1.1">; // "1.1" | 1.1 + type TExtract2 = ExtractPrimitives<"true">; // "true" | true + + + + // example use case (based on old TypedObjects proposal): + + // Use constrained `infer` in template literal to get ordinal indices as numbers: + type IndexFor = S extends `${infer N extends number}` ? N : never; + type IndicesOf = IndexFor>; // ordinal indices as number literals + + interface FieldDefinition { + readonly name: string; + readonly type: "i8" | "i16" | "i32" | "i64" | "u8" | "u16" | "u32" | "u64" | "f32" | "f64"; + } + + type FieldType = + T extends "i8" | "i16" | "i32" | "u8" | "u16" | "u32" | "f32" | "f64" ? number : + T extends "f32" | "f64" ? bigint : + never; + + // Generates named members like `{ x: number, y: bigint }` from `[{ name: "x", type: "i32" }, { name: "y", type: "i64" }]` + type TypedObjectNamedMembers = { + [P in TDef[number]["name"]]: FieldType["type"]>; + }; + + // Generates ordinal members like `{ 0: number, 1: bigint }` from `[{ name: "x", type: "i32" }, { name: "y", type: "i64" }]` + type TypedObjectOrdinalMembers = { + [I in Extract]: FieldType["type"]>; + }; + + // Default members + interface TypedObjectMembers { + // get/set a field by name + get(key: K): FieldType["type"]>; + set(key: K, value: FieldType["type"]>): void; + + // get/set a field by index + getIndex>(index: I): FieldType["type"]>; + setIndex>(index: I, value: FieldType["type"]>): void; + } + + type TypedObject = + & TypedObjectMembers + & TypedObjectNamedMembers + & TypedObjectOrdinalMembers; + + // NOTE: type would normally be created from something like `const Point = TypedObject([...])` from which we would infer the type + type Point = TypedObject<[ + { name: "x", type: "f64" }, + { name: "y", type: "f64" }, + ]>; + + declare const p: Point; + p.getIndex(0); // ok, 0 is a valid index + p.getIndex(1); // ok, 1 is a valid index + p.getIndex(2); // error, 2 is not a valid index + ~ +!!! error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. + + p.setIndex(0, 0); // ok, 0 is a valid index + p.setIndex(1, 0); // ok, 1 is a valid index + p.setIndex(2, 3); // error, 2 is not a valid index + ~ +!!! error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. + + // function inference + declare function f1(s: `**${T}**`): T; + f1("**123**"); // "123" + + declare function f2(s: `**${T}**`): T; + f2("**123**"); // 123 + + declare function f3(s: `**${T}**`): T; + f3("**123**"); // 123n + + declare function f4(s: `**${T}**`): T; + f4("**true**"); // true | "true" + f4("**false**"); // false | "false" + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralsInTypes.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralsInTypes.d.ts.map new file mode 100644 index 0000000000000..34f0bb944369d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralsInTypes.d.ts.map @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/templateLiteralsInTypes.ts] //// + +//// [templateLiteralsInTypes.ts] +const f = (hdr: string, val: number): `${string}:\t${number}\r\n` => `${hdr}:\t${val}\r\n` as `${string}:\t${number}\r\n`; + +f("x").foo; + + +/// [Declarations] //// + + + +//// [templateLiteralsInTypes.d.ts] +declare const f: (hdr: string, val: number) => `${string}:\t${number}\r\n`; +//# sourceMappingURL=templateLiteralsInTypes.d.ts.map + +/// [Declarations Maps] //// + + +//// [templateLiteralsInTypes.d.ts.map] +{"version":3,"file":"templateLiteralsInTypes.d.ts","sourceRoot":"","sources":["templateLiteralsInTypes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,QAAS,MAAM,OAAO,MAAM,KAAG,GAAG,MAAM,MAAM,MAAM,MAA8D,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmOiAoaGRyOiBzdHJpbmcsIHZhbDogbnVtYmVyKSA9PiBgJHtzdHJpbmd9Olx0JHtudW1iZXJ9XHJcbmA7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZW1wbGF0ZUxpdGVyYWxzSW5UeXBlcy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcGxhdGVMaXRlcmFsc0luVHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlbXBsYXRlTGl0ZXJhbHNJblR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsTUFBTSxDQUFDLFFBQVMsTUFBTSxPQUFPLE1BQU0sS0FBRyxHQUFHLE1BQU0sTUFBTSxNQUFNLE1BQThELENBQUMifQ==,Y29uc3QgZiA9IChoZHI6IHN0cmluZywgdmFsOiBudW1iZXIpOiBgJHtzdHJpbmd9Olx0JHtudW1iZXJ9XHJcbmAgPT4gYCR7aGRyfTpcdCR7dmFsfVxyXG5gIGFzIGAke3N0cmluZ306XHQke251bWJlcn1cclxuYDsKCmYoIngiKS5mb287Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisTypeInObjectLiterals2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisTypeInObjectLiterals2.d.ts.map new file mode 100644 index 0000000000000..c78003ab8be81 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisTypeInObjectLiterals2.d.ts.map @@ -0,0 +1,367 @@ +//// [tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts] //// + +//// [thisTypeInObjectLiterals2.ts] +// In methods of an object literal with no contextual type, 'this' has the type +// of the object literal. + +let obj1 = { + a: 1, + f(): number { + return this.a; + }, + b: "hello", + c: { + g(): void { + this.g(); + } + }, + get d(): number { + return this.a; + }, + get e(): string { + return this.b; + }, + set e(value) { + this.b = value; + } +}; + +// In methods of an object literal with a contextual type, 'this' has the +// contextual type. + +type Point = { + x: number; + y: number; + z?: number; + moveBy(dx: number, dy: number, dz?: number): void; +} + +let p1: Point = { + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}; + +let p2: Point | null = { + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}; + +let p3: Point | undefined = { + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}; + +let p4: Point | null | undefined = { + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}; + +declare function f1(p: Point): void; + +f1({ + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}); + +declare function f2(p: Point | null | undefined): void; + +f2({ + x: 10, + y: 20, + moveBy(dx, dy, dz) { + this.x += dx; + this.y += dy; + if (this.z && dz) { + this.z += dz; + } + } +}); + +// In methods of an object literal with a contextual type that includes some +// ThisType, 'this' is of type T. + +type ObjectDescriptor = { + data?: D; + methods?: M & ThisType; // Type of 'this' in methods is D & M +} + +declare function makeObject(desc: ObjectDescriptor): D & M; + +let x1: { + x: number; + y: number; +} & { + moveBy(dx: number, dy: number): void; +} = makeObject({ + data: { x: 0, y: 0 }, + methods: { + moveBy(dx: number, dy: number) { + this.x += dx; // Strongly typed this + this.y += dy; // Strongly typed this + } + } +}); + +// In methods contained in an object literal with a contextual type that includes +// some ThisType, 'this' is of type T. + +type ObjectDescriptor2 = ThisType & { + data?: D; + methods?: M; +} + +declare function makeObject2(desc: ObjectDescriptor): D & M; + +let x2: { + x: number; + y: number; +} & { + moveBy(dx: number, dy: number): void; +} = makeObject2({ + data: { x: 0, y: 0 }, + methods: { + moveBy(dx: number, dy: number) { + this.x += dx; // Strongly typed this + this.y += dy; // Strongly typed this + } + } +}); + +// Check pattern similar to Object.defineProperty and Object.defineProperties + +type PropDesc = { + value?: T; + get?(): T; + set?(value: T): void; +} + +type PropDescMap = { + [K in keyof T]: PropDesc; +} + +declare function defineProp(obj: T, name: K, desc: PropDesc & ThisType): T & Record; + +declare function defineProps(obj: T, descs: PropDescMap & ThisType): T & U; + +let p10: Point & Record<"foo", number> = defineProp(p1, "foo", { value: 42 }); +p10.foo = p10.foo + 1; + +let p11: Point & Record<"bar", number> = defineProp(p1, "bar", { + get() { + return this.x; + }, + set(value: number) { + this.x = value; + } +}); +p11.bar = p11.bar + 1; + +let p12: Point & { + foo: number; + bar: number; +} = defineProps(p1, { + foo: { + value: 42 + }, + bar: { + get(): number { + return this.x; + }, + set(value: number) { + this.x = value; + } + } +}); +p12.foo = p12.foo + 1; +p12.bar = p12.bar + 1; + +// Proof of concept for typing of Vue.js + +type Accessors = { [K in keyof T]: (() => T[K]) | Computed }; + +type Dictionary = { [x: string]: T } + +type Computed = { + get?(): T; + set?(value: T): void; +} + +type VueOptions = ThisType & { + data?: D | (() => D); + methods?: M; + computed?: Accessors

; +} + +declare const Vue: new (options: VueOptions) => D & M & P; + +let vue: { + x: number; + y: number; +} & { + f(x: string): number; +} & { + test: number; + hello: string; +} = new Vue({ + data: () => ({ x: 1, y: 2 }), + methods: { + f(x: string) { + return this.x; + } + }, + computed: { + test(): number { + return this.x; + }, + hello: { + get() { + return "hi"; + }, + set(value: string) { + } + } + } +}); + +vue; +vue.x; +vue.f("abc"); +vue.test; +vue.hello; + + +/// [Declarations] //// + + + +//// [thisTypeInObjectLiterals2.d.ts] +declare let obj1: { + a: number; + f(): number; + b: string; + c: { + g(): void; + }; + readonly d: number; + e: string; +}; +type Point = { + x: number; + y: number; + z?: number; + moveBy(dx: number, dy: number, dz?: number): void; +}; +declare let p1: Point; +declare let p2: Point | null; +declare let p3: Point | undefined; +declare let p4: Point | null | undefined; +declare function f1(p: Point): void; +declare function f2(p: Point | null | undefined): void; +type ObjectDescriptor = { + data?: D; + methods?: M & ThisType; +}; +declare function makeObject(desc: ObjectDescriptor): D & M; +declare let x1: { + x: number; + y: number; +} & { + moveBy(dx: number, dy: number): void; +}; +type ObjectDescriptor2 = ThisType & { + data?: D; + methods?: M; +}; +declare function makeObject2(desc: ObjectDescriptor): D & M; +declare let x2: { + x: number; + y: number; +} & { + moveBy(dx: number, dy: number): void; +}; +type PropDesc = { + value?: T; + get?(): T; + set?(value: T): void; +}; +type PropDescMap = { + [K in keyof T]: PropDesc; +}; +declare function defineProp(obj: T, name: K, desc: PropDesc & ThisType): T & Record; +declare function defineProps(obj: T, descs: PropDescMap & ThisType): T & U; +declare let p10: Point & Record<"foo", number>; +declare let p11: Point & Record<"bar", number>; +declare let p12: Point & { + foo: number; + bar: number; +}; +type Accessors = { + [K in keyof T]: (() => T[K]) | Computed; +}; +type Dictionary = { + [x: string]: T; +}; +type Computed = { + get?(): T; + set?(value: T): void; +}; +type VueOptions = ThisType & { + data?: D | (() => D); + methods?: M; + computed?: Accessors

; +}; +declare const Vue: new (options: VueOptions) => D & M & P; +declare let vue: { + x: number; + y: number; +} & { + f(x: string): number; +} & { + test: number; + hello: string; +}; +//# sourceMappingURL=thisTypeInObjectLiterals2.d.ts.map + +/// [Declarations Maps] //// + + +//// [thisTypeInObjectLiterals2.d.ts.map] +{"version":3,"file":"thisTypeInObjectLiterals2.d.ts","sourceRoot":"","sources":["thisTypeInObjectLiterals2.ts"],"names":[],"mappings":"AAGA,QAAA,IAAI,IAAI;;SAEC,MAAM;;;aAKF,IAAI;;;;CAahB,CAAC;AAKF,KAAK,KAAK,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrD,CAAA;AAED,QAAA,IAAI,EAAE,EAAE,KAUP,CAAC;AAEF,QAAA,IAAI,EAAE,EAAE,KAAK,GAAG,IAUf,CAAC;AAEF,QAAA,IAAI,EAAE,EAAE,KAAK,GAAG,SAUf,CAAC;AAEF,QAAA,IAAI,EAAE,EAAE,KAAK,GAAG,IAAI,GAAG,SAUtB,CAAC;AAEF,OAAO,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;AAcpC,OAAO,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;AAiBvD,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,IAAI;IAC1B,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;C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S4KCnR5cGUgUG9pbnQgPSB7CiAgICB4OiBudW1iZXI7CiAgICB5OiBudW1iZXI7CiAgICB6PzogbnVtYmVyOwogICAgbW92ZUJ5KGR4OiBudW1iZXIsIGR5OiBudW1iZXIsIGR6PzogbnVtYmVyKTogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXM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wgeTogMiB9KSwKICAgIG1ldGhvZHM6IHsKICAgICAgICBmKHg6IHN0cmluZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy54OwogICAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICAgIHRlc3QoKTogbnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/trackedSymbolsNoCrash.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/trackedSymbolsNoCrash.d.ts.map new file mode 100644 index 0000000000000..7889e5141eee1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/trackedSymbolsNoCrash.d.ts.map @@ -0,0 +1,1048 @@ +//// [tests/cases/compiler/trackedSymbolsNoCrash.ts] //// + +//// [ast.ts] +export enum SyntaxKind { Node0, Node1, Node2, Node3, Node4, Node5, Node6, Node7, Node8, Node9, Node10, Node11, Node12, Node13, Node14, Node15, Node16, Node17, Node18, Node19, Node20, Node21, Node22, Node23, Node24, Node25, Node26, Node27, Node28, Node29, Node30, Node31, Node32, Node33, Node34, Node35, Node36, Node37, Node38, Node39, Node40, Node41, Node42, Node43, Node44, Node45, Node46, Node47, Node48, Node49, Node50, Node51, Node52, Node53, Node54, Node55, Node56, Node57, Node58, Node59, Node60, Node61, Node62, Node63, Node64, Node65, Node66, Node67, Node68, Node69, Node70, Node71, Node72, Node73, Node74, Node75, Node76, Node77, Node78, Node79, Node80, Node81, Node82, Node83, Node84, Node85, Node86, Node87, Node88, Node89, Node90, Node91, Node92, Node93, Node94, Node95, Node96, Node97, Node98, Node99 } + +export interface Node0 { kind: SyntaxKind.Node0; propNode0: number; } +export interface Node1 { kind: SyntaxKind.Node1; propNode1: number; } +export interface Node2 { kind: SyntaxKind.Node2; propNode2: number; } +export interface Node3 { kind: SyntaxKind.Node3; propNode3: number; } +export interface Node4 { kind: SyntaxKind.Node4; propNode4: number; } +export interface Node5 { kind: SyntaxKind.Node5; propNode5: number; } +export interface Node6 { kind: SyntaxKind.Node6; propNode6: number; } +export interface Node7 { kind: SyntaxKind.Node7; propNode7: number; } +export interface Node8 { kind: SyntaxKind.Node8; propNode8: number; } +export interface Node9 { kind: SyntaxKind.Node9; propNode9: number; } +export interface Node10 { kind: SyntaxKind.Node10; propNode10: number; } +export interface Node11 { kind: SyntaxKind.Node11; propNode11: number; } +export interface Node12 { kind: SyntaxKind.Node12; propNode12: number; } +export interface Node13 { kind: SyntaxKind.Node13; propNode13: number; } +export interface Node14 { kind: SyntaxKind.Node14; propNode14: number; } +export interface Node15 { kind: SyntaxKind.Node15; propNode15: number; } +export interface Node16 { kind: SyntaxKind.Node16; propNode16: number; } +export interface Node17 { kind: SyntaxKind.Node17; propNode17: number; } +export interface Node18 { kind: SyntaxKind.Node18; propNode18: number; } +export interface Node19 { kind: SyntaxKind.Node19; propNode19: number; } +export interface Node20 { kind: SyntaxKind.Node20; propNode20: number; } +export interface Node21 { kind: SyntaxKind.Node21; propNode21: number; } +export interface Node22 { kind: SyntaxKind.Node22; propNode22: number; } +export interface Node23 { kind: SyntaxKind.Node23; propNode23: number; } +export interface Node24 { kind: SyntaxKind.Node24; propNode24: number; } +export interface Node25 { kind: SyntaxKind.Node25; propNode25: number; } +export interface Node26 { kind: SyntaxKind.Node26; propNode26: number; } +export interface Node27 { kind: SyntaxKind.Node27; propNode27: number; } +export interface Node28 { kind: SyntaxKind.Node28; propNode28: number; } +export interface Node29 { kind: SyntaxKind.Node29; propNode29: number; } +export interface Node30 { kind: SyntaxKind.Node30; propNode30: number; } +export interface Node31 { kind: SyntaxKind.Node31; propNode31: number; } +export interface Node32 { kind: SyntaxKind.Node32; propNode32: number; } +export interface Node33 { kind: SyntaxKind.Node33; propNode33: number; } +export interface Node34 { kind: SyntaxKind.Node34; propNode34: number; } +export interface Node35 { kind: SyntaxKind.Node35; propNode35: number; } +export interface Node36 { kind: SyntaxKind.Node36; propNode36: number; } +export interface Node37 { kind: SyntaxKind.Node37; propNode37: number; } +export interface Node38 { kind: SyntaxKind.Node38; propNode38: number; } +export interface Node39 { kind: SyntaxKind.Node39; propNode39: number; } +export interface Node40 { kind: SyntaxKind.Node40; propNode40: number; } +export interface Node41 { kind: SyntaxKind.Node41; propNode41: number; } +export interface Node42 { kind: SyntaxKind.Node42; propNode42: number; } +export interface Node43 { kind: SyntaxKind.Node43; propNode43: number; } +export interface Node44 { kind: SyntaxKind.Node44; propNode44: number; } +export interface Node45 { kind: SyntaxKind.Node45; propNode45: number; } +export interface Node46 { kind: SyntaxKind.Node46; propNode46: number; } +export interface Node47 { kind: SyntaxKind.Node47; propNode47: number; } +export interface Node48 { kind: SyntaxKind.Node48; propNode48: number; } +export interface Node49 { kind: SyntaxKind.Node49; propNode49: number; } +export interface Node50 { kind: SyntaxKind.Node50; propNode50: number; } +export interface Node51 { kind: SyntaxKind.Node51; propNode51: number; } +export interface Node52 { kind: SyntaxKind.Node52; propNode52: number; } +export interface Node53 { kind: SyntaxKind.Node53; propNode53: number; } +export interface Node54 { kind: SyntaxKind.Node54; propNode54: number; } +export interface Node55 { kind: SyntaxKind.Node55; propNode55: number; } +export interface Node56 { kind: SyntaxKind.Node56; propNode56: number; } +export interface Node57 { kind: SyntaxKind.Node57; propNode57: number; } +export interface Node58 { kind: SyntaxKind.Node58; propNode58: number; } +export interface Node59 { kind: SyntaxKind.Node59; propNode59: number; } +export interface Node60 { kind: SyntaxKind.Node60; propNode60: number; } +export interface Node61 { kind: SyntaxKind.Node61; propNode61: number; } +export interface Node62 { kind: SyntaxKind.Node62; propNode62: number; } +export interface Node63 { kind: SyntaxKind.Node63; propNode63: number; } +export interface Node64 { kind: SyntaxKind.Node64; propNode64: number; } +export interface Node65 { kind: SyntaxKind.Node65; propNode65: number; } +export interface Node66 { kind: SyntaxKind.Node66; propNode66: number; } +export interface Node67 { kind: SyntaxKind.Node67; propNode67: number; } +export interface Node68 { kind: SyntaxKind.Node68; propNode68: number; } +export interface Node69 { kind: SyntaxKind.Node69; propNode69: number; } +export interface Node70 { kind: SyntaxKind.Node70; propNode70: number; } +export interface Node71 { kind: SyntaxKind.Node71; propNode71: number; } +export interface Node72 { kind: SyntaxKind.Node72; propNode72: number; } +export interface Node73 { kind: SyntaxKind.Node73; propNode73: number; } +export interface Node74 { kind: SyntaxKind.Node74; propNode74: number; } +export interface Node75 { kind: SyntaxKind.Node75; propNode75: number; } +export interface Node76 { kind: SyntaxKind.Node76; propNode76: number; } +export interface Node77 { kind: SyntaxKind.Node77; propNode77: number; } +export interface Node78 { kind: SyntaxKind.Node78; propNode78: number; } +export interface Node79 { kind: SyntaxKind.Node79; propNode79: number; } +export interface Node80 { kind: SyntaxKind.Node80; propNode80: number; } +export interface Node81 { kind: SyntaxKind.Node81; propNode81: number; } +export interface Node82 { kind: SyntaxKind.Node82; propNode82: number; } +export interface Node83 { kind: SyntaxKind.Node83; propNode83: number; } +export interface Node84 { kind: SyntaxKind.Node84; propNode84: number; } +export interface Node85 { kind: SyntaxKind.Node85; propNode85: number; } +export interface Node86 { kind: SyntaxKind.Node86; propNode86: number; } +export interface Node87 { kind: SyntaxKind.Node87; propNode87: number; } +export interface Node88 { kind: SyntaxKind.Node88; propNode88: number; } +export interface Node89 { kind: SyntaxKind.Node89; propNode89: number; } +export interface Node90 { kind: SyntaxKind.Node90; propNode90: number; } +export interface Node91 { kind: SyntaxKind.Node91; propNode91: number; } +export interface Node92 { kind: SyntaxKind.Node92; propNode92: number; } +export interface Node93 { kind: SyntaxKind.Node93; propNode93: number; } +export interface Node94 { kind: SyntaxKind.Node94; propNode94: number; } +export interface Node95 { kind: SyntaxKind.Node95; propNode95: number; } +export interface Node96 { kind: SyntaxKind.Node96; propNode96: number; } +export interface Node97 { kind: SyntaxKind.Node97; propNode97: number; } +export interface Node98 { kind: SyntaxKind.Node98; propNode98: number; } +export interface Node99 { kind: SyntaxKind.Node99; propNode99: number; } + +export type Node = Node0 | Node1 | Node2 | Node3 | Node4 | Node5 | Node6 | Node7 | Node8 | Node9 | Node10 | Node11 | Node12 | Node13 | Node14 | Node15 | Node16 | Node17 | Node18 | Node19 | Node20 | Node21 | Node22 | Node23 | Node24 | Node25 | Node26 | Node27 | Node28 | Node29 | Node30 | Node31 | Node32 | Node33 | Node34 | Node35 | Node36 | Node37 | Node38 | Node39 | Node40 | Node41 | Node42 | Node43 | Node44 | Node45 | Node46 | Node47 | Node48 | Node49 | Node50 | Node51 | Node52 | Node53 | Node54 | Node55 | Node56 | Node57 | Node58 | Node59 | Node60 | Node61 | Node62 | Node63 | Node64 | Node65 | Node66 | Node67 | Node68 | Node69 | Node70 | Node71 | Node72 | Node73 | Node74 | Node75 | Node76 | Node77 | Node78 | Node79 | Node80 | Node81 | Node82 | Node83 | Node84 | Node85 | Node86 | Node87 | Node88 | Node89 | Node90 | Node91 | Node92 | Node93 | Node94 | Node95 | Node96 | Node97 | Node98 | Node99; + +//// [index.ts] +import * as ast from "./ast"; + +export const isNodeOfType = + (nodeType: NodeType): (node: ast.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract => + ( + node: ast.Node | null | undefined, + ): node is Extract => + node?.kind === nodeType; + + + +/// [Declarations] //// + + + +//// [ast.d.ts] +export declare enum SyntaxKind { + Node0 = 0, + Node1 = 1, + Node2 = 2, + Node3 = 3, + Node4 = 4, + Node5 = 5, + Node6 = 6, + Node7 = 7, + Node8 = 8, + Node9 = 9, + Node10 = 10, + Node11 = 11, + Node12 = 12, + Node13 = 13, + Node14 = 14, + Node15 = 15, + Node16 = 16, + Node17 = 17, + Node18 = 18, + Node19 = 19, + Node20 = 20, + Node21 = 21, + Node22 = 22, + Node23 = 23, + Node24 = 24, + Node25 = 25, + Node26 = 26, + Node27 = 27, + Node28 = 28, + Node29 = 29, + Node30 = 30, + Node31 = 31, + Node32 = 32, + Node33 = 33, + Node34 = 34, + Node35 = 35, + Node36 = 36, + Node37 = 37, + Node38 = 38, + Node39 = 39, + Node40 = 40, + Node41 = 41, + Node42 = 42, + Node43 = 43, + Node44 = 44, + Node45 = 45, + Node46 = 46, + Node47 = 47, + Node48 = 48, + Node49 = 49, + Node50 = 50, + Node51 = 51, + Node52 = 52, + Node53 = 53, + Node54 = 54, + Node55 = 55, + Node56 = 56, + Node57 = 57, + Node58 = 58, + Node59 = 59, + Node60 = 60, + Node61 = 61, + Node62 = 62, + Node63 = 63, + Node64 = 64, + Node65 = 65, + Node66 = 66, + Node67 = 67, + Node68 = 68, + Node69 = 69, + Node70 = 70, + Node71 = 71, + Node72 = 72, + Node73 = 73, + Node74 = 74, + Node75 = 75, + Node76 = 76, + Node77 = 77, + Node78 = 78, + Node79 = 79, + Node80 = 80, + Node81 = 81, + Node82 = 82, + Node83 = 83, + Node84 = 84, + Node85 = 85, + Node86 = 86, + Node87 = 87, + Node88 = 88, + Node89 = 89, + Node90 = 90, + Node91 = 91, + Node92 = 92, + Node93 = 93, + Node94 = 94, + Node95 = 95, + Node96 = 96, + Node97 = 97, + Node98 = 98, + Node99 = 99 +} +export interface Node0 { + kind: SyntaxKind.Node0; + propNode0: number; +} +export interface Node1 { + kind: SyntaxKind.Node1; + propNode1: number; +} +export interface Node2 { + kind: SyntaxKind.Node2; + propNode2: number; +} +export interface Node3 { + kind: SyntaxKind.Node3; + propNode3: number; +} +export interface Node4 { + kind: SyntaxKind.Node4; + propNode4: number; +} +export interface Node5 { + kind: SyntaxKind.Node5; + propNode5: number; +} +export interface Node6 { + kind: SyntaxKind.Node6; + propNode6: number; +} +export interface Node7 { + kind: SyntaxKind.Node7; + propNode7: number; +} +export interface Node8 { + kind: SyntaxKind.Node8; + propNode8: number; +} +export interface Node9 { + kind: SyntaxKind.Node9; + propNode9: number; +} +export interface Node10 { + kind: SyntaxKind.Node10; + propNode10: number; +} +export interface Node11 { + kind: SyntaxKind.Node11; + propNode11: number; +} +export interface Node12 { + kind: SyntaxKind.Node12; + propNode12: number; +} +export interface Node13 { + kind: SyntaxKind.Node13; + propNode13: number; +} +export interface Node14 { + kind: SyntaxKind.Node14; + propNode14: number; +} +export interface Node15 { + kind: SyntaxKind.Node15; + propNode15: number; +} +export interface Node16 { + kind: SyntaxKind.Node16; + propNode16: number; +} +export interface Node17 { + kind: SyntaxKind.Node17; + propNode17: number; +} +export interface Node18 { + kind: SyntaxKind.Node18; + propNode18: number; +} +export interface Node19 { + kind: SyntaxKind.Node19; + propNode19: number; +} +export interface Node20 { + kind: SyntaxKind.Node20; + propNode20: number; +} +export interface Node21 { + kind: SyntaxKind.Node21; + propNode21: number; +} +export interface Node22 { + kind: SyntaxKind.Node22; + propNode22: number; +} +export interface Node23 { + kind: SyntaxKind.Node23; + propNode23: number; +} +export interface Node24 { + kind: SyntaxKind.Node24; + propNode24: number; +} +export interface Node25 { + kind: SyntaxKind.Node25; + propNode25: number; +} +export interface Node26 { + kind: SyntaxKind.Node26; + propNode26: number; +} +export interface Node27 { + kind: SyntaxKind.Node27; + propNode27: number; +} +export interface Node28 { + kind: SyntaxKind.Node28; + propNode28: number; +} +export interface Node29 { + kind: SyntaxKind.Node29; + propNode29: number; +} +export interface Node30 { + kind: SyntaxKind.Node30; + propNode30: number; +} +export interface Node31 { + kind: SyntaxKind.Node31; + propNode31: number; +} +export interface Node32 { + kind: SyntaxKind.Node32; + propNode32: number; +} +export interface Node33 { + kind: SyntaxKind.Node33; + propNode33: number; +} +export interface Node34 { + kind: SyntaxKind.Node34; + propNode34: number; +} +export interface Node35 { + kind: SyntaxKind.Node35; + propNode35: number; +} +export interface Node36 { + kind: SyntaxKind.Node36; + propNode36: number; +} +export interface Node37 { + kind: SyntaxKind.Node37; + propNode37: number; +} +export interface Node38 { + kind: SyntaxKind.Node38; + propNode38: number; +} +export interface Node39 { + kind: SyntaxKind.Node39; + propNode39: number; +} +export interface Node40 { + kind: SyntaxKind.Node40; + propNode40: number; +} +export interface Node41 { + kind: SyntaxKind.Node41; + propNode41: number; +} +export interface Node42 { + kind: SyntaxKind.Node42; + propNode42: number; +} +export interface Node43 { + kind: SyntaxKind.Node43; + propNode43: number; +} +export interface Node44 { + kind: SyntaxKind.Node44; + propNode44: number; +} +export interface Node45 { + kind: SyntaxKind.Node45; + propNode45: number; +} +export interface Node46 { + kind: SyntaxKind.Node46; + propNode46: number; +} +export interface Node47 { + kind: SyntaxKind.Node47; + propNode47: number; +} +export interface Node48 { + kind: SyntaxKind.Node48; + propNode48: number; +} +export interface Node49 { + kind: SyntaxKind.Node49; + propNode49: number; +} +export interface Node50 { + kind: SyntaxKind.Node50; + propNode50: number; +} +export interface Node51 { + kind: SyntaxKind.Node51; + propNode51: number; +} +export interface Node52 { + kind: SyntaxKind.Node52; + propNode52: number; +} +export interface Node53 { + kind: SyntaxKind.Node53; + propNode53: number; +} +export interface Node54 { + kind: SyntaxKind.Node54; + propNode54: number; +} +export interface Node55 { + kind: SyntaxKind.Node55; + propNode55: number; +} +export interface Node56 { + kind: SyntaxKind.Node56; + propNode56: number; +} +export interface Node57 { + kind: SyntaxKind.Node57; + propNode57: number; +} +export interface Node58 { + kind: SyntaxKind.Node58; + propNode58: number; +} +export interface Node59 { + kind: SyntaxKind.Node59; + propNode59: number; +} +export interface Node60 { + kind: SyntaxKind.Node60; + propNode60: number; +} +export interface Node61 { + kind: SyntaxKind.Node61; + propNode61: number; +} +export interface Node62 { + kind: SyntaxKind.Node62; + propNode62: number; +} +export interface Node63 { + kind: SyntaxKind.Node63; + propNode63: number; +} +export interface Node64 { + kind: SyntaxKind.Node64; + propNode64: number; +} +export interface Node65 { + kind: SyntaxKind.Node65; + propNode65: number; +} +export interface Node66 { + kind: SyntaxKind.Node66; + propNode66: number; +} +export interface Node67 { + kind: SyntaxKind.Node67; + propNode67: number; +} +export interface Node68 { + kind: SyntaxKind.Node68; + propNode68: number; +} +export interface Node69 { + kind: SyntaxKind.Node69; + propNode69: number; +} +export interface Node70 { + kind: SyntaxKind.Node70; + propNode70: number; +} +export interface Node71 { + kind: SyntaxKind.Node71; + propNode71: number; +} +export interface Node72 { + kind: SyntaxKind.Node72; + propNode72: number; +} +export interface Node73 { + kind: SyntaxKind.Node73; + propNode73: number; +} +export interface Node74 { + kind: SyntaxKind.Node74; + propNode74: number; +} +export interface Node75 { + kind: SyntaxKind.Node75; + propNode75: number; +} +export interface Node76 { + kind: SyntaxKind.Node76; + propNode76: number; +} +export interface Node77 { + kind: SyntaxKind.Node77; + propNode77: number; +} +export interface Node78 { + kind: SyntaxKind.Node78; + propNode78: number; +} +export interface Node79 { + kind: SyntaxKind.Node79; + propNode79: number; +} +export interface Node80 { + kind: SyntaxKind.Node80; + propNode80: number; +} +export interface Node81 { + kind: SyntaxKind.Node81; + propNode81: number; +} +export interface Node82 { + kind: SyntaxKind.Node82; + propNode82: number; +} +export interface Node83 { + kind: SyntaxKind.Node83; + propNode83: number; +} +export interface Node84 { + kind: SyntaxKind.Node84; + propNode84: number; +} +export interface Node85 { + kind: SyntaxKind.Node85; + propNode85: number; +} +export interface Node86 { + kind: SyntaxKind.Node86; + propNode86: number; +} +export interface Node87 { + kind: SyntaxKind.Node87; + propNode87: number; +} +export interface Node88 { + kind: SyntaxKind.Node88; + propNode88: number; +} +export interface Node89 { + kind: SyntaxKind.Node89; + propNode89: number; +} +export interface Node90 { + kind: SyntaxKind.Node90; + propNode90: number; +} +export interface Node91 { + kind: SyntaxKind.Node91; + propNode91: number; +} +export interface Node92 { + kind: SyntaxKind.Node92; + propNode92: number; +} +export interface Node93 { + kind: SyntaxKind.Node93; + propNode93: number; +} +export interface Node94 { + kind: SyntaxKind.Node94; + propNode94: number; +} +export interface Node95 { + kind: SyntaxKind.Node95; + propNode95: number; +} +export interface Node96 { + kind: SyntaxKind.Node96; + propNode96: number; +} +export interface Node97 { + kind: SyntaxKind.Node97; + propNode97: number; +} +export interface Node98 { + kind: SyntaxKind.Node98; + propNode98: number; +} +export interface Node99 { + kind: SyntaxKind.Node99; + propNode99: number; +} +export type Node = Node0 | Node1 | Node2 | Node3 | Node4 | Node5 | Node6 | Node7 | Node8 | Node9 | Node10 | Node11 | Node12 | Node13 | Node14 | Node15 | Node16 | Node17 | Node18 | Node19 | Node20 | Node21 | Node22 | Node23 | Node24 | Node25 | Node26 | Node27 | Node28 | Node29 | Node30 | Node31 | Node32 | Node33 | Node34 | Node35 | Node36 | Node37 | Node38 | Node39 | Node40 | Node41 | Node42 | Node43 | Node44 | Node45 | Node46 | Node47 | Node48 | Node49 | Node50 | Node51 | Node52 | Node53 | Node54 | Node55 | Node56 | Node57 | Node58 | Node59 | Node60 | Node61 | Node62 | Node63 | Node64 | Node65 | Node66 | Node67 | Node68 | Node69 | Node70 | Node71 | Node72 | Node73 | Node74 | Node75 | Node76 | Node77 | Node78 | Node79 | Node80 | Node81 | Node82 | Node83 | Node84 | Node85 | Node86 | Node87 | Node88 | Node89 | Node90 | Node91 | Node92 | Node93 | Node94 | Node95 | Node96 | Node97 | Node98 | Node99; +//# sourceMappingURL=ast.d.ts.map +//// [index.d.ts] +import * as ast from "./ast"; +export declare const isNodeOfType: (nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [ast.d.ts.map] +{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["ast.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAAG,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,KAAK,IAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IA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kZTI3ID0gMjcsDQogICAgTm9kZTI4ID0gMjgsDQogICAgTm9kZTI5ID0gMjksDQogICAgTm9kZTMwID0gMzAsDQogICAgTm9kZTMxID0gMzEsDQogICAgTm9kZTMyID0gMzIsDQogICAgTm9kZTMzID0gMzMsDQogICAgTm9kZTM0ID0gMzQsDQogICAgTm9kZTM1ID0gMzUsDQogICAgTm9kZTM2ID0gMzYsDQogICAgTm9kZTM3ID0gMzcsDQogICAgTm9kZTM4ID0gMzgsDQogICAgTm9kZTM5ID0gMzksDQogICAgTm9kZTQwID0gNDAsDQogICAgTm9kZTQxID0gNDEsDQogICAgTm9kZTQyID0gNDIsDQogICAgTm9kZTQzID0gNDMsDQogICAgTm9kZTQ0ID0gNDQsDQogICAgTm9kZTQ1ID0gNDUsDQogICAgTm9kZTQ2ID0gNDYsDQogICAgTm9kZTQ3ID0gNDcsDQogICAgTm9kZTQ4ID0gNDgsDQogICAgTm9kZTQ5ID0gNDksDQogICAgTm9kZTUwID0gNTAsDQogICAgTm9kZTUxID0gNTEsDQogICAgTm9kZTUyID0gNTIsDQogICAgTm9kZTUzID0gNTMsDQogICAgTm9kZTU0ID0gNTQsDQogICAgTm9kZTU1ID0gNTUsDQogICAgTm9kZTU2ID0gNTYsDQogICAgTm9kZTU3ID0gNTcsDQogICAgTm9kZTU4ID0gNTgsDQogICAgTm9kZTU5ID0gNTksDQogICAgTm9kZTYwID0gNjAsDQogICAgTm9kZTYxID0gNjEsDQogICAgTm9kZTYyID0gNjIsDQogICAgTm9kZTYzID0gNjMsDQogICAgTm9kZTY0ID0gNjQsDQogICAgTm9kZTY1ID0gNjUsDQogICAgTm9kZTY2ID0gNjYsDQogICAgTm9kZTY3ID0gNjcsDQogICAgTm9kZTY4ID0gNjgsDQogICAgTm9kZTY5ID0gNjksDQogICAgTm9kZTcwID0gNzAsDQogICAgTm9kZTcxID0gNzEsDQogICAgTm9kZTcyID0gNzIsDQogICAgTm9kZTczID0gNzMsDQogICAgTm9kZTc0ID0gN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XMgRXh0cmFjdDxhc3QuTm9kZSwgeyBraW5kOiBOb2RlVHlwZSB9PiA9PgogICAgbm9kZT8ua2luZCA9PT0gbm9kZVR5cGU7Cgo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts new file mode 100644 index 0000000000000..dbb3b7a9e7ab9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -0,0 +1,318 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts] //// + +//// [typeFromPropertyAssignment29.ts] +function ExpandoDecl(n: number): string { + return n.toString(); +} +ExpandoDecl.prop = 2 +ExpandoDecl.m = function(n: number) { + return n + 1; +} +var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length + +const ExpandoExpr: { + (n: number): string; + prop: { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; + m(n: number): number; +} = function (n: number): string { + return n.toString(); +} +ExpandoExpr.prop = { x: 2 } +ExpandoExpr.prop = { y: "" } +ExpandoExpr.m = function(n: number) { + return n + 1; +} +var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + +const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; +} = (n: number): string => n.toString(); +ExpandoArrow.prop = 2 +ExpandoArrow.m = function(n: number) { + return n + 1; + +} + +function ExpandoNested(n: number): { + (m: number): number; + total: number; +} { + const nested = function (m: number) { + return n + m; + }; + nested.total = n + 1_000_000; + return nested; +} +ExpandoNested.also = -1; + +function ExpandoMerge(n: number): number { + return n * 100; +} +ExpandoMerge.p1 = 111 +namespace ExpandoMerge { + export var p2 = 222; +} +namespace ExpandoMerge { + export var p3 = 333; +} +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + +namespace Ns { + function ExpandoNamespace(): void {} + ExpandoNamespace.p6 = 42; + export function foo(): typeof ExpandoNamespace { + return ExpandoNamespace; + } +} + +// Should not work in Typescript -- must be const +var ExpandoExpr2 = function (n: number): string { + return n.toString(); +} +ExpandoExpr2.prop = 2 +ExpandoExpr2.m = function(n: number) { + return n + 1; +} +var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length + +// Should not work in typescript -- classes already have statics +class ExpandoClass { + n = 1001; +} +ExpandoClass.prop = 2 +ExpandoClass.m = function(n: number) { + return n + 1; +} +var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n + +// Class expressions shouldn't work in typescript either +var ExpandoExpr3 = class { + n = 10001; +} +ExpandoExpr3.prop = 3 +ExpandoExpr3.m = function(n: number) { + return n + 1; +} +var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n + + + +/// [Declarations] //// + + + +//// [typeFromPropertyAssignment29.d.ts] +declare function ExpandoDecl(n: number): string; +declare namespace ExpandoDecl { + var prop: number; + var m: (n: number) => number; +} +declare var n: number; +declare const ExpandoExpr: { + (n: number): string; + prop: { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; + m(n: number): number; +}; +declare var n: number; +declare const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; +}; +declare function ExpandoNested(n: number): { + (m: number): number; + total: number; +}; +declare namespace ExpandoNested { + var also: number; +} +declare function ExpandoMerge(n: number): number; +declare namespace ExpandoMerge { + var p1: number; +} +declare namespace ExpandoMerge { + var p2: number; +} +declare namespace ExpandoMerge { + var p3: number; +} +declare var n: number; +declare namespace Ns { + function ExpandoNamespace(): void; + namespace ExpandoNamespace { + var p6: number; + } + export function foo(): typeof ExpandoNamespace; + export {}; +} +declare var ExpandoExpr2: (n: number) => string; +declare var n: number; +declare class ExpandoClass { + n: number; +} +declare var n: number; +declare var ExpandoExpr3: { + new (): { + n: number; + }; +}; +declare var n: number; +//# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map +/// [Errors] //// + +typeFromPropertyAssignment29.ts(77,14): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(78,14): error TS2339: Property 'm' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,22): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,42): error TS2339: Property 'm' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(87,14): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(88,14): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,22): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,42): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(97,14): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(98,14): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,22): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + + +==== typeFromPropertyAssignment29.ts (12 errors) ==== + function ExpandoDecl(n: number): string { + return n.toString(); + } + ExpandoDecl.prop = 2 + ExpandoDecl.m = function(n: number) { + return n + 1; + } + var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length + + const ExpandoExpr: { + (n: number): string; + prop: { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; + m(n: number): number; + } = function (n: number): string { + return n.toString(); + } + ExpandoExpr.prop = { x: 2 } + ExpandoExpr.prop = { y: "" } + ExpandoExpr.m = function(n: number) { + return n + 1; + } + var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + + const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; + } = (n: number): string => n.toString(); + ExpandoArrow.prop = 2 + ExpandoArrow.m = function(n: number) { + return n + 1; + + } + + function ExpandoNested(n: number): { + (m: number): number; + total: number; + } { + const nested = function (m: number) { + return n + m; + }; + nested.total = n + 1_000_000; + return nested; + } + ExpandoNested.also = -1; + + function ExpandoMerge(n: number): number { + return n * 100; + } + ExpandoMerge.p1 = 111 + namespace ExpandoMerge { + export var p2 = 222; + } + namespace ExpandoMerge { + export var p3 = 333; + } + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + + namespace Ns { + function ExpandoNamespace(): void {} + ExpandoNamespace.p6 = 42; + export function foo(): typeof ExpandoNamespace { + return ExpandoNamespace; + } + } + + // Should not work in Typescript -- must be const + var ExpandoExpr2 = function (n: number): string { + return n.toString(); + } + ExpandoExpr2.prop = 2 + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type '(n: number) => string'. + ExpandoExpr2.m = function(n: number) { + ~ +!!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. + return n + 1; + } + var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type '(n: number) => string'. + ~ +!!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. + + // Should not work in typescript -- classes already have statics + class ExpandoClass { + n = 1001; + } + ExpandoClass.prop = 2 + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. + ExpandoClass.m = function(n: number) { + ~ +!!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. + return n + 1; + } + var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. + ~ +!!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. + + // Class expressions shouldn't work in typescript either + var ExpandoExpr3 = class { + n = 10001; + } + ExpandoExpr3.prop = 3 + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. + ExpandoExpr3.m = function(n: number) { + ~ +!!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + return n + 1; + } + var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n + ~~~~ +!!! error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. + ~ +!!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeGuardFunctionOfFormThis.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeGuardFunctionOfFormThis.d.ts.map new file mode 100644 index 0000000000000..f45cfd2fc3e32 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeGuardFunctionOfFormThis.d.ts.map @@ -0,0 +1,218 @@ +//// [tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts] //// + +//// [typeGuardFunctionOfFormThis.ts] +class RoyalGuard { + isLeader(): this is LeadGuard { + return this instanceof LeadGuard; + } + isFollower(): this is FollowerGuard { + return this instanceof FollowerGuard; + } +} + +class LeadGuard extends RoyalGuard { + lead(): void {}; +} + +class FollowerGuard extends RoyalGuard { + follow(): void {}; +} + +let a: RoyalGuard = new FollowerGuard(); +if (a.isLeader()) { + a.lead(); +} +else if (a.isFollower()) { + a.follow(); +} + +interface GuardInterface extends RoyalGuard {} + +let b: GuardInterface; +if (b.isLeader()) { + b.lead(); +} +else if (b.isFollower()) { + b.follow(); +} + +// if (((a.isLeader)())) { +// a.lead(); +// } +// else if (((a).isFollower())) { +// a.follow(); +// } + +// if (((a["isLeader"])())) { +// a.lead(); +// } +// else if (((a)["isFollower"]())) { +// a.follow(); +// } + +var holder2: { + a: RoyalGuard; +} = {a}; + +if (holder2.a.isLeader()) { + holder2.a; +} +else { + holder2.a; +} + +class ArrowGuard { + isElite = (): this is ArrowElite => { + return this instanceof ArrowElite; + } + isMedic = (): this is ArrowMedic => { + return this instanceof ArrowMedic; + } +} + +class ArrowElite extends ArrowGuard { + defend(): void {} +} + +class ArrowMedic extends ArrowGuard { + heal(): void {} +} + +let guard: ArrowGuard = new ArrowGuard(); +if (guard.isElite()) { + guard.defend(); +} +else if (guard.isMedic()) { + guard.heal(); +} + +interface Supplies { + spoiled: boolean; +} + +interface Sundries { + broken: boolean; +} + +interface Crate { + contents: T; + volume: number; + isSupplies(): this is Crate; + isSundries(): this is Crate; +} + +let crate: Crate<{}>; + +if (crate.isSundries()) { + crate.contents.broken = true; +} +else if (crate.isSupplies()) { + crate.contents.spoiled = true; +} + +// Matching guards should be assignable + +a.isFollower = b.isFollower; +a.isLeader = b.isLeader; + +class MimicGuard { + isLeader(): this is MimicLeader { return this instanceof MimicLeader; }; + isFollower(): this is MimicFollower { return this instanceof MimicFollower; }; +} + +class MimicLeader extends MimicGuard { + lead(): void {} +} + +class MimicFollower extends MimicGuard { + follow(): void {} +} + +let mimic: MimicGuard = new MimicGuard(); + +a.isLeader = mimic.isLeader; +a.isFollower = mimic.isFollower; + +if (mimic.isFollower()) { + mimic.follow(); + mimic.isFollower = a.isFollower; +} + + +interface MimicGuardInterface { + isLeader(): this is LeadGuard; + isFollower(): this is FollowerGuard; +} + + +/// [Declarations] //// + + + +//// [typeGuardFunctionOfFormThis.d.ts] +declare class RoyalGuard { + isLeader(): this is LeadGuard; + isFollower(): this is FollowerGuard; +} +declare class LeadGuard extends RoyalGuard { + lead(): void; +} +declare class FollowerGuard extends RoyalGuard { + follow(): void; +} +declare let a: RoyalGuard; +interface GuardInterface extends RoyalGuard { +} +declare let b: GuardInterface; +declare var holder2: { + a: RoyalGuard; +}; +declare class ArrowGuard { + isElite: () => this is ArrowElite; + isMedic: () => this is ArrowMedic; +} +declare class ArrowElite extends ArrowGuard { + defend(): void; +} +declare class ArrowMedic extends ArrowGuard { + heal(): void; +} +declare let guard: ArrowGuard; +interface Supplies { + spoiled: boolean; +} +interface Sundries { + broken: boolean; +} +interface Crate { + contents: T; + volume: number; + isSupplies(): this is Crate; + isSundries(): this is Crate; +} +declare let crate: Crate<{}>; +declare class MimicGuard { + isLeader(): this is MimicLeader; + isFollower(): this is MimicFollower; +} +declare class MimicLeader extends MimicGuard { + lead(): void; +} +declare class MimicFollower extends MimicGuard { + follow(): void; +} +declare let mimic: MimicGuard; +interface MimicGuardInterface { + isLeader(): this is LeadGuard; + isFollower(): this is FollowerGuard; +} +//# sourceMappingURL=typeGuardFunctionOfFormThis.d.ts.map + +/// [Declarations Maps] //// + + +//// [typeGuardFunctionOfFormThis.d.ts.map] +{"version":3,"file":"typeGuardFunctionOfFormThis.d.ts","sourceRoot":"","sources":["typeGuardFunctionOfFormThis.ts"],"names":[],"mappings":"AAAA,cAAM,UAAU;IACZ,QAAQ,IAAI,IAAI,IAAI,SAAS;IAG7B,UAAU,IAAI,IAAI,IAAI,aAAa;CAGtC;AAED,cAAM,SAAU,SAAQ,UAAU;IAC9B,IAAI,IAAI,IAAI;CACf;AAED,cAAM,aAAc,SAAQ,UAAU;IAClC,MAAM,IAAI,IAAI;CACjB;AAED,QAAA,IAAI,CAAC,EAAE,UAAgC,CAAC;AAQxC,UAAU,cAAe,SAAQ,UAAU;CAAG;AAE9C,QAAA,IAAI,CAAC,EAAE,cAAc,CAAC;AAsBtB,QAAA,IAAI,OAAO,EAAE;IACT,CAAC,EAAE,UAAU,CAAC;CACX,CAAC;AASR,cAAM,UAAU;IACZ,OAAO,2BAEN;IACD,OAAO,2BAEN;CACJ;AAED,cAAM,UAAW,SAAQ,UAAU;IAC/B,MAAM,IAAI,IAAI;CACjB;AAED,cAAM,UAAW,SAAQ,UAAU;IAC/B,IAAI,IAAI,IAAI;CACf;AAED,QAAA,IAAI,KAAK,EAAE,UAA6B,CAAC;AAQzC,UAAU,QAAQ;IACd,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,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xsb3dlciA9IGEuaXNGb2xsb3dlcjsKfQoKCmludGVyZmFjZSBNaW1pY0d1YXJkSW50ZXJmYWNlIHsKICAgIGlzTGVhZGVyKCk6IHRoaXMgaXMgTGVhZEd1YXJkOwogICAgaXNGb2xsb3dlcigpOiB0aGlzIGlzIEZvbGxvd2VyR3VhcmQ7Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeofImportTypeOnlyExport.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeofImportTypeOnlyExport.d.ts.map new file mode 100644 index 0000000000000..63632978e9a45 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeofImportTypeOnlyExport.d.ts.map @@ -0,0 +1,62 @@ +//// [tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts] //// + +//// [button.ts] +import {ClassMapDirective, classMap} from './lit.js'; +export const c: { + directive: ClassMapDirective; +} = classMap(); + +//// [lit.ts] +class ClassMapDirective {} + +export type {ClassMapDirective}; + +export const directive = + (class_: C): () => { + directive: C; + } => + () => ({ + directive: class_, + }); + +export const classMap: () => { + directive: typeof ClassMapDirective; +} = directive(ClassMapDirective); + + +/// [Declarations] //// + + + +//// [button.d.ts] +import { ClassMapDirective } from './lit.js'; +export declare const c: { + directive: ClassMapDirective; +}; +//# sourceMappingURL=button.d.ts.map +//// [/.src/lit.d.ts] +declare class ClassMapDirective { +} +export type { ClassMapDirective }; +export declare const directive: (class_: C) => () => { + directive: C; +}; +export declare const classMap: () => { + directive: typeof ClassMapDirective; +}; +//# sourceMappingURL=lit.d.ts.map + +/// [Declarations Maps] //// + + +//// [button.d.ts.map] +{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAW,MAAM,UAAU,CAAC;AACrD,eAAO,MAAM,CAAC,EAAE;IACZ,SAAS,EAAE,iBAAiB,CAAC;CACnB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgQ2xhc3NNYXBEaXJlY3RpdmUgfSBmcm9tICcuL2xpdC5qcyc7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBjOiB7DQogICAgZGlyZWN0aXZlOiBDbGFzc01hcERpcmVjdGl2ZTsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1idXR0b24uZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJidXR0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGlCQUFpQixFQUFXLE1BQU0sVUFBVSxDQUFDO0FBQ3JELGVBQU8sTUFBTSxDQUFDLEVBQUU7SUFDWixTQUFTLEVBQUUsaUJBQWlCLENBQUM7Q0FDbkIsQ0FBQyJ9,aW1wb3J0IHtDbGFzc01hcERpcmVjdGl2ZSwgY2xhc3NNYXB9IGZyb20gJy4vbGl0LmpzJzsKZXhwb3J0IGNvbnN0IGM6IHsKICAgIGRpcmVjdGl2ZTogQ2xhc3NNYXBEaXJlY3RpdmU7Cn0gPSBjbGFzc01hcCgpOwo= + + +//// [/.src/lit.d.ts.map] +{"version":3,"file":"lit.d.ts","sourceRoot":"","sources":["lit.ts"],"names":[],"mappings":"AAAA,cAAM,iBAAiB;CAAG;AAE1B,YAAY,EAAC,iBAAiB,EAAC,CAAC;AAEhC,eAAO,MAAM,SAAS,cACR,CAAC,KAAG,MAAM;IAClB,WAAW,CAAC,CAAC;CAIf,CAAC;AAEL,eAAO,MAAM,QAAQ,EAAE,MAAM;IACzB,SAAS,EAAE,OAAO,iBAAiB,CAAC;CACR,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBDbGFzc01hcERpcmVjdGl2ZSB7DQp9DQpleHBvcnQgdHlwZSB7IENsYXNzTWFwRGlyZWN0aXZlIH07DQpleHBvcnQgZG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/typesVersionsDeclarationEmit.multiFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts new file mode 100644 index 0000000000000..aef2953dcc16b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts] //// + +//// [main.ts] +import { fa } from "ext"; +import { fb } from "ext/other"; + +export const va = fa(); +export const vb = fb(); + +//// [package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } +} + +//// [index.d.ts] +export interface A {} +export function fa(): A; + +//// [other.d.ts] +export interface B {} +export function fb(): B; + +//// [index.d.ts] +export interface A {} +export function fa(): A; + +//// [other.d.ts] +export interface B {} +export function fb(): B; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: import("ext").A; +export declare const vb: import("ext/other").B; +//# sourceMappingURL=main.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts new file mode 100644 index 0000000000000..75333b6da974c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts @@ -0,0 +1,80 @@ +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts] //// + +//// [main.ts] +import { fa } from "ext"; +import { fb } from "ext/other"; + +export const va: any = fa(); +export const vb = fb(); + +//// [package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } +} + +//// [index.d.ts] +export interface A {} +export function fa(): A; + +//// [other.d.ts] +export interface B {} +export function fb(): B; + +//// [index.d.ts] +export * from "../"; + +//// [other.d.ts] +export * from "../other"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: any; +export declare const vb: import("ext/other").B; +//# sourceMappingURL=main.d.ts.map +/// [Errors] //// + +main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. + + +==== main.ts (1 errors) ==== + import { fa } from "ext"; + ~~ +!!! error TS2305: Module '"ext"' has no exported member 'fa'. + import { fb } from "ext/other"; + + export const va: any = fa(); + export const vb = fb(); + +==== node_modules/ext/package.json (0 errors) ==== + { + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } + } + +==== node_modules/ext/index.d.ts (0 errors) ==== + export interface A {} + export function fa(): A; + +==== node_modules/ext/other.d.ts (0 errors) ==== + export interface B {} + export function fb(): B; + +==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== + export * from "../"; + +==== node_modules/ext/ts3.1/other.d.ts (0 errors) ==== + export * from "../other"; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts new file mode 100644 index 0000000000000..b62632d4c47bf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts] //// + +//// [main.ts] +import { fa } from "ext"; +import { fa as fa2 } from "ext/other"; + +export const va = fa(); +export const va2 = fa2(); + +//// [package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { + "index" : ["ts3.1/index"] + } + } +} + +//// [index.d.ts] +export interface A {} +export function fa(): A; + +//// [other.d.ts] +export interface A2 {} +export function fa(): A2; + +//// [index.d.ts] +export * from "../other"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: import("ext").A2; +export declare const va2: import("ext").A2; +//# sourceMappingURL=main.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts new file mode 100644 index 0000000000000..0f0cdb44e8f7a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts @@ -0,0 +1,117 @@ +//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// + +//// [uniqueSymbolsDeclarationsErrors.ts] +declare const s: unique symbol; +interface I { readonly readonlyType: unique symbol; } + +// not allowed when emitting declarations + +export const obj = { + method1(p: typeof s): typeof s { + return p; + }, + method2(p: I["readonlyType"]): I["readonlyType"] { + return p; + } +}; + +export const classExpression = class { + method1(p: typeof s): typeof s { + return p; + } + method2(p: I["readonlyType"]): I["readonlyType"] { + return p; + } +}; + +export function funcInferredReturnType(obj: { method(p: typeof s): void }): { + method(p: typeof s): void; +} { + return obj; +} + +export interface InterfaceWithPrivateNamedProperties { + [s]: any; +} + +export interface InterfaceWithPrivateNamedMethods { + [s](): any; +} + +export type TypeLiteralWithPrivateNamedProperties = { + [s]: any; +} + +export type TypeLiteralWithPrivateNamedMethods = { + [s](): any; +} + +export class ClassWithPrivateNamedProperties { + [s]: any; + static [s]: any; +} + +export class ClassWithPrivateNamedMethods { + [s](): void {} + static [s](): void {} +} + +export class ClassWithPrivateNamedAccessors { + get [s](): any { return undefined; } + set [s](v: any) { } + static get [s](): any { return undefined; } + static set [s](v: any) { } +} + +/// [Declarations] //// + + + +//// [uniqueSymbolsDeclarationsErrors.d.ts] +declare const s: unique symbol; +interface I { + readonly readonlyType: unique symbol; +} +export declare const obj: { + method1(p: typeof s): typeof s; + method2(p: I["readonlyType"]): I["readonlyType"]; +}; +export declare const classExpression: { + new (): { + method1(p: typeof s): typeof s; + method2(p: I["readonlyType"]): I["readonlyType"]; + }; +}; +export declare function funcInferredReturnType(obj: { + method(p: typeof s): void; +}): { + method(p: typeof s): void; +}; +export interface InterfaceWithPrivateNamedProperties { + [s]: any; +} +export interface InterfaceWithPrivateNamedMethods { + [s](): any; +} +export type TypeLiteralWithPrivateNamedProperties = { + [s]: any; +}; +export type TypeLiteralWithPrivateNamedMethods = { + [s](): any; +}; +export declare class ClassWithPrivateNamedProperties { + [s]: any; + static [s]: any; +} +export declare class ClassWithPrivateNamedMethods { + [s](): void; + static [s](): void; +} +export declare class ClassWithPrivateNamedAccessors { + get [s](): any; + set [s](v: any); + static get [s](): any; + static set [s](v: any); +} +export {}; +//# sourceMappingURL=uniqueSymbolsDeclarationsErrors.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/variadicTuples1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/variadicTuples1.d.ts.map new file mode 100644 index 0000000000000..63d30b13caf41 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/variadicTuples1.d.ts.map @@ -0,0 +1,645 @@ +//// [tests/cases/conformance/types/tuple/variadicTuples1.ts] //// + +//// [variadicTuples1.ts] +// Variadics in tuple types + +type TV0 = [string, ...T]; +type TV1 = [string, ...T, number]; +type TV2 = [string, ...T, number, ...T]; +type TV3 = [string, ...T, ...number[], ...T]; + +// Normalization + +type TN1 = TV1<[boolean, string]>; +type TN2 = TV1<[]>; +type TN3 = TV1<[boolean?]>; +type TN4 = TV1; +type TN5 = TV1<[boolean] | [symbol, symbol]>; +type TN6 = TV1; +type TN7 = TV1; + +// Variadics in array literals + +function tup2(t: [...T], u: [...U]): readonly [1, ...T, 2, ...U, 3] { + return [1, ...t, 2, ...u, 3] as const; +} + +const t2: readonly [1, string, 2, number, boolean, 3] = tup2(['hello'], [10, true]); + +function concat(t: [...T], u: [...U]): [...T, ...U] { + return [...t, ...u]; +} + +declare const sa: string[]; + +const tc1: [] = concat([], []); +const tc2: [ + string, + number +] = concat(['hello'], [42]); +const tc3: [ + number, + number, + number, + ...string[] +] = concat([1, 2, 3], sa); +const tc4: [ + ...string[], + number, + number, + number +] = concat(sa, [1, 2, 3]); // Ideally would be [...string[], number, number, number] + +function concat2(t: T, u: U): (T[number] | U[number])[] { + return [...t, ...u]; // (T[number] | U[number])[] +} + +const tc5: (2 | 4 | 1 | 3 | 6 | 5)[] = concat2([1, 2, 3] as const, [4, 5, 6] as const); // (1 | 2 | 3 | 4 | 5 | 6)[] + +// Spread arguments + +declare function foo1(a: number, b: string, c: boolean, ...d: number[]): void; + +function foo2(t1: [number, string], t2: [boolean], a1: number[]): void { + foo1(1, 'abc', true, 42, 43, 44); + foo1(...t1, true, 42, 43, 44); + foo1(...t1, ...t2, 42, 43, 44); + foo1(...t1, ...t2, ...a1); + foo1(...t1); // Error + foo1(...t1, 45); // Error +} + +declare function foo3(x: number, ...args: [...T, number]): T; + +function foo4(u: U): void { + foo3(1, 2); + foo3(1, 'hello', true, 2); + foo3(1, ...u, 'hi', 2); + foo3(1); +} + +// Contextual typing of array literals + +declare function ft1(t: T): T; +declare function ft2(t: T): readonly [...T]; +declare function ft3(t: [...T]): T; +declare function ft4(t: [...T]): readonly [...T]; + +ft1(['hello', 42]); // (string | number)[] +ft2(['hello', 42]); // readonly (string | number)[] +ft3(['hello', 42]); // [string, number] +ft4(['hello', 42]); // readonly [string, number] + +// Indexing variadic tuple types + +function f0(t: [string, ...T], n: number): void { + const a = t[0]; // string + const b = t[1]; // [string, ...T][1] + const c = t[2]; // [string, ...T][2] + const d = t[n]; // [string, ...T][number] +} + +function f1(t: [string, ...T, number], n: number): void { + const a = t[0]; // string + const b = t[1]; // number | T[number] + const c = t[2]; // [string, ...T, number][2] + const d = t[n]; // [string, ...T, number][number] +} + +// Destructuring variadic tuple types + +function f2(t: [string, ...T]): void { + let [...ax] = t; // [string, ...T] + let [b1, ...bx] = t; // string, [...T] + let [c1, c2, ...cx] = t; // string, [string, ...T][1], T[number][] +} + +function f3(t: [string, ...T, number]): void { + let [...ax] = t; // [string, ...T, number] + let [b1, ...bx] = t; // string, [...T, number] + let [c1, c2, ...cx] = t; // string, number | T[number], (number | T[number])[] +} + +// Mapped types applied to variadic tuple types + +type Arrayify = { [P in keyof T]: T[P][] }; + +type TM1 = Arrayify; // [string[], (number | undefined)[]?, Arrayify, ...boolean[][]] + +type TP1 = Partial<[string, ...T, number]>; // [string?, Partial, number?] +type TP2 = Partial<[string, ...T, ...number[]]>; // [string?, Partial, ...(number | undefined)[]] + +// Reverse mapping through mapped type applied to variadic tuple type + +declare function fm1(t: Arrayify<[string, number, ...T]>): T; + +let tm1: [ + boolean, + string +] = fm1([['abc'], [42], [true], ['def']]); // [boolean, string] + +// Spread of readonly array-like infers mutable array-like + +declare function fx1(a: string, ...args: T): T; + +function gx1(u: U, v: V): void { + fx1('abc'); // [] + fx1('abc', ...u); // U + fx1('abc', ...v); // [...V] + fx1('abc', ...u); // U + fx1('abc', ...v); // Error +} + +declare function fx2(a: string, ...args: T): T; + +function gx2(u: U, v: V): void { + fx2('abc'); // [] + fx2('abc', ...u); // U + fx2('abc', ...v); // [...V] + fx2('abc', ...u); // U + fx2('abc', ...v); // V +} + +// Relations involving variadic tuple types + +function f10(x: [string, ...unknown[]], y: [string, ...T], z: [string, ...U]): void { + x = y; + x = z; + y = x; // Error + y = z; + z = x; // Error + z = y; // Error +} + +// For a generic type T, [...T] is assignable to T, T is assignable to readonly [...T], and T is assignable +// to [...T] when T is constrained to a mutable array or tuple type. + +function f11(t: T, m: [...T], r: readonly [...T]): void { + t = m; + t = r; // Error + m = t; + m = r; // Error + r = t; + r = m; +} + +function f12(t: T, m: [...T], r: readonly [...T]): void { + t = m; + t = r; // Error + m = t; // Error + m = r; // Error + r = t; + r = m; +} + +function f13(t0: T, t1: [...T], t2: [...U]): void { + t0 = t1; + t0 = t2; + t1 = t0; + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} + +function f14(t0: T, t1: [...T], t2: [...U]): void { + t0 = t1; + t0 = t2; + t1 = t0; // Error + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} + +function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]): void { + k0 = 'length'; + k1 = 'length'; + k2 = 'length'; + k0 = 'slice'; + k1 = 'slice'; + k2 = 'slice'; + k3 = '0'; + k3 = '1'; + k3 = '2'; // Error +} + +// Constraints of variadic tuple types + +function ft16(x: [unknown, unknown], y: [...T, ...T]): void { + x = y; +} + +function ft17(x: [unknown, unknown], y: [...T, ...T]): void { + x = y; +} + +function ft18(x: [unknown, unknown], y: [...T, ...T]): void { + x = y; +} + +// Inference between variadic tuple types + +type First = + T extends readonly [unknown, ...unknown[]] ? T[0] : + T[0] | undefined; + +type DropFirst = T extends readonly [unknown?, ...infer U] ? U : [...T]; + +type Last = + T extends readonly [...unknown[], infer U] ? U : + T extends readonly [unknown, ...unknown[]] ? T[number] : + T[number] | undefined; + +type DropLast = T extends readonly [...infer U, unknown] ? U : [...T]; + +type T00 = First<[number, symbol, string]>; +type T01 = First<[symbol, string]>; +type T02 = First<[string]>; +type T03 = First<[number, symbol, ...string[]]>; +type T04 = First<[symbol, ...string[]]>; +type T05 = First<[string?]>; +type T06 = First; +type T07 = First<[]>; +type T08 = First; +type T09 = First; + +type T10 = DropFirst<[number, symbol, string]>; +type T11 = DropFirst<[symbol, string]>; +type T12 = DropFirst<[string]>; +type T13 = DropFirst<[number, symbol, ...string[]]>; +type T14 = DropFirst<[symbol, ...string[]]>; +type T15 = DropFirst<[string?]>; +type T16 = DropFirst; +type T17 = DropFirst<[]>; +type T18 = DropFirst; +type T19 = DropFirst; + +type T20 = Last<[number, symbol, string]>; +type T21 = Last<[symbol, string]>; +type T22 = Last<[string]>; +type T23 = Last<[number, symbol, ...string[]]>; +type T24 = Last<[symbol, ...string[]]>; +type T25 = Last<[string?]>; +type T26 = Last; +type T27 = Last<[]>; +type T28 = Last; +type T29 = Last; + +type T30 = DropLast<[number, symbol, string]>; +type T31 = DropLast<[symbol, string]>; +type T32 = DropLast<[string]>; +type T33 = DropLast<[number, symbol, ...string[]]>; +type T34 = DropLast<[symbol, ...string[]]>; +type T35 = DropLast<[string?]>; +type T36 = DropLast; +type T37 = DropLast<[]>; // unknown[], maybe should be [] +type T38 = DropLast; +type T39 = DropLast; + +type R00 = First; +type R01 = First; +type R02 = First; +type R03 = First; +type R04 = First; +type R05 = First; +type R06 = First; + +type R10 = DropFirst; +type R11 = DropFirst; +type R12 = DropFirst; +type R13 = DropFirst; +type R14 = DropFirst; +type R15 = DropFirst; +type R16 = DropFirst; + +type R20 = Last; +type R21 = Last; +type R22 = Last; +type R23 = Last; +type R24 = Last; +type R25 = Last; +type R26 = Last; + +type R30 = DropLast; +type R31 = DropLast; +type R32 = DropLast; +type R33 = DropLast; +type R34 = DropLast; +type R35 = DropLast; +type R36 = DropLast; + +// Inference to [...T, ...U] with implied arity for T + +function curry(f: (...args: [...T, ...U]) => R, ...a: T): (...b: U) => R { + return (...b: U) => f(...a, ...b); +} + +const fn1 = (a: number, b: string, c: boolean, d: string[]): number => 0; + +const c0: (a: number, b: string, c: boolean, d: string[]) => number = curry(fn1); // (a: number, b: string, c: boolean, d: string[]) => number +const c1: (b: string, c: boolean, d: string[]) => number = curry(fn1, 1); // (b: string, c: boolean, d: string[]) => number +const c2: (c: boolean, d: string[]) => number = curry(fn1, 1, 'abc'); // (c: boolean, d: string[]) => number +const c3: (d: string[]) => number = curry(fn1, 1, 'abc', true); // (d: string[]) => number +const c4: () => number = curry(fn1, 1, 'abc', true, ['x', 'y']); // () => number + +const fn2 = (x: number, b: boolean, ...args: string[]): number => 0; + +const c10: (x: number, b: boolean, ...args: string[]) => number = curry(fn2); // (x: number, b: boolean, ...args: string[]) => number +const c11: (b: boolean, ...args: string[]) => number = curry(fn2, 1); // (b: boolean, ...args: string[]) => number +const c12: (...b: string[]) => number = curry(fn2, 1, true); // (...args: string[]) => number +const c13: (...b: string[]) => number = curry(fn2, 1, true, 'abc', 'def'); // (...args: string[]) => number + +const fn3 = (...args: string[]): number => 0; + +const c20: (...b: string[]) => number = curry(fn3); // (...args: string[]) => number +const c21: (...b: string[]) => number = curry(fn3, 'abc', 'def'); // (...args: string[]) => number +const c22: (...b: string[]) => number = curry(fn3, ...sa); // (...args: string[]) => number + +// No inference to [...T, ...U] when there is no implied arity + +function curry2(f: (...args: [...T, ...U]) => R, t: [...T], u: [...U]): R { + return f(...t, ...u); +} + +declare function fn10(a: string, b: number, c: boolean): string[]; + +curry2(fn10, ['hello', 42], [true]); +curry2(fn10, ['hello'], [42, true]); + +// Inference to [...T] has higher priority than inference to [...T, number?] + +declare function ft(t1: [...T], t2: [...T, number?]): T; + +ft([1, 2, 3], [1, 2, 3]); +ft([1, 2], [1, 2, 3]); +ft(['a', 'b'], ['c', 'd']) +ft(['a', 'b'], ['c', 'd', 42]) + +// Last argument is contextually typed + +declare function call(...args: [...T, (...args: T) => R]): [T, R]; + +call('hello', 32, (a, b) => 42); +call(...sa, (...x) => 42); + +// No inference to ending optional elements (except with identical structure) + +declare function f20(args: [...T, number?]): T; + +function f21(args: [...U, number?]): void { + let v1 = f20(args); // U + let v2 = f20(["foo", "bar"]); // [string] + let v3 = f20(["foo", 42]); // [string] +} + +declare function f22(args: [...T, number]): T; +declare function f22(args: [...T]): T; + +function f23(args: [...U, number]): void { + let v1 = f22(args); // U + let v2 = f22(["foo", "bar"]); // [string, string] + let v3 = f22(["foo", 42]); // [string] +} + +// Repro from #39327 + +interface Desc { + readonly f: (...args: A) => T; + bind(this: Desc<[...T, ...U], R>, ...args: T): Desc<[...U], R>; +} + +declare const a: Desc<[string, number, boolean], object>; +const b: Desc<[boolean], object> = a.bind("", 1); // Desc<[boolean], object> + +// Repro from #39607 + +declare function getUser(id: string, options?: { x?: string }): string; + +declare function getOrgUser(id: string, orgId: number, options?: { y?: number, z?: boolean }): void; + +function callApi(method: (...args: [...T, object]) => U): (...args_0: T) => U { + return (...args: [...T]) => method(...args, {}); +} + +callApi(getUser); +callApi(getOrgUser); + +// Repro from #40235 + +type Numbers = number[]; +type Unbounded = [...Numbers, boolean]; +const data: Unbounded = [false, false]; // Error + +type U1 = [string, ...Numbers, boolean]; +type U2 = [...[string, ...Numbers], boolean]; +type U3 = [...[string, number], boolean]; + +// Repro from #53563 + +type ToStringLength1 = `${T['length']}`; +type ToStringLength2 = `${[...T]['length']}`; + + +/// [Declarations] //// + + + +//// [variadicTuples1.d.ts] +type TV0 = [string, ...T]; +type TV1 = [string, ...T, number]; +type TV2 = [string, ...T, number, ...T]; +type TV3 = [string, ...T, ...number[], ...T]; +type TN1 = TV1<[boolean, string]>; +type TN2 = TV1<[]>; +type TN3 = TV1<[boolean?]>; +type TN4 = TV1; +type TN5 = TV1<[boolean] | [symbol, symbol]>; +type TN6 = TV1; +type TN7 = TV1; +declare function tup2(t: [...T], u: [...U]): readonly [1, ...T, 2, ...U, 3]; +declare const t2: readonly [1, string, 2, number, boolean, 3]; +declare function concat(t: [...T], u: [...U]): [...T, ...U]; +declare const sa: string[]; +declare const tc1: []; +declare const tc2: [ + string, + number +]; +declare const tc3: [ + number, + number, + number, + ...string[] +]; +declare const tc4: [ + ...string[], + number, + number, + number +]; +declare function concat2(t: T, u: U): (T[number] | U[number])[]; +declare const tc5: (2 | 4 | 1 | 3 | 6 | 5)[]; +declare function foo1(a: number, b: string, c: boolean, ...d: number[]): void; +declare function foo2(t1: [number, string], t2: [boolean], a1: number[]): void; +declare function foo3(x: number, ...args: [...T, number]): T; +declare function foo4(u: U): void; +declare function ft1(t: T): T; +declare function ft2(t: T): readonly [...T]; +declare function ft3(t: [...T]): T; +declare function ft4(t: [...T]): readonly [...T]; +declare function f0(t: [string, ...T], n: number): void; +declare function f1(t: [string, ...T, number], n: number): void; +declare function f2(t: [string, ...T]): void; +declare function f3(t: [string, ...T, number]): void; +type Arrayify = { + [P in keyof T]: T[P][]; +}; +type TM1 = Arrayify; +type TP1 = Partial<[string, ...T, number]>; +type TP2 = Partial<[string, ...T, ...number[]]>; +declare function fm1(t: Arrayify<[string, number, ...T]>): T; +declare let tm1: [ + boolean, + string +]; +declare function fx1(a: string, ...args: T): T; +declare function gx1(u: U, v: V): void; +declare function fx2(a: string, ...args: T): T; +declare function gx2(u: U, v: V): void; +declare function f10(x: [string, ...unknown[]], y: [string, ...T], z: [string, ...U]): void; +declare function f11(t: T, m: [...T], r: readonly [...T]): void; +declare function f12(t: T, m: [...T], r: readonly [...T]): void; +declare function f13(t0: T, t1: [...T], t2: [...U]): void; +declare function f14(t0: T, t1: [...T], t2: [...U]): void; +declare function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]): void; +declare function ft16(x: [unknown, unknown], y: [...T, ...T]): void; +declare function ft17(x: [unknown, unknown], y: [...T, ...T]): void; +declare function ft18(x: [unknown, unknown], y: [...T, ...T]): void; +type First = T extends readonly [unknown, ...unknown[]] ? T[0] : T[0] | undefined; +type DropFirst = T extends readonly [unknown?, ...infer U] ? U : [...T]; +type Last = T extends readonly [...unknown[], infer U] ? U : T extends readonly [unknown, ...unknown[]] ? T[number] : T[number] | undefined; +type DropLast = T extends readonly [...infer U, unknown] ? U : [...T]; +type T00 = First<[number, symbol, string]>; +type T01 = First<[symbol, string]>; +type T02 = First<[string]>; +type T03 = First<[number, symbol, ...string[]]>; +type T04 = First<[symbol, ...string[]]>; +type T05 = First<[string?]>; +type T06 = First; +type T07 = First<[]>; +type T08 = First; +type T09 = First; +type T10 = DropFirst<[number, symbol, string]>; +type T11 = DropFirst<[symbol, string]>; +type T12 = DropFirst<[string]>; +type T13 = DropFirst<[number, symbol, ...string[]]>; +type T14 = DropFirst<[symbol, ...string[]]>; +type T15 = DropFirst<[string?]>; +type T16 = DropFirst; +type T17 = DropFirst<[]>; +type T18 = DropFirst; +type T19 = DropFirst; +type T20 = Last<[number, symbol, string]>; +type T21 = Last<[symbol, string]>; +type T22 = Last<[string]>; +type T23 = Last<[number, symbol, ...string[]]>; +type T24 = Last<[symbol, ...string[]]>; +type T25 = Last<[string?]>; +type T26 = Last; +type T27 = Last<[]>; +type T28 = Last; +type T29 = Last; +type T30 = DropLast<[number, symbol, string]>; +type T31 = DropLast<[symbol, string]>; +type T32 = DropLast<[string]>; +type T33 = DropLast<[number, symbol, ...string[]]>; +type T34 = DropLast<[symbol, ...string[]]>; +type T35 = DropLast<[string?]>; +type T36 = DropLast; +type T37 = DropLast<[]>; +type T38 = DropLast; +type T39 = DropLast; +type R00 = First; +type R01 = First; +type R02 = First; +type R03 = First; +type R04 = First; +type R05 = First; +type R06 = First; +type R10 = DropFirst; +type R11 = DropFirst; +type R12 = DropFirst; +type R13 = DropFirst; +type R14 = DropFirst; +type R15 = DropFirst; +type R16 = DropFirst; +type R20 = Last; +type R21 = Last; +type R22 = Last; +type R23 = Last; +type R24 = Last; +type R25 = Last; +type R26 = Last; +type R30 = DropLast; +type R31 = DropLast; +type R32 = DropLast; +type R33 = DropLast; +type R34 = DropLast; +type R35 = DropLast; +type R36 = DropLast; +declare function curry(f: (...args: [...T, ...U]) => R, ...a: T): (...b: U) => R; +declare const fn1: (a: number, b: string, c: boolean, d: string[]) => number; +declare const c0: (a: number, b: string, c: boolean, d: string[]) => number; +declare const c1: (b: string, c: boolean, d: string[]) => number; +declare const c2: (c: boolean, d: string[]) => number; +declare const c3: (d: string[]) => number; +declare const c4: () => number; +declare const fn2: (x: number, b: boolean, ...args: string[]) => number; +declare const c10: (x: number, b: boolean, ...args: string[]) => number; +declare const c11: (b: boolean, ...args: string[]) => number; +declare const c12: (...b: string[]) => number; +declare const c13: (...b: string[]) => number; +declare const fn3: (...args: string[]) => number; +declare const c20: (...b: string[]) => number; +declare const c21: (...b: string[]) => number; +declare const c22: (...b: string[]) => number; +declare function curry2(f: (...args: [...T, ...U]) => R, t: [...T], u: [...U]): R; +declare function fn10(a: string, b: number, c: boolean): string[]; +declare function ft(t1: [...T], t2: [...T, number?]): T; +declare function call(...args: [...T, (...args: T) => R]): [T, R]; +declare function f20(args: [...T, number?]): T; +declare function f21(args: [...U, number?]): void; +declare function f22(args: [...T, number]): T; +declare function f22(args: [...T]): T; +declare function f23(args: [...U, number]): void; +interface Desc { + readonly f: (...args: A) => T; + bind(this: Desc<[...T, ...U], R>, ...args: T): Desc<[...U], R>; +} +declare const a: Desc<[string, number, boolean], object>; +declare const b: Desc<[boolean], object>; +declare function getUser(id: string, options?: { + x?: string; +}): string; +declare function getOrgUser(id: string, orgId: number, options?: { + y?: number; + z?: boolean; +}): void; +declare function callApi(method: (...args: [...T, object]) => U): (...args_0: T) => U; +type Numbers = number[]; +type Unbounded = [...Numbers, boolean]; +declare const data: Unbounded; +type U1 = [string, ...Numbers, boolean]; +type U2 = [...[string, ...Numbers], boolean]; +type U3 = [...[string, number], boolean]; +type ToStringLength1 = `${T['length']}`; +type ToStringLength2 = `${[...T]['length']}`; +//# sourceMappingURL=variadicTuples1.d.ts.map + +/// [Declarations Maps] //// + + +//// [variadicTuples1.d.ts.map] +{"version":3,"file":"variadicTuples1.d.ts","sourceRoot":"","sources":["variadicTuples1.ts"],"names":[],"mappings":"AAEA,KAAK,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;AAC/C,KAAK,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;AACvD,KAAK,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;AAC7D,KAAK,GAAG,CAAC,CA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W5ndGgxPFQgZXh0ZW5kcyBhbnlbXT4gPSBgJHtUWydsZW5ndGgnXX1gOwp0eXBlIFRvU3RyaW5nTGVuZ3RoMjxUIGV4dGVuZHMgYW55W10+ID0gYCR7Wy4uLlRdWydsZW5ndGgnXX1gOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/varianceAnnotations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/varianceAnnotations.d.ts new file mode 100644 index 0000000000000..d6f4be76f1c6f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/varianceAnnotations.d.ts @@ -0,0 +1,642 @@ +//// [tests/cases/conformance/types/typeParameters/typeParameterLists/varianceAnnotations.ts] //// + +//// [varianceAnnotations.ts] +type Covariant = { + x: T; +} + +declare let super_covariant: Covariant; +declare let sub_covariant: Covariant; + +super_covariant = sub_covariant; +sub_covariant = super_covariant; // Error + +type Contravariant = { + f: (x: T) => void; +} + +declare let super_contravariant: Contravariant; +declare let sub_contravariant: Contravariant; + +super_contravariant = sub_contravariant; // Error +sub_contravariant = super_contravariant; + +type Invariant = { + f: (x: T) => T; +} + +declare let super_invariant: Invariant; +declare let sub_invariant: Invariant; + +super_invariant = sub_invariant; // Error +sub_invariant = super_invariant; // Error + +// Variance of various type constructors + +type T10 = T; +type T11 = keyof T; +type T12 = T[K]; +type T13 = T[keyof T]; + +// Variance annotation errors + +type Covariant1 = { // Error + x: T; +} + +type Contravariant1 = keyof T; // Error + +type Contravariant2 = { // Error + f: (x: T) => void; +} + +type Invariant1 = { // Error + f: (x: T) => T; +} + +type Invariant2 = { // Error + f: (x: T) => T; +} + +// Variance in circular types + +type Foo1 = { // Error + x: T; + f: FooFn1; +} + +type FooFn1 = (foo: Bar1) => void; + +type Bar1 = { + value: Foo1; +} + +type Foo2 = { // Error + x: T; + f: FooFn2; +} + +type FooFn2 = (foo: Bar2) => void; + +type Bar2 = { + value: Foo2; +} + +type Foo3 = { + x: T; + f: FooFn3; +} + +type FooFn3 = (foo: Bar3) => void; + +type Bar3 = { + value: Foo3; +} + +// Wrong modifier usage + +type T20 = T; // Error +type T21 = T; // Error +type T22 = T; // Error +type T23 = T; // Error + +declare function f1(x: T): void; // Error +declare function f2(): T; // Error + +class C { + in a = 0; // Error + out b = 0; // Error +} + +// Interface merging + +interface Baz {} +interface Baz {} + +declare let baz1: Baz; +declare let baz2: Baz; + +baz1 = baz2; // Error +baz2 = baz1; // Error + +// Repro from #44572 + +interface Parent { + child: Child | null; + parent: Parent | null; +} + +interface Child extends Parent { + readonly a: A; + readonly b: B; +} + +function fn(inp: Child): void { + const a: Child = inp; +} + +const pu: Parent = { child: { a: 0, b: 0, child: null, parent: null }, parent: null }; +const notString: Parent = pu; // Error + +// Repro from comment in #44572 + +declare class StateNode { + _storedEvent: TEvent; + _action: ActionObject; + _state: StateNode; +} + +interface ActionObject { + exec: (meta: StateNode) => void; +} + +declare function createMachine(action: ActionObject): StateNode; + +declare function interpret(machine: StateNode): void; + +const machine: StateNode = createMachine({} as any); + +interpret(machine); + +declare const qq: ActionObject<{ type: "PLAY"; value: number }>; + +createMachine<{ type: "PLAY"; value: number } | { type: "RESET" }>(qq); // Error + +// Repros from #48618 + +let Anon = class { + foo(): InstanceType<(typeof Anon)> { + return this; + } +} + +let OuterC = class C { + foo(): C { + return this; + } +} + + +/// [Declarations] //// + + + +//// [varianceAnnotations.d.ts] +type Covariant = { + x: T; +}; +declare let super_covariant: Covariant; +declare let sub_covariant: Covariant; +type Contravariant = { + f: (x: T) => void; +}; +declare let super_contravariant: Contravariant; +declare let sub_contravariant: Contravariant; +type Invariant = { + f: (x: T) => T; +}; +declare let super_invariant: Invariant; +declare let sub_invariant: Invariant; +type T10 = T; +type T11 = keyof T; +type T12 = T[K]; +type T13 = T[keyof T]; +type Covariant1 = { + x: T; +}; +type Contravariant1 = keyof T; +type Contravariant2 = { + f: (x: T) => void; +}; +type Invariant1 = { + f: (x: T) => T; +}; +type Invariant2 = { + f: (x: T) => T; +}; +type Foo1 = { + x: T; + f: FooFn1; +}; +type FooFn1 = (foo: Bar1) => void; +type Bar1 = { + value: Foo1; +}; +type Foo2 = { + x: T; + f: FooFn2; +}; +type FooFn2 = (foo: Bar2) => void; +type Bar2 = { + value: Foo2; +}; +type Foo3 = { + x: T; + f: FooFn3; +}; +type FooFn3 = (foo: Bar3) => void; +type Bar3 = { + value: Foo3; +}; +type T20 = T; +type T21 = T; +type T22 = T; +type T23 = T; +declare function f1(x: T): void; +declare function f2(): T; +declare class C { + in a: number; + out b: number; +} +interface Baz { +} +interface Baz { +} +declare let baz1: Baz; +declare let baz2: Baz; +interface Parent { + child: Child | null; + parent: Parent | null; +} +interface Child extends Parent { + readonly a: A; + readonly b: B; +} +declare function fn(inp: Child): void; +declare const pu: Parent; +declare const notString: Parent; +declare class StateNode { + _storedEvent: TEvent; + _action: ActionObject; + _state: StateNode; +} +interface ActionObject { + exec: (meta: StateNode) => void; +} +declare function createMachine(action: ActionObject): StateNode; +declare function interpret(machine: StateNode): void; +declare const machine: StateNode; +declare const qq: ActionObject<{ + type: "PLAY"; + value: number; +}>; +declare let Anon: { + new (): { + foo(): any; + }; +}; +declare let OuterC: { + new (): { + foo(): any; + }; +}; +//# sourceMappingURL=varianceAnnotations.d.ts.map +/// [Errors] //// + +varianceAnnotations.ts(9,1): error TS2322: Type 'Covariant' is not assignable to type 'Covariant'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(18,1): error TS2322: Type 'Contravariant' is not assignable to type 'Contravariant'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(28,1): error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. + Types of property 'f' are incompatible. + Type '(x: string) => string' is not assignable to type '(x: unknown) => unknown'. + Types of parameters 'x' and 'x' are incompatible. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(29,1): error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. + The types returned by 'f(...)' are incompatible between these types. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(33,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(34,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(35,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(35,17): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(36,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(40,17): error TS2636: Type 'Covariant1' is not assignable to type 'Covariant1' as implied by variance annotation. + Types of property 'x' are incompatible. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(44,21): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(46,21): error TS2636: Type 'Contravariant2' is not assignable to type 'Contravariant2' as implied by variance annotation. + Types of property 'f' are incompatible. + Type '(x: sub-T) => void' is not assignable to type '(x: super-T) => void'. + Types of parameters 'x' and 'x' are incompatible. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(50,17): error TS2636: Type 'Invariant1' is not assignable to type 'Invariant1' as implied by variance annotation. + The types returned by 'f(...)' are incompatible between these types. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(54,17): error TS2636: Type 'Invariant2' is not assignable to type 'Invariant2' as implied by variance annotation. + Types of property 'f' are incompatible. + Type '(x: sub-T) => sub-T' is not assignable to type '(x: super-T) => super-T'. + Types of parameters 'x' and 'x' are incompatible. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(60,11): error TS2636: Type 'Foo1' is not assignable to type 'Foo1' as implied by variance annotation. + Types of property 'x' are incompatible. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(71,11): error TS2636: Type 'Foo2' is not assignable to type 'Foo2' as implied by variance annotation. + Types of property 'f' are incompatible. + Type 'FooFn2' is not assignable to type 'FooFn2'. + Type 'super-T' is not assignable to type 'sub-T'. +varianceAnnotations.ts(95,10): error TS1273: 'public' modifier cannot appear on a type parameter +varianceAnnotations.ts(96,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(96,17): error TS1030: 'in' modifier already seen. +varianceAnnotations.ts(97,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(97,17): error TS1030: 'out' modifier already seen. +varianceAnnotations.ts(98,10): error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. +varianceAnnotations.ts(98,14): error TS1029: 'in' modifier must precede 'out' modifier. +varianceAnnotations.ts(100,21): error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias +varianceAnnotations.ts(101,21): error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias +varianceAnnotations.ts(104,5): error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias +varianceAnnotations.ts(105,5): error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias +varianceAnnotations.ts(116,1): error TS2322: Type 'Baz' is not assignable to type 'Baz'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(117,1): error TS2322: Type 'Baz' is not assignable to type 'Baz'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(136,7): error TS2322: Type 'Parent' is not assignable to type 'Parent'. + Type 'unknown' is not assignable to type 'string'. +varianceAnnotations.ts(160,68): error TS2345: Argument of type 'ActionObject<{ type: "PLAY"; value: number; }>' is not assignable to parameter of type 'ActionObject<{ type: "PLAY"; value: number; } | { type: "RESET"; }>'. + Types of property 'exec' are incompatible. + Type '(meta: StateNode) => void' is not assignable to type '(meta: StateNode) => void'. + Types of parameters 'meta' and 'meta' are incompatible. + Type 'StateNode' is not assignable to type 'StateNode'. + Types of property '_storedEvent' are incompatible. + Type '{ type: "PLAY"; value: number; } | { type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. + Type '{ type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. + + +==== varianceAnnotations.ts (31 errors) ==== + type Covariant = { + x: T; + } + + declare let super_covariant: Covariant; + declare let sub_covariant: Covariant; + + super_covariant = sub_covariant; + sub_covariant = super_covariant; // Error + ~~~~~~~~~~~~~ +!!! error TS2322: Type 'Covariant' is not assignable to type 'Covariant'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + + type Contravariant = { + f: (x: T) => void; + } + + declare let super_contravariant: Contravariant; + declare let sub_contravariant: Contravariant; + + super_contravariant = sub_contravariant; // Error + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'Contravariant' is not assignable to type 'Contravariant'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + sub_contravariant = super_contravariant; + + type Invariant = { + f: (x: T) => T; + } + + declare let super_invariant: Invariant; + declare let sub_invariant: Invariant; + + super_invariant = sub_invariant; // Error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. +!!! error TS2322: Types of property 'f' are incompatible. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: unknown) => unknown'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + sub_invariant = super_invariant; // Error + ~~~~~~~~~~~~~ +!!! error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. +!!! error TS2322: The types returned by 'f(...)' are incompatible between these types. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + + // Variance of various type constructors + + type T10 = T; + ~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + type T11 = keyof T; + ~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + type T12 = T[K]; + ~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + type T13 = T[keyof T]; + ~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + + // Variance annotation errors + + type Covariant1 = { // Error + ~~~~ +!!! error TS2636: Type 'Covariant1' is not assignable to type 'Covariant1' as implied by variance annotation. +!!! error TS2636: Types of property 'x' are incompatible. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + x: T; + } + + type Contravariant1 = keyof T; // Error + ~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + + type Contravariant2 = { // Error + ~~~~~ +!!! error TS2636: Type 'Contravariant2' is not assignable to type 'Contravariant2' as implied by variance annotation. +!!! error TS2636: Types of property 'f' are incompatible. +!!! error TS2636: Type '(x: sub-T) => void' is not assignable to type '(x: super-T) => void'. +!!! error TS2636: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + f: (x: T) => void; + } + + type Invariant1 = { // Error + ~~~~ +!!! error TS2636: Type 'Invariant1' is not assignable to type 'Invariant1' as implied by variance annotation. +!!! error TS2636: The types returned by 'f(...)' are incompatible between these types. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + f: (x: T) => T; + } + + type Invariant2 = { // Error + ~~~~~ +!!! error TS2636: Type 'Invariant2' is not assignable to type 'Invariant2' as implied by variance annotation. +!!! error TS2636: Types of property 'f' are incompatible. +!!! error TS2636: Type '(x: sub-T) => sub-T' is not assignable to type '(x: super-T) => super-T'. +!!! error TS2636: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + f: (x: T) => T; + } + + // Variance in circular types + + type Foo1 = { // Error + ~~~~ +!!! error TS2636: Type 'Foo1' is not assignable to type 'Foo1' as implied by variance annotation. +!!! error TS2636: Types of property 'x' are incompatible. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + x: T; + f: FooFn1; + } + + type FooFn1 = (foo: Bar1) => void; + + type Bar1 = { + value: Foo1; + } + + type Foo2 = { // Error + ~~~~~ +!!! error TS2636: Type 'Foo2' is not assignable to type 'Foo2' as implied by variance annotation. +!!! error TS2636: Types of property 'f' are incompatible. +!!! error TS2636: Type 'FooFn2' is not assignable to type 'FooFn2'. +!!! error TS2636: Type 'super-T' is not assignable to type 'sub-T'. + x: T; + f: FooFn2; + } + + type FooFn2 = (foo: Bar2) => void; + + type Bar2 = { + value: Foo2; + } + + type Foo3 = { + x: T; + f: FooFn3; + } + + type FooFn3 = (foo: Bar3) => void; + + type Bar3 = { + value: Foo3; + } + + // Wrong modifier usage + + type T20 = T; // Error + ~~~~~~ +!!! error TS1273: 'public' modifier cannot appear on a type parameter + type T21 = T; // Error + ~~~~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + ~~ +!!! error TS1030: 'in' modifier already seen. + type T22 = T; // Error + ~~~~~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + ~~~ +!!! error TS1030: 'out' modifier already seen. + type T23 = T; // Error + ~~~~~~~~ +!!! error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types. + ~~ +!!! error TS1029: 'in' modifier must precede 'out' modifier. + + declare function f1(x: T): void; // Error + ~~ +!!! error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias + declare function f2(): T; // Error + ~~~ +!!! error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias + + class C { + in a = 0; // Error + ~~ +!!! error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias + out b = 0; // Error + ~~~ +!!! error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias + } + + // Interface merging + + interface Baz {} + interface Baz {} + + declare let baz1: Baz; + declare let baz2: Baz; + + baz1 = baz2; // Error + ~~~~ +!!! error TS2322: Type 'Baz' is not assignable to type 'Baz'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + baz2 = baz1; // Error + ~~~~ +!!! error TS2322: Type 'Baz' is not assignable to type 'Baz'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + + // Repro from #44572 + + interface Parent { + child: Child | null; + parent: Parent | null; + } + + interface Child extends Parent { + readonly a: A; + readonly b: B; + } + + function fn(inp: Child): void { + const a: Child = inp; + } + + const pu: Parent = { child: { a: 0, b: 0, child: null, parent: null }, parent: null }; + const notString: Parent = pu; // Error + ~~~~~~~~~ +!!! error TS2322: Type 'Parent' is not assignable to type 'Parent'. +!!! error TS2322: Type 'unknown' is not assignable to type 'string'. + + // Repro from comment in #44572 + + declare class StateNode { + _storedEvent: TEvent; + _action: ActionObject; + _state: StateNode; + } + + interface ActionObject { + exec: (meta: StateNode) => void; + } + + declare function createMachine(action: ActionObject): StateNode; + + declare function interpret(machine: StateNode): void; + + const machine: StateNode = createMachine({} as any); + + interpret(machine); + + declare const qq: ActionObject<{ type: "PLAY"; value: number }>; + + createMachine<{ type: "PLAY"; value: number } | { type: "RESET" }>(qq); // Error + ~~ +!!! error TS2345: Argument of type 'ActionObject<{ type: "PLAY"; value: number; }>' is not assignable to parameter of type 'ActionObject<{ type: "PLAY"; value: number; } | { type: "RESET"; }>'. +!!! error TS2345: Types of property 'exec' are incompatible. +!!! error TS2345: Type '(meta: StateNode) => void' is not assignable to type '(meta: StateNode) => void'. +!!! error TS2345: Types of parameters 'meta' and 'meta' are incompatible. +!!! error TS2345: Type 'StateNode' is not assignable to type 'StateNode'. +!!! error TS2345: Types of property '_storedEvent' are incompatible. +!!! error TS2345: Type '{ type: "PLAY"; value: number; } | { type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. +!!! error TS2345: Type '{ type: "RESET"; }' is not assignable to type '{ type: "PLAY"; value: number; }'. + + // Repros from #48618 + + let Anon = class { + foo(): InstanceType<(typeof Anon)> { + return this; + } + } + + let OuterC = class C { + foo(): C { + return this; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/weakTypesAndLiterals01.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/weakTypesAndLiterals01.d.ts.map new file mode 100644 index 0000000000000..7d67d46bbc58f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/weakTypesAndLiterals01.d.ts.map @@ -0,0 +1,81 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts] //// + +//// [weakTypesAndLiterals01.ts] +type WeakTypes = + | { optional?: true; } + | { toLowerCase?(): string } + | { toUpperCase?(): string, otherOptionalProp?: number }; + +type LiteralsOrWeakTypes = + | "A" + | "B" + | WeakTypes; + +declare let aOrB: "A" | "B"; + +const f = (arg: LiteralsOrWeakTypes): WeakTypes | "A" | "B" => { + if (arg === "A") { + return arg; + } + else { + return arg; + } +} + +const g = (arg: WeakTypes): WeakTypes => { + if (arg === "A") { + return arg; + } + else { + return arg; + } +} + +const h = (arg: LiteralsOrWeakTypes): LiteralsOrWeakTypes => { + if (arg === aOrB) { + return arg; + } + else { + return arg; + } +} + +const i = (arg: WeakTypes): WeakTypes => { + if (arg === aOrB) { + return arg; + } + else { + return arg; + } +} + + +/// [Declarations] //// + + + +//// [weakTypesAndLiterals01.d.ts] +type WeakTypes = { + optional?: true; +} | { + toLowerCase?(): string; +} | { + toUpperCase?(): string; + otherOptionalProp?: number; +}; +type LiteralsOrWeakTypes = "A" | "B" | WeakTypes; +declare let aOrB: "A" | "B"; +declare const f: (arg: LiteralsOrWeakTypes) => WeakTypes | "A" | "B"; +declare const g: (arg: WeakTypes) => WeakTypes; +declare const h: (arg: LiteralsOrWeakTypes) => LiteralsOrWeakTypes; +declare const i: (arg: WeakTypes) => WeakTypes; +//# sourceMappingURL=weakTypesAndLiterals01.d.ts.map + +/// [Declarations Maps] //// + + +//// [weakTypesAndLiterals01.d.ts.map] +{"version":3,"file":"weakTypesAndLiterals01.d.ts","sourceRoot":"","sources":["weakTypesAndLiterals01.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GACR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PygpOiBzdHJpbmcgfQogICAgfCB7IHRvVXBwZXJDYXNlPygpOiBzdHJpbmcsIG90aGVyT3B0aW9uYWxQcm9wPzogbnVtYmVyIH07Cgp0eXBlIExpdGVyYWxzT3JXZWFrVHlwZXMgPQogICAgfCAiQSIKICAgIHwgIkIiCiAgICB8IFdlYWtUeXBlczsKCmRlY2xhcmUgbGV0IGFPckI6ICJBIiB8ICJCIjsKCmNvbnN0IGYgPSAoYXJnOiBMaXRlcmFsc09yV2Vha1R5cGVzKTogV2Vha1R5cGVzIHwgIkEiIHwgIkIiID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBnID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBoID0gKGFyZzogTGl0ZXJhbHNPcldlYWtUeXBlcyk6IExpdGVyYWxzT3JXZWFrVHlwZXMgPT4gewogICAgaWYgKGFyZyA9PT0gYU9yQikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBpID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09IGFPckIpIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgcmV0dXJuIGFyZzsKICAgIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff new file mode 100644 index 0000000000000..9100816b166a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -0,0 +1,90 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,20 +1,26 @@ + + + //// [computedPropertiesNarrowed.d.ts] +-export declare let o: invalid; ++declare const x: 0 | 1; ++export declare let o: { ++ [x]: number; ++}; + declare const y: 0; + export declare let o2: { +- 0: number; ++ [y]: number; + }; + export declare let o3: { + 1: number; + }; + export declare let o31: { + [-1]: number; + }; + export declare let o32: invalid; +-export declare let o4: invalid; ++declare let u: invalid; ++export declare let o4: { ++ [u]: number; ++}; + export declare let o5: invalid; + declare const uu: unique symbol; + export declare let o6: { + [uu]: number; +@@ -23,32 +29,28 @@ + declare let E: { + readonly A: 1; + }; + export declare const o8: { +- 1: number; ++ [E.A]: number; + }; + export declare const o9: invalid; + export {}; + + /// [Errors] //// + +-computedPropertiesNarrowed.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertiesNarrowed.ts(18,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertiesNarrowed.ts(22,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertiesNarrowed.ts(20,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + computedPropertiesNarrowed.ts(26,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertiesNarrowed.ts(37,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + +-==== computedPropertiesNarrowed.ts (6 errors) ==== ++==== computedPropertiesNarrowed.ts (5 errors) ==== + const x: 0 | 1 = Math.random()? 0: 1; + declare function assert(n: number): asserts n is 1; + assert(x); + export let o = { + [x]: 1 // error narrow type !== declared type +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertiesNarrowed.ts:4:12: Add a type annotation to the variable o. + } + + + const y: 0 = 0 +@@ -65,13 +67,13 @@ + !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + !!! related TS9027 computedPropertiesNarrowed.ts:18:12: Add a type annotation to the variable o32. + + let u = Symbol(); ++ ~~~~~~~~ ++!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9027 computedPropertiesNarrowed.ts:20:5: Add a type annotation to the variable u. + export let o4 = { + [u]: 1 // Should error, nut a unique symbol +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertiesNarrowed.ts:21:12: Add a type annotation to the variable o4. + } + + export let o5 ={ + [Symbol()]: 1 // Should error diff --git a/tests/baselines/reference/isolated-declarations/original/diff/correlatedUnions.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/correlatedUnions.d.ts.diff new file mode 100644 index 0000000000000..3a3653b32e172 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/correlatedUnions.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/correlatedUnions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -151,9 +151,9 @@ + [K2 in keyof T[K]]: number; + }; + }; + type MappedFromOriginal = SameKeys; +-declare const getStringAndNumberFromOriginalAndMapped: (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]; ++declare const getStringAndNumberFromOriginalAndMapped: >(original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]; + interface Config { + string: string; + number: number; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff new file mode 100644 index 0000000000000..aa2879545b3de --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff @@ -0,0 +1,33 @@ +// [[Reason: TSC preserves import due to augmentation]] //// + +//// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,24 +2,4 @@ + + //// [/src/index.d.ts] + declare class Src implements NS.Dep { + } +- +-/// [Errors] //// +- +-/src/index.ts(1,22): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations +- +- +-==== /src/index.ts (1 errors) ==== +- class Src implements NS.Dep { } +- ~~~~~~ +-!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations +- +-==== /deps/dep/dep.d.ts (0 errors) ==== +- declare namespace NS { +- interface Dep { +- } +- } +-==== /deps/dep/package.json (0 errors) ==== +- { +- "typings": "dep.d.ts" +- } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitNoNonRequiredParens.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitNoNonRequiredParens.d.ts.diff new file mode 100644 index 0000000000000..eca15f7658484 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitNoNonRequiredParens.d.ts.diff @@ -0,0 +1,14 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/declarationEmitNoNonRequiredParens.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,5 +6,5 @@ + B = 1, + C = 2 + } + export type TestType = typeof Test; +-export declare const bar: Test[]; ++export declare const bar: TestType[Extract][]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff new file mode 100644 index 0000000000000..2555b455e8013 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// + +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,9 +2,11 @@ + + //// [declarationEmitObjectLiteralAccessors1.d.ts] + export declare const obj1: { + /** my awesome getter (first in source order) */ +- x: string; ++ get x(): string; ++ /** my awesome setter (second in source order) */ ++ set x(a: string); + }; + export declare const obj2: { + /** my awesome getter */ + get x(): string; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitPropertyNumericStringKey.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitPropertyNumericStringKey.d.ts.diff new file mode 100644 index 0000000000000..3fb4b42370dd0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitPropertyNumericStringKey.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,10 +5,10 @@ + readonly "404": "not found"; + }; + declare const hundredStr = "100"; + declare const obj: { +- "100": string; ++ [hundredStr]: string; + }; + declare const hundredNum = 100; + declare const obj2: { +- 100: string; ++ [hundredNum]: string; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitShadowingInferNotRenamed.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitShadowingInferNotRenamed.d.ts.diff new file mode 100644 index 0000000000000..2f2877e0f4c19 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitShadowingInferNotRenamed.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,6 +4,8 @@ + type Client = string; + type UpdatedClient = C & { + foo: number; + }; +-export declare const createClient: Client> | (new (...args: any[]) => Client)>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { [K in keyof D]: D[K] extends new (...args: any[]) => infer C_1 ? UpdatedClient : never; }; ++export declare const createClient: Client) | Record Client>>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { ++ [K in keyof D]: D[K] extends new (...args: any[]) => infer C ? UpdatedClient : never; ++}; + export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitWithDefaultAsComputedName.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitWithDefaultAsComputedName.d.ts.diff new file mode 100644 index 0000000000000..0f6f130ba16e7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitWithDefaultAsComputedName.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,9 +2,9 @@ + + //// [main.d.ts] + import other from "./other"; + export declare const obj: { +- foo: number; ++ [other.name]: number; + }; + + //// [other.d.ts] + declare const _default: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitWithDefaultAsComputedName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitWithDefaultAsComputedName2.d.ts.diff new file mode 100644 index 0000000000000..fae7dc83cc0b7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitWithDefaultAsComputedName2.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,9 +2,9 @@ + + //// [main.d.ts] + import * as other2 from "./other"; + export declare const obj: { +- foo: number; ++ [other2.default.name]: number; + }; + + //// [other.d.ts] + declare const _default: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff new file mode 100644 index 0000000000000..3ac12755bc395 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,21 +1,4 @@ + + + //// [/app.d.ts] + declare function foo(): Error2; +- +-/// [Errors] //// +- +-/app.ts(1,17): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations +- +- +-==== /node_modules/@types/node/index.d.ts (0 errors) ==== +- interface Error2 { +- stack2: string; +- } +- +-==== /app.ts (1 errors) ==== +- function foo(): Error2 { +- ~~~~~~ +-!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations +- return undefined; +- } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/duplicatePropertiesInTypeAssertions01.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/duplicatePropertiesInTypeAssertions01.d.ts.diff new file mode 100644 index 0000000000000..c3cbe2ce47c51 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/duplicatePropertiesInTypeAssertions01.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TS normalizes types. Removes duplicate properties.]] //// + +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,8 +2,9 @@ + + //// [duplicatePropertiesInTypeAssertions01.d.ts] + declare let x: { + a: number; ++ a: number; + }; + + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/duplicatePropertiesInTypeAssertions02.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/duplicatePropertiesInTypeAssertions02.d.ts.diff new file mode 100644 index 0000000000000..c39921ea4420d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/duplicatePropertiesInTypeAssertions02.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TS normalizes types. Removes duplicate properties.]] //// + +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,8 +2,9 @@ + + //// [duplicatePropertiesInTypeAssertions02.d.ts] + declare let x: { + a: number; ++ a: number; + }; + + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/dynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/dynamicNames.d.ts.diff new file mode 100644 index 0000000000000..5995b18dbfcbb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/dynamicNames.d.ts.diff @@ -0,0 +1,22 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/compiler/dynamicNames.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,11 +5,11 @@ + export declare const c4 = "a"; + export declare const c5 = 1; + export declare const s2: typeof s0; + export declare const o1: { +- a: number; +- 1: string; +- [s0]: boolean; ++ [c4]: number; ++ [c5]: string; ++ [s2]: boolean; + }; + export declare const o1_c4: invalid; + export declare const o1_c5: invalid; + export declare const o1_s2: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts.diff new file mode 100644 index 0000000000000..b3fa1636976a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts.diff @@ -0,0 +1,47 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/giant.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -39,8 +39,9 @@ + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; ++ [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; +@@ -91,8 +92,9 @@ + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; ++ [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; +@@ -206,8 +208,9 @@ + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; ++ [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; +@@ -265,8 +268,9 @@ + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; ++ [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/hugeDeclarationOutputGetsTruncatedWithError.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/hugeDeclarationOutputGetsTruncatedWithError.d.ts.diff new file mode 100644 index 0000000000000..cd60c2bf254b0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/hugeDeclarationOutputGetsTruncatedWithError.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: Semantically invalid. TSC does not emit .d.ts]] //// + +//// [tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,16 @@ + ++ ++//// [hugeDeclarationOutputGetsTruncatedWithError.d.ts] ++type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; ++type manyprops = `${props}${props}`; ++export declare const c: { ++ [K in manyprops]: { ++ [K2 in manyprops]: `${K}.${K2}`; ++ }; ++}; ++export {}; ++ + /// [Errors] //// + + hugeDeclarationOutputGetsTruncatedWithError.ts(5,14): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff new file mode 100644 index 0000000000000..ed1ea183d51f5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff @@ -0,0 +1,88 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -17,15 +17,21 @@ + set getSetOk2(value: number); + get getSetOk3(): number; + set getSetOk3(value: number); + } ++declare let noAnnotationStringName: string; ++declare let noParamAnnotationStringName: string; + declare const noAnnotationLiteralName = "noAnnotationLiteralName"; + declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + export declare class C { ++ [missing]: number; + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; ++ get [noAnnotationStringName](): invalid; ++ set [noParamAnnotationStringName](value: invalid); + } + export interface I { ++ [noAnnotationStringName]: 10; + [noAnnotationLiteralName](): any; + } + export {}; + +@@ -42,21 +48,19 @@ + isolatedDeclarationErrorsClasses.ts(12,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + isolatedDeclarationErrorsClasses.ts(14,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + isolatedDeclarationErrorsClasses.ts(36,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. +-isolatedDeclarationErrorsClasses.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-isolatedDeclarationErrorsClasses.ts(44,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +-isolatedDeclarationErrorsClasses.ts(46,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++isolatedDeclarationErrorsClasses.ts(46,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +-isolatedDeclarationErrorsClasses.ts(48,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. ++isolatedDeclarationErrorsClasses.ts(48,39): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + + +-==== isolatedDeclarationErrorsClasses.ts (22 errors) ==== ++==== isolatedDeclarationErrorsClasses.ts (20 errors) ==== + export class Cls { + + field = 1 + 1; + ~~~~~ +@@ -129,28 +133,26 @@ + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } +- ~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + [noParamAnnotationStringName](v): void { } +- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + ~ + !!! error TS7006: Parameter 'v' implicitly has an 'any' type. + + get [noAnnotationStringName]() { return 0;} + ~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9032 isolatedDeclarationErrorsClasses.ts:46:9: Add a return type to the get accessor declaration. + + set [noParamAnnotationStringName](value) { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + ~~~~~ + !!! error TS7006: Parameter 'value' implicitly has an 'any' type. ++ ~~~~~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9033 isolatedDeclarationErrorsClasses.ts:48:9: Add a type to parameter of the set accessor declaration. + + [("A" + "B") as "AB"] = 1; + ~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsObjects.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsObjects.d.ts.diff new file mode 100644 index 0000000000000..e23ad21fe1f9f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsObjects.d.ts.diff @@ -0,0 +1,61 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -11,8 +11,9 @@ + export declare let oWithMethods: invalid; + export declare let oWithMethodsNested: invalid; + export declare let oWithAccessor: invalid; + declare const s: unique symbol; ++declare const str: string; + declare enum E { + V = 10 + } + export declare const oWithComputedProperties: invalid; +@@ -36,19 +37,17 @@ + isolatedDeclarationErrorsObjects.ts(40,25): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + isolatedDeclarationErrorsObjects.ts(42,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + isolatedDeclarationErrorsObjects.ts(64,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + isolatedDeclarationErrorsObjects.ts(65,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-isolatedDeclarationErrorsObjects.ts(68,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + isolatedDeclarationErrorsObjects.ts(73,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + isolatedDeclarationErrorsObjects.ts(75,5): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. + isolatedDeclarationErrorsObjects.ts(77,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. + isolatedDeclarationErrorsObjects.ts(81,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + isolatedDeclarationErrorsObjects.ts(84,9): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. + isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +-isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + +-==== isolatedDeclarationErrorsObjects.ts (23 errors) ==== ++==== isolatedDeclarationErrorsObjects.ts (21 errors) ==== + export let o = { + a: 1, + b: "" + } +@@ -167,11 +166,8 @@ + !!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + [s]: 1, + [E.V]: 1, + [str]: 0, +- ~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + } + + const part = { a: 1 }; + +@@ -206,9 +202,6 @@ + ~~~~ + !!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. + !!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + [str]: 0, +- ~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + } + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff new file mode 100644 index 0000000000000..7f29baccd2968 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff @@ -0,0 +1,107 @@ +// [[Reason: TS expands type]] //// + +//// [tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,98 +1,6 @@ + + + //// [mappedTypeWithAsClauseAndLateBoundProperty2.d.ts] + export declare const thing: { +- [x: number]: number; +- toString: () => string; +- toLocaleString: () => string; +- pop: () => number; +- push: (...items: number[]) => number; +- concat: { +- (...items: ConcatArray[]): number[]; +- (...items: (number | ConcatArray)[]): number[]; +- }; +- join: (separator?: string) => string; +- reverse: () => number[]; +- shift: () => number; +- slice: (start?: number, end?: number) => number[]; +- sort: (compareFn?: (a: number, b: number) => number) => number[]; +- splice: { +- (start: number, deleteCount?: number): number[]; +- (start: number, deleteCount: number, ...items: number[]): number[]; +- }; +- unshift: (...items: number[]) => number; +- indexOf: (searchElement: number, fromIndex?: number) => number; +- lastIndexOf: (searchElement: number, fromIndex?: number) => number; +- every: { +- (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; +- (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; +- }; +- some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; +- forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; +- map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; +- filter: { +- (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; +- (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; +- }; +- reduce: { +- (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; +- (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; +- (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; +- }; +- reduceRight: { +- (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; +- (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; +- (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; +- }; +- find: { +- (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; +- (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; +- }; +- findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; +- fill: (value: number, start?: number, end?: number) => number[]; +- copyWithin: (target: number, start: number, end?: number) => number[]; +- entries: () => IterableIterator<[number, number]>; +- keys: () => IterableIterator; +- values: () => IterableIterator; +- includes: (searchElement: number, fromIndex?: number) => boolean; +- flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; +- flat: (this: A, depth?: D) => FlatArray[]; +- [Symbol.iterator]: () => IterableIterator; +- readonly [Symbol.unscopables]: { +- [x: number]: boolean; +- length?: boolean; +- toString?: boolean; +- toLocaleString?: boolean; +- pop?: boolean; +- push?: boolean; +- concat?: boolean; +- join?: boolean; +- reverse?: boolean; +- shift?: boolean; +- slice?: boolean; +- sort?: boolean; +- splice?: boolean; +- unshift?: boolean; +- indexOf?: boolean; +- lastIndexOf?: boolean; +- every?: boolean; +- some?: boolean; +- forEach?: boolean; +- map?: boolean; +- filter?: boolean; +- reduce?: boolean; +- reduceRight?: boolean; +- find?: boolean; +- findIndex?: boolean; +- fill?: boolean; +- copyWithin?: boolean; +- entries?: boolean; +- keys?: boolean; +- values?: boolean; +- includes?: boolean; +- flatMap?: boolean; +- flat?: boolean; +- [Symbol.iterator]?: boolean; +- readonly [Symbol.unscopables]?: boolean; +- }; ++ [K in keyof number[] as Exclude]: (number[])[K]; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/namedTupleMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/namedTupleMembers.d.ts.diff new file mode 100644 index 0000000000000..1b11d87783c00 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/namedTupleMembers.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/types/tuple/named/namedTupleMembers.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -17,9 +17,9 @@ + export declare const func: Func; + export declare function useState(initial: T): [value: T, setter: (T: invalid) => void]; + export type Iter = Func<[step: number, iterations: number]>; + export declare function readSegment([length, count]: [number, number]): invalid; +-export declare const val: [number, number]; ++export declare const val: Parameters[0]; + export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; + export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; + export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; + export type RecusiveRest2 = [string, ...RecusiveRest2[]]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff new file mode 100644 index 0000000000000..19b6ea7e13d25 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff @@ -0,0 +1,15 @@ +// [[Reason: TSC simplifies import type removing resolution-mode]] //// + +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; ++export declare const a: import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface; + export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..19b6ea7e13d25 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff @@ -0,0 +1,15 @@ +// [[Reason: TSC simplifies import type removing resolution-mode]] //// + +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; ++export declare const a: import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface; + export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts.diff new file mode 100644 index 0000000000000..7cbd3822c6af0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts.diff @@ -0,0 +1,53 @@ +// [[Reason: TSC simplifies import type removing resolution-mode]] //// + +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,20 +1,20 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; ++export declare const a: import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface; + export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + + //// [/.src/out/other.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any; +-export declare const b: any; ++export declare const a: import("pkg", { with: {} }); ++export declare const b: import("pkg", { with: {} }); + + //// [/.src/out/other2.d.ts] + export type LocalInterface = import("pkg", { with: { "bad": "require" } }).RequireInterface & import("pkg", { with: { "bad": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: any; ++export declare const a: import("pkg", { with: { "bad": "require" } }).RequireInterface; ++export declare const b: import("pkg", { with: { "bad": "import" } }).ImportInterface; + + //// [/.src/out/other3.d.ts] + export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +@@ -23,15 +23,15 @@ + export declare const b: invalid; + + //// [/.src/out/other4.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any, Attribute1: invalid, RequireInterface: invalid; +-export declare const b: any, Attribute2: invalid, ImportInterface: invalid; ++export declare const a: import("pkg", { with: {} }), Attribute1: invalid, RequireInterface: invalid; ++export declare const b: import("pkg", { with: {} }), Attribute2: invalid, ImportInterface: invalid; + + //// [/.src/out/other5.d.ts] + export type LocalInterface = import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: any; ++export declare const a: import("pkg", { with: {} }).RequireInterface; ++export declare const b: import("pkg", { with: {} }).ImportInterface; + + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..7cbd3822c6af0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts.diff @@ -0,0 +1,53 @@ +// [[Reason: TSC simplifies import type removing resolution-mode]] //// + +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,20 +1,20 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; ++export declare const a: import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface; + export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + + //// [/.src/out/other.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any; +-export declare const b: any; ++export declare const a: import("pkg", { with: {} }); ++export declare const b: import("pkg", { with: {} }); + + //// [/.src/out/other2.d.ts] + export type LocalInterface = import("pkg", { with: { "bad": "require" } }).RequireInterface & import("pkg", { with: { "bad": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: any; ++export declare const a: import("pkg", { with: { "bad": "require" } }).RequireInterface; ++export declare const b: import("pkg", { with: { "bad": "import" } }).ImportInterface; + + //// [/.src/out/other3.d.ts] + export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +@@ -23,15 +23,15 @@ + export declare const b: invalid; + + //// [/.src/out/other4.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any, Attribute1: invalid, RequireInterface: invalid; +-export declare const b: any, Attribute2: invalid, ImportInterface: invalid; ++export declare const a: import("pkg", { with: {} }), Attribute1: invalid, RequireInterface: invalid; ++export declare const b: import("pkg", { with: {} }), Attribute2: invalid, ImportInterface: invalid; + + //// [/.src/out/other5.d.ts] + export type LocalInterface = import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: any; ++export declare const a: import("pkg", { with: {} }).RequireInterface; ++export declare const b: import("pkg", { with: {} }).ImportInterface; + + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff new file mode 100644 index 0000000000000..8a29fc856cf16 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: TSC simplifies import type removing resolution-mode and uses with instead of assert]] //// + +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; ++export declare const a: import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface; ++export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..8a29fc856cf16 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: TSC simplifies import type removing resolution-mode and uses with instead of assert]] //// + +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; ++export declare const a: import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface; ++export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts.diff new file mode 100644 index 0000000000000..bb50a769dea61 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts.diff @@ -0,0 +1,54 @@ +// [[Reason: TSC simplifies import type removing resolution-mode]] //// + +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,20 +1,20 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; ++export declare const a: import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface; ++export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; + + //// [/.src/out/other.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any; +-export declare const b: any; ++export declare const a: import("pkg", { with: {} }); ++export declare const b: import("pkg", { with: {} }); + + //// [/.src/out/other2.d.ts] + export type LocalInterface = import("pkg", { assert: { "bad": "require" } }).RequireInterface & import("pkg", { assert: { "bad": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: any; ++export declare const a: import("pkg", { assert: { "bad": "require" } }).RequireInterface; ++export declare const b: import("pkg", { assert: { "bad": "import" } }).ImportInterface; + + //// [/.src/out/other3.d.ts] + export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +@@ -23,15 +23,15 @@ + export declare const b: invalid; + + //// [/.src/out/other4.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any, Asserts1: invalid, RequireInterface: invalid; +-export declare const b: any, Asserts2: invalid, ImportInterface: invalid; ++export declare const a: import("pkg", { with: {} }), Asserts1: invalid, RequireInterface: invalid; ++export declare const b: import("pkg", { with: {} }), Asserts2: invalid, ImportInterface: invalid; + + //// [/.src/out/other5.d.ts] + export type LocalInterface = import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: any; ++export declare const a: import("pkg", { assert: {} }).RequireInterface; ++export declare const b: import("pkg", { assert: {} }).ImportInterface; + + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts.diff new file mode 100644 index 0000000000000..bb50a769dea61 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts.diff @@ -0,0 +1,54 @@ +// [[Reason: TSC simplifies import type removing resolution-mode]] //// + +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,20 +1,20 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; ++export declare const a: import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface; ++export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; + + //// [/.src/out/other.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any; +-export declare const b: any; ++export declare const a: import("pkg", { with: {} }); ++export declare const b: import("pkg", { with: {} }); + + //// [/.src/out/other2.d.ts] + export type LocalInterface = import("pkg", { assert: { "bad": "require" } }).RequireInterface & import("pkg", { assert: { "bad": "import" } }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: any; ++export declare const a: import("pkg", { assert: { "bad": "require" } }).RequireInterface; ++export declare const b: import("pkg", { assert: { "bad": "import" } }).ImportInterface; + + //// [/.src/out/other3.d.ts] + export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +@@ -23,15 +23,15 @@ + export declare const b: invalid; + + //// [/.src/out/other4.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any, Asserts1: invalid, RequireInterface: invalid; +-export declare const b: any, Asserts2: invalid, ImportInterface: invalid; ++export declare const a: import("pkg", { with: {} }), Asserts1: invalid, RequireInterface: invalid; ++export declare const b: import("pkg", { with: {} }), Asserts2: invalid, ImportInterface: invalid; + + //// [/.src/out/other5.d.ts] + export type LocalInterface = import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; +-export declare const a: import("pkg").RequireInterface; +-export declare const b: any; ++export declare const a: import("pkg", { assert: {} }).RequireInterface; ++export declare const b: import("pkg", { assert: {} }).ImportInterface; + + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralComputedNameNoDeclarationError.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralComputedNameNoDeclarationError.d.ts.diff new file mode 100644 index 0000000000000..93e503ceca306 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralComputedNameNoDeclarationError.d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,7 +4,7 @@ + declare const Foo: { + BANANA: "banana"; + }; + export declare const Baa: { +- banana: number; ++ [Foo.BANANA]: number; + }; + export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseAssertEntriesError.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseAssertEntriesError.d.ts.diff new file mode 100644 index 0000000000000..72d1ae0f3140f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseAssertEntriesError.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TS resolves invalid types to any]] //// + +//// [tests/cases/compiler/parseAssertEntriesError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,10 +1,10 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { assert: {} }); +-export declare const a: any; +-export declare const b: any; ++export declare const a: import("pkg", { assert: {} }); ++export declare const b: import("pkg", { assert: {} }); + + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseImportAttributesError.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseImportAttributesError.d.ts.diff new file mode 100644 index 0000000000000..0ac364c55c429 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseImportAttributesError.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TS resolves invalid types to any]] //// + +//// [tests/cases/compiler/parseImportAttributesError.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,10 +1,10 @@ + + + //// [/.src/out/index.d.ts] + export type LocalInterface = import("pkg", { with: {} }); +-export declare const a: any; +-export declare const b: any; ++export declare const a: import("pkg", { with: {} }); ++export declare const b: import("pkg", { with: {} }); + + /// [Errors] //// + + error TS2468: Cannot find global value 'Promise'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff new file mode 100644 index 0000000000000..cfc6f34b5a363 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -42,13 +42,13 @@ + } + declare function f1({ a: string }: O): invalid; + declare const f2: ({ a: string }: O) => invalid; + declare const f3: ({ a: string, b, c }: O) => invalid; +-declare const f4: ({ a: string }: O) => string; +-declare const f5: ({ a: string, b, c }: O) => string; ++declare const f4: ({ a: string }: O) => typeof string; ++declare const f5: ({ a: string, b, c }: O) => typeof string; + declare const obj1: invalid; + declare const obj2: { +- method({ a: string }: O): string; ++ method({ a: string }: O): typeof string; + }; + declare function f6({ a: string }: O): invalid; + declare const f7: ({ a: string, b, c }: O) => invalid; + declare const f8: ({ "a": string }: O) => invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff new file mode 100644 index 0000000000000..89ff3124a63df --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff @@ -0,0 +1,52 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,33 +5,42 @@ + interface I { + } + export class C { + [Symbol.iterator]: I; ++ [Symbol.toPrimitive](x: I): invalid; + [Symbol.isConcatSpreadable](): I; +- get [Symbol.toPrimitive](): I; ++ get [Symbol.toPrimitive](): invalid; + set [Symbol.toPrimitive](x: I); + } + export {}; + } + + /// [Errors] //// + ++symbolDeclarationEmit12.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. ++symbolDeclarationEmit12.ts(9,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +-==== symbolDeclarationEmit12.ts (2 errors) ==== ++==== symbolDeclarationEmit12.ts (4 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9034 symbolDeclarationEmit12.ts:5:9: Add a return type to the method + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9032 symbolDeclarationEmit12.ts:9:13: Add a return type to the get accessor declaration. + set [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff new file mode 100644 index 0000000000000..445292c6b7b30 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/compiler/typeReferenceDirectives11.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,9 +7,8 @@ + export declare const bar: invalid; + + /// [Errors] //// + +-/mod1.ts(1,24): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + /mod2.ts(2,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + + ==== /mod2.ts (1 errors) ==== +@@ -21,9 +20,7 @@ + + ==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } + +-==== /mod1.ts (1 errors) ==== ++==== /mod1.ts (0 errors) ==== + export function foo(): Lib { return {x: 1} } +- ~~~ +-!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives13.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives13.d.ts.diff new file mode 100644 index 0000000000000..187bb232f922b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives13.d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: TSC removes type only import. DTE can't know import is type only.]] //// + +//// [tests/cases/compiler/typeReferenceDirectives13.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,8 @@ + + + //// [/app.d.ts] ++import { $ } from "./ref"; + export interface A { + x: () => typeof $; + } + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff new file mode 100644 index 0000000000000..5de344bdfb7c8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff @@ -0,0 +1,28 @@ +// [[Reason: TSC adds type reference directives.]] //// + +//// [tests/cases/compiler/typeReferenceDirectives2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,19 +3,4 @@ + //// [/app.d.ts] + interface A { + x: $; + } +- +-/// [Errors] //// +- +-/app.ts(2,8): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations +- +- +-==== /app.ts (1 errors) ==== +- interface A { +- x: $ +- ~ +-!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations +- } +-==== /types/lib/index.d.ts (0 errors) ==== +- interface $ { x } +- +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives5.d.ts.diff new file mode 100644 index 0000000000000..5aa769d11a251 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives5.d.ts.diff @@ -0,0 +1,16 @@ +// [[Reason: TSC removes type only import. DTE can't know import is type only.]] //// + +//// [tests/cases/compiler/typeReferenceDirectives5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,8 @@ + + + //// [/app.d.ts] ++import { $ } from "./ref"; + export interface A { + x: typeof $; + } + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff new file mode 100644 index 0000000000000..c2835fa154abf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: Requires adding a type reference directive that only TSC can detect]] //// + +//// [tests/cases/compiler/typeReferenceDirectives8.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,9 +7,8 @@ + export declare const bar: invalid; + + /// [Errors] //// + +-/mod1.ts(1,24): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + /mod2.ts(2,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + + ==== /mod2.ts (1 errors) ==== +@@ -20,9 +19,7 @@ + !!! related TS9027 /mod2.ts:2:14: Add a type annotation to the variable bar. + ==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } + +-==== /mod1.ts (1 errors) ==== ++==== /mod1.ts (0 errors) ==== + export function foo(): Lib { return {x: 1} } +- ~~~ +-!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts new file mode 100644 index 0000000000000..5433a1bcea4cb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts @@ -0,0 +1,166 @@ +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +//// [computedPropertiesNarrowed.ts] +const x: 0 | 1 = Math.random()? 0: 1; +declare function assert(n: number): asserts n is 1; +assert(x); +export let o = { + [x]: 1 // error narrow type !== declared type +} + + +const y: 0 = 0 +export let o2 = { + [y]: 1 // ok literal computed type +} + +// literals are ok +export let o3 = { [1]: 1 } +export let o31 = { [-1]: 1 } + +export let o32 = { [1-1]: 1 } // error number + +let u = Symbol(); +export let o4 = { + [u]: 1 // Should error, nut a unique symbol +} + +export let o5 ={ + [Symbol()]: 1 // Should error +} + +const uu: unique symbol = Symbol(); +export let o6 = { + [uu]: 1 // Should be ok +} + + +function foo (): 1 { return 1; } +export let o7 = { + [foo()]: 1 // Should error +}; + +let E = { A: 1 } as const +export const o8 = { + [E.A]: 1 // Fresh +} + +function ns() { return { v: 0 } as const } +export const o9 = { + [ns().v]: 1 +} + + +/// [Declarations] //// + + + +//// [computedPropertiesNarrowed.d.ts] +declare const x: 0 | 1; +export declare let o: { + [x]: number; +}; +declare const y: 0; +export declare let o2: { + [y]: number; +}; +export declare let o3: { + 1: number; +}; +export declare let o31: { + [-1]: number; +}; +export declare let o32: invalid; +declare let u: invalid; +export declare let o4: { + [u]: number; +}; +export declare let o5: invalid; +declare const uu: unique symbol; +export declare let o6: { + [uu]: number; +}; +export declare let o7: invalid; +declare let E: { + readonly A: 1; +}; +export declare const o8: { + [E.A]: number; +}; +export declare const o9: invalid; +export {}; + +/// [Errors] //// + +computedPropertiesNarrowed.ts(18,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(20,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +computedPropertiesNarrowed.ts(26,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(37,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + +==== computedPropertiesNarrowed.ts (5 errors) ==== + const x: 0 | 1 = Math.random()? 0: 1; + declare function assert(n: number): asserts n is 1; + assert(x); + export let o = { + [x]: 1 // error narrow type !== declared type + } + + + const y: 0 = 0 + export let o2 = { + [y]: 1 // ok literal computed type + } + + // literals are ok + export let o3 = { [1]: 1 } + export let o31 = { [-1]: 1 } + + export let o32 = { [1-1]: 1 } // error number + ~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:18:12: Add a type annotation to the variable o32. + + let u = Symbol(); + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:20:5: Add a type annotation to the variable u. + export let o4 = { + [u]: 1 // Should error, nut a unique symbol + } + + export let o5 ={ + [Symbol()]: 1 // Should error + ~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:25:12: Add a type annotation to the variable o5. + } + + const uu: unique symbol = Symbol(); + export let o6 = { + [uu]: 1 // Should be ok + } + + + function foo (): 1 { return 1; } + export let o7 = { + [foo()]: 1 // Should error + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:36:12: Add a type annotation to the variable o7. + }; + + let E = { A: 1 } as const + export const o8 = { + [E.A]: 1 // Fresh + } + + function ns() { return { v: 0 } as const } + export const o9 = { + [ns().v]: 1 + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:46:14: Add a type annotation to the variable o9. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts new file mode 100644 index 0000000000000..a1251bdc90968 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts @@ -0,0 +1,845 @@ +//// [tests/cases/compiler/correlatedUnions.ts] //// + +//// [correlatedUnions.ts] +// Various repros from #30581 + +type RecordMap = { n: number, s: string, b: boolean }; +type UnionRecord = { [P in K]: { + kind: P, + v: RecordMap[P], + f: (v: RecordMap[P]) => void +}}[K]; + +function processRecord(rec: UnionRecord) { + rec.f(rec.v); +} + +declare const r1: UnionRecord<'n'>; // { kind: 'n', v: number, f: (v: number) => void } +declare const r2: UnionRecord; // { kind: 'n', ... } | { kind: 's', ... } | { kind: 'b', ... } + +processRecord(r1); +processRecord(r2); +processRecord({ kind: 'n', v: 42, f: v => v.toExponential() }); + +// -------- + +type TextFieldData = { value: string } +type SelectFieldData = { options: string[], selectedValue: string } + +type FieldMap = { + text: TextFieldData; + select: SelectFieldData; +} + +type FormField = { type: K, data: FieldMap[K] }; + +type RenderFunc = (props: FieldMap[K]) => void; +type RenderFuncMap = { [K in keyof FieldMap]: RenderFunc }; + +function renderTextField(props: TextFieldData) {} +function renderSelectField(props: SelectFieldData) {} + +const renderFuncs: RenderFuncMap = { + text: renderTextField, + select: renderSelectField, +}; + +function renderField(field: FormField) { + const renderFn = renderFuncs[field.type]; + renderFn(field.data); +} + +// -------- + +type TypeMap = { + foo: string, + bar: number +}; + +type Keys = keyof TypeMap; + +type HandlerMap = { [P in Keys]: (x: TypeMap[P]) => void }; + +const handlers: HandlerMap = { + foo: s => s.length, + bar: n => n.toFixed(2) +}; + +type DataEntry = { [P in K]: { + type: P, + data: TypeMap[P] +}}[K]; + +const data: DataEntry[] = [ + { type: 'foo', data: 'abc' }, + { type: 'foo', data: 'def' }, + { type: 'bar', data: 42 }, +]; + +function process(data: DataEntry[]) { + data.forEach(block => { + if (block.type in handlers) { + handlers[block.type](block.data) + } + }); +} + +process(data); +process([{ type: 'foo', data: 'abc' }]); + +// -------- + +type LetterMap = { A: string, B: number } +type LetterCaller = { [P in K]: { letter: Record, caller: (x: Record) => void } }[K]; + +function call({ letter, caller }: LetterCaller): void { + caller(letter); +} + +type A = { A: string }; +type B = { B: number }; +type ACaller = (a: A) => void; +type BCaller = (b: B) => void; + +declare const xx: { letter: A, caller: ACaller } | { letter: B, caller: BCaller }; + +call(xx); + +// -------- + +type Ev = { [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; +}}[K]; + +function processEvents(events: Ev[]) { + for (const event of events) { + document.addEventListener(event.name, (ev) => event.callback(ev), { once: event.once }); + } +} + +function createEventListener({ name, once = false, callback }: Ev): Ev { + return { name, once, callback }; +} + +const clickEvent = createEventListener({ + name: "click", + callback: ev => console.log(ev), +}); + +const scrollEvent = createEventListener({ + name: "scroll", + callback: ev => console.log(ev), +}); + +processEvents([clickEvent, scrollEvent]); + +processEvents([ + { name: "click", callback: ev => console.log(ev) }, + { name: "scroll", callback: ev => console.log(ev) }, +]); + +// -------- + +function ff1() { + type ArgMap = { + sum: [a: number, b: number], + concat: [a: string, b: string, c: string] + } + type Keys = keyof ArgMap; + const funs: { [P in Keys]: (...args: ArgMap[P]) => void } = { + sum: (a, b) => a + b, + concat: (a, b, c) => a + b + c + } + function apply(funKey: K, ...args: ArgMap[K]) { + const fn = funs[funKey]; + fn(...args); + } + const x1 = apply('sum', 1, 2) + const x2 = apply('concat', 'str1', 'str2', 'str3' ) +} + +// Repro from #47368 + +type ArgMap = { a: number, b: string }; +type Func = (x: ArgMap[K]) => void; +type Funcs = { [K in keyof ArgMap]: Func }; + +function f1(funcs: Funcs, key: K, arg: ArgMap[K]) { + funcs[key](arg); +} + +function f2(funcs: Funcs, key: K, arg: ArgMap[K]) { + const func = funcs[key]; // Type Funcs[K] + func(arg); +} + +function f3(funcs: Funcs, key: K, arg: ArgMap[K]) { + const func: Func = funcs[key]; + func(arg); +} + +function f4(x: Funcs[keyof ArgMap], y: Funcs[K]) { + x = y; +} + +// Repro from #47890 + +interface MyObj { + someKey: { + name: string; + } + someOtherKey: { + name: number; + } +} + +const ref: MyObj = { + someKey: { name: "" }, + someOtherKey: { name: 42 } +}; + +function func(k: K): MyObj[K]['name'] | undefined { + const myObj: Partial[K] = ref[k]; + if (myObj) { + return myObj.name; + } + const myObj2: Partial[keyof MyObj] = ref[k]; + if (myObj2) { + return myObj2.name; + } + return undefined; +} + +// Repro from #48157 + +interface Foo { + bar?: string +} + +function foo(prop: T, f: Required) { + bar(f[prop]); +} + +declare function bar(t: string): void; + +// Repro from #48246 + +declare function makeCompleteLookupMapping, Attr extends keyof T[number]>( + ops: T, attr: Attr): { [Item in T[number]as Item[Attr]]: Item }; + +const ALL_BARS = [{ name: 'a'}, {name: 'b'}] as const; + +const BAR_LOOKUP = makeCompleteLookupMapping(ALL_BARS, 'name'); + +type BarLookup = typeof BAR_LOOKUP; + +type Baz = { [K in keyof BarLookup]: BarLookup[K]['name'] }; + +// repro from #43982 + +interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; +} +type KeyOfOriginal = keyof Original; +type NestedKeyOfOriginalFor = keyof Original[T]; + +type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; +}; + +type MappedFromOriginal = SameKeys; + +const getStringAndNumberFromOriginalAndMapped = < + K extends KeyOfOriginal, + N extends NestedKeyOfOriginalFor +>( + original: Original, + mappedFromOriginal: MappedFromOriginal, + key: K, + nestedKey: N +): [Original[K][N], MappedFromOriginal[K][N]] => { + return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]]; +}; + +// repro from #31675 +interface Config { + string: string; + number: number; +} + +function getConfigOrDefault( + userConfig: Partial, + key: T, + defaultValue: Config[T] +): Config[T] { + const userValue = userConfig[key]; + const assertedCheck = userValue ? userValue! : defaultValue; + return assertedCheck; +} + +// repro from #47523 + +type Foo1 = { + x: number; + y: string; +}; + +function getValueConcrete( + o: Partial, + k: K +): Foo1[K] | undefined { + return o[k]; +} + + +/// [Declarations] //// + + + +//// [correlatedUnions.d.ts] +type RecordMap = { + n: number; + s: string; + b: boolean; +}; +type UnionRecord = { + [P in K]: { + kind: P; + v: RecordMap[P]; + f: (v: RecordMap[P]) => void; + }; +}[K]; +declare function processRecord(rec: UnionRecord): invalid; +declare const r1: UnionRecord<'n'>; +declare const r2: UnionRecord; +type TextFieldData = { + value: string; +}; +type SelectFieldData = { + options: string[]; + selectedValue: string; +}; +type FieldMap = { + text: TextFieldData; + select: SelectFieldData; +}; +type FormField = { + type: K; + data: FieldMap[K]; +}; +type RenderFunc = (props: FieldMap[K]) => void; +type RenderFuncMap = { + [K in keyof FieldMap]: RenderFunc; +}; +declare function renderTextField(props: TextFieldData): invalid; +declare function renderSelectField(props: SelectFieldData): invalid; +declare const renderFuncs: RenderFuncMap; +declare function renderField(field: FormField): invalid; +type TypeMap = { + foo: string; + bar: number; +}; +type Keys = keyof TypeMap; +type HandlerMap = { + [P in Keys]: (x: TypeMap[P]) => void; +}; +declare const handlers: HandlerMap; +type DataEntry = { + [P in K]: { + type: P; + data: TypeMap[P]; + }; +}[K]; +declare const data: DataEntry[]; +declare function process(data: DataEntry[]): invalid; +type LetterMap = { + A: string; + B: number; +}; +type LetterCaller = { + [P in K]: { + letter: Record; + caller: (x: Record) => void; + }; +}[K]; +declare function call({ letter, caller }: LetterCaller): void; +type A = { + A: string; +}; +type B = { + B: number; +}; +type ACaller = (a: A) => void; +type BCaller = (b: B) => void; +declare const xx: { + letter: A; + caller: ACaller; +} | { + letter: B; + caller: BCaller; +}; +type Ev = { + [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; + }; +}[K]; +declare function processEvents(events: Ev[]): invalid; +declare function createEventListener({ name, once, callback }: Ev): Ev; +declare const clickEvent: invalid; +declare const scrollEvent: invalid; +declare function ff1(): invalid; +type ArgMap = { + a: number; + b: string; +}; +type Func = (x: ArgMap[K]) => void; +type Funcs = { + [K in keyof ArgMap]: Func; +}; +declare function f1(funcs: Funcs, key: K, arg: ArgMap[K]): invalid; +declare function f2(funcs: Funcs, key: K, arg: ArgMap[K]): invalid; +declare function f3(funcs: Funcs, key: K, arg: ArgMap[K]): invalid; +declare function f4(x: Funcs[keyof ArgMap], y: Funcs[K]): invalid; +interface MyObj { + someKey: { + name: string; + }; + someOtherKey: { + name: number; + }; +} +declare const ref: MyObj; +declare function func(k: K): MyObj[K]['name'] | undefined; +interface Foo { + bar?: string; +} +declare function foo(prop: T, f: Required): invalid; +declare function bar(t: string): void; +declare function makeCompleteLookupMapping, Attr extends keyof T[number]>(ops: T, attr: Attr): { + [Item in T[number] as Item[Attr]]: Item; +}; +declare const ALL_BARS: readonly [{ + readonly name: "a"; +}, { + readonly name: "b"; +}]; +declare const BAR_LOOKUP: invalid; +type BarLookup = typeof BAR_LOOKUP; +type Baz = { + [K in keyof BarLookup]: BarLookup[K]['name']; +}; +interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; +} +type KeyOfOriginal = keyof Original; +type NestedKeyOfOriginalFor = keyof Original[T]; +type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; +}; +type MappedFromOriginal = SameKeys; +declare const getStringAndNumberFromOriginalAndMapped: >(original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]; +interface Config { + string: string; + number: number; +} +declare function getConfigOrDefault(userConfig: Partial, key: T, defaultValue: Config[T]): Config[T]; +type Foo1 = { + x: number; + y: string; +}; +declare function getValueConcrete(o: Partial, k: K): Foo1[K] | undefined; + +/// [Errors] //// + +correlatedUnions.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(36,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(37,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(44,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(76,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(113,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(123,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +correlatedUnions.ts(128,21): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +correlatedUnions.ts(142,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(166,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(170,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(175,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(180,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(218,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== correlatedUnions.ts (15 errors) ==== + // Various repros from #30581 + + type RecordMap = { n: number, s: string, b: boolean }; + type UnionRecord = { [P in K]: { + kind: P, + v: RecordMap[P], + f: (v: RecordMap[P]) => void + }}[K]; + + function processRecord(rec: UnionRecord) { + ~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:10:10: Add a return type to the function declaration. + rec.f(rec.v); + } + + declare const r1: UnionRecord<'n'>; // { kind: 'n', v: number, f: (v: number) => void } + declare const r2: UnionRecord; // { kind: 'n', ... } | { kind: 's', ... } | { kind: 'b', ... } + + processRecord(r1); + processRecord(r2); + processRecord({ kind: 'n', v: 42, f: v => v.toExponential() }); + + // -------- + + type TextFieldData = { value: string } + type SelectFieldData = { options: string[], selectedValue: string } + + type FieldMap = { + text: TextFieldData; + select: SelectFieldData; + } + + type FormField = { type: K, data: FieldMap[K] }; + + type RenderFunc = (props: FieldMap[K]) => void; + type RenderFuncMap = { [K in keyof FieldMap]: RenderFunc }; + + function renderTextField(props: TextFieldData) {} + ~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:36:10: Add a return type to the function declaration. + function renderSelectField(props: SelectFieldData) {} + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:37:10: Add a return type to the function declaration. + + const renderFuncs: RenderFuncMap = { + text: renderTextField, + select: renderSelectField, + }; + + function renderField(field: FormField) { + ~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:44:10: Add a return type to the function declaration. + const renderFn = renderFuncs[field.type]; + renderFn(field.data); + } + + // -------- + + type TypeMap = { + foo: string, + bar: number + }; + + type Keys = keyof TypeMap; + + type HandlerMap = { [P in Keys]: (x: TypeMap[P]) => void }; + + const handlers: HandlerMap = { + foo: s => s.length, + bar: n => n.toFixed(2) + }; + + type DataEntry = { [P in K]: { + type: P, + data: TypeMap[P] + }}[K]; + + const data: DataEntry[] = [ + { type: 'foo', data: 'abc' }, + { type: 'foo', data: 'def' }, + { type: 'bar', data: 42 }, + ]; + + function process(data: DataEntry[]) { + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:76:10: Add a return type to the function declaration. + data.forEach(block => { + if (block.type in handlers) { + handlers[block.type](block.data) + } + }); + } + + process(data); + process([{ type: 'foo', data: 'abc' }]); + + // -------- + + type LetterMap = { A: string, B: number } + type LetterCaller = { [P in K]: { letter: Record, caller: (x: Record) => void } }[K]; + + function call({ letter, caller }: LetterCaller): void { + caller(letter); + } + + type A = { A: string }; + type B = { B: number }; + type ACaller = (a: A) => void; + type BCaller = (b: B) => void; + + declare const xx: { letter: A, caller: ACaller } | { letter: B, caller: BCaller }; + + call(xx); + + // -------- + + type Ev = { [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; + }}[K]; + + function processEvents(events: Ev[]) { + ~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:113:10: Add a return type to the function declaration. + for (const event of events) { + document.addEventListener(event.name, (ev) => event.callback(ev), { once: event.once }); + } + } + + function createEventListener({ name, once = false, callback }: Ev): Ev { + return { name, once, callback }; + } + + const clickEvent = createEventListener({ + ~~~~~~~~~~~~~~~~~~~~~ + name: "click", + ~~~~~~~~~~~~~~~~~~ + callback: ev => console.log(ev), + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 correlatedUnions.ts:123:7: Add a type annotation to the variable clickEvent. + + const scrollEvent = createEventListener({ + ~~~~~~~~~~~~~~~~~~~~~ + name: "scroll", + ~~~~~~~~~~~~~~~~~~~ + callback: ev => console.log(ev), + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 correlatedUnions.ts:128:7: Add a type annotation to the variable scrollEvent. + + processEvents([clickEvent, scrollEvent]); + + processEvents([ + { name: "click", callback: ev => console.log(ev) }, + { name: "scroll", callback: ev => console.log(ev) }, + ]); + + // -------- + + function ff1() { + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:142:10: Add a return type to the function declaration. + type ArgMap = { + sum: [a: number, b: number], + concat: [a: string, b: string, c: string] + } + type Keys = keyof ArgMap; + const funs: { [P in Keys]: (...args: ArgMap[P]) => void } = { + sum: (a, b) => a + b, + concat: (a, b, c) => a + b + c + } + function apply(funKey: K, ...args: ArgMap[K]) { + const fn = funs[funKey]; + fn(...args); + } + const x1 = apply('sum', 1, 2) + const x2 = apply('concat', 'str1', 'str2', 'str3' ) + } + + // Repro from #47368 + + type ArgMap = { a: number, b: string }; + type Func = (x: ArgMap[K]) => void; + type Funcs = { [K in keyof ArgMap]: Func }; + + function f1(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:166:10: Add a return type to the function declaration. + funcs[key](arg); + } + + function f2(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:170:10: Add a return type to the function declaration. + const func = funcs[key]; // Type Funcs[K] + func(arg); + } + + function f3(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:175:10: Add a return type to the function declaration. + const func: Func = funcs[key]; + func(arg); + } + + function f4(x: Funcs[keyof ArgMap], y: Funcs[K]) { + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:180:10: Add a return type to the function declaration. + x = y; + } + + // Repro from #47890 + + interface MyObj { + someKey: { + name: string; + } + someOtherKey: { + name: number; + } + } + + const ref: MyObj = { + someKey: { name: "" }, + someOtherKey: { name: 42 } + }; + + function func(k: K): MyObj[K]['name'] | undefined { + const myObj: Partial[K] = ref[k]; + if (myObj) { + return myObj.name; + } + const myObj2: Partial[keyof MyObj] = ref[k]; + if (myObj2) { + return myObj2.name; + } + return undefined; + } + + // Repro from #48157 + + interface Foo { + bar?: string + } + + function foo(prop: T, f: Required) { + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:218:10: Add a return type to the function declaration. + bar(f[prop]); + } + + declare function bar(t: string): void; + + // Repro from #48246 + + declare function makeCompleteLookupMapping, Attr extends keyof T[number]>( + ops: T, attr: Attr): { [Item in T[number]as Item[Attr]]: Item }; + + const ALL_BARS = [{ name: 'a'}, {name: 'b'}] as const; + + const BAR_LOOKUP = makeCompleteLookupMapping(ALL_BARS, 'name'); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 correlatedUnions.ts:231:7: Add a type annotation to the variable BAR_LOOKUP. + + type BarLookup = typeof BAR_LOOKUP; + + type Baz = { [K in keyof BarLookup]: BarLookup[K]['name'] }; + + // repro from #43982 + + interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; + } + type KeyOfOriginal = keyof Original; + type NestedKeyOfOriginalFor = keyof Original[T]; + + type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; + }; + + type MappedFromOriginal = SameKeys; + + const getStringAndNumberFromOriginalAndMapped = < + K extends KeyOfOriginal, + N extends NestedKeyOfOriginalFor + >( + original: Original, + mappedFromOriginal: MappedFromOriginal, + key: K, + nestedKey: N + ): [Original[K][N], MappedFromOriginal[K][N]] => { + return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]]; + }; + + // repro from #31675 + interface Config { + string: string; + number: number; + } + + function getConfigOrDefault( + userConfig: Partial, + key: T, + defaultValue: Config[T] + ): Config[T] { + const userValue = userConfig[key]; + const assertedCheck = userValue ? userValue! : defaultValue; + return assertedCheck; + } + + // repro from #47523 + + type Foo1 = { + x: number; + y: string; + }; + + function getValueConcrete( + o: Partial, + k: K + ): Foo1[K] | undefined { + return o[k]; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts new file mode 100644 index 0000000000000..9bc2cec5999e1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// + +//// [index.ts] +class Src implements NS.Dep { } + +//// [dep.d.ts] +declare namespace NS { + interface Dep { + } +} +//// [package.json] +{ + "typings": "dep.d.ts" +} + +/// [Declarations] //// + + + +//// [/src/index.d.ts] +declare class Src implements NS.Dep { +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitNoNonRequiredParens.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitNoNonRequiredParens.d.ts new file mode 100644 index 0000000000000..858887bd4cfec --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitNoNonRequiredParens.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitNoNonRequiredParens.ts] //// + +//// [declarationEmitNoNonRequiredParens.ts] +export enum Test { + A, B, C +} + +export type TestType = typeof Test; + +export const bar = (null as TestType[Extract][]); + +/// [Declarations] //// + + + +//// [declarationEmitNoNonRequiredParens.d.ts] +export declare enum Test { + A = 0, + B = 1, + C = 2 +} +export type TestType = typeof Test; +export declare const bar: TestType[Extract][]; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitObjectLiteralAccessors1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitObjectLiteralAccessors1.d.ts new file mode 100644 index 0000000000000..105ec26fb37c3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitObjectLiteralAccessors1.d.ts @@ -0,0 +1,61 @@ +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + +//// [declarationEmitObjectLiteralAccessors1.ts] +// same type accessors +export const obj1 = { + /** my awesome getter (first in source order) */ + get x(): string { + return ""; + }, + /** my awesome setter (second in source order) */ + set x(a: string) {}, +}; + +// divergent accessors +export const obj2 = { + /** my awesome getter */ + get x(): string { + return ""; + }, + /** my awesome setter */ + set x(a: number) {}, +}; + +export const obj3 = { + /** my awesome getter */ + get x(): string { + return ""; + }, +}; + +export const obj4 = { + /** my awesome setter */ + set x(a: number) {}, +}; + + +/// [Declarations] //// + + + +//// [declarationEmitObjectLiteralAccessors1.d.ts] +export declare const obj1: { + /** my awesome getter (first in source order) */ + get x(): string; + /** my awesome setter (second in source order) */ + set x(a: string); +}; +export declare const obj2: { + /** my awesome getter */ + get x(): string; + /** my awesome setter */ + set x(a: number); +}; +export declare const obj3: { + /** my awesome getter */ + readonly x: string; +}; +export declare const obj4: { + /** my awesome setter */ + x: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitPropertyNumericStringKey.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitPropertyNumericStringKey.d.ts new file mode 100644 index 0000000000000..59e0678f617ea --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitPropertyNumericStringKey.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts] //// + +//// [declarationEmitPropertyNumericStringKey.ts] +// https://github.com/microsoft/TypeScript/issues/55292 + +const STATUS = { + ["404"]: "not found", +} as const; + +const hundredStr = "100"; +const obj = { [hundredStr]: "foo" }; + +const hundredNum = 100; +const obj2 = { [hundredNum]: "bar" }; + + +/// [Declarations] //// + + + +//// [declarationEmitPropertyNumericStringKey.d.ts] +declare const STATUS: { + readonly "404": "not found"; +}; +declare const hundredStr = "100"; +declare const obj: { + [hundredStr]: string; +}; +declare const hundredNum = 100; +declare const obj2: { + [hundredNum]: string; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitShadowingInferNotRenamed.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitShadowingInferNotRenamed.d.ts new file mode 100644 index 0000000000000..be92bf380298f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitShadowingInferNotRenamed.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts] //// + +//// [declarationEmitShadowingInferNotRenamed.ts] +// Any instance type +type Client = string + +// Modified instance +type UpdatedClient = C & {foo: number} + +export const createClient = < + D extends + | (new (...args: any[]) => Client) // accept class + | Record Client> // or map of classes +>( + clientDef: D +): D extends new (...args: any[]) => infer C + ? UpdatedClient // return instance + : { + [K in keyof D]: D[K] extends new (...args: any[]) => infer C // or map of instances respectively + ? UpdatedClient + : never + } => { + return null as any +} + +/// [Declarations] //// + + + +//// [declarationEmitShadowingInferNotRenamed.d.ts] +type Client = string; +type UpdatedClient = C & { + foo: number; +}; +export declare const createClient: Client) | Record Client>>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { + [K in keyof D]: D[K] extends new (...args: any[]) => infer C ? UpdatedClient : never; +}; +export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts new file mode 100644 index 0000000000000..362bad0a66d40 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts] //// + +//// [other.ts] +type Experiment = { + name: Name; +}; +declare const createExperiment: ( + options: Experiment +) => Experiment; +export default createExperiment({ + name: "foo" +}); + +//// [main.ts] +import other from "./other"; +export const obj = { + [other.name]: 1, +}; + +/// [Declarations] //// + + + +//// [main.d.ts] +import other from "./other"; +export declare const obj: { + [other.name]: number; +}; + +//// [other.d.ts] +declare const _default: invalid; +export default _default; + +/// [Errors] //// + +other.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. + + +==== other.ts (1 errors) ==== + type Experiment = { + name: Name; + }; + declare const createExperiment: ( + options: Experiment + ) => Experiment; + export default createExperiment({ + ~~~~~~~~~~~~~~~~~~ + name: "foo" + ~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. +!!! related TS9036 other.ts:7:1: Move the expression in default export to a variable and add a type annotation to it. + +==== main.ts (0 errors) ==== + import other from "./other"; + export const obj = { + [other.name]: 1, + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts new file mode 100644 index 0000000000000..8dcaff87a2ebe --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts] //// + +//// [other.ts] +type Experiment = { + name: Name; +}; +declare const createExperiment: ( + options: Experiment +) => Experiment; +export default createExperiment({ + name: "foo" +}); + +//// [main.ts] +import * as other2 from "./other"; +export const obj = { + [other2.default.name]: 1 +}; + +/// [Declarations] //// + + + +//// [main.d.ts] +import * as other2 from "./other"; +export declare const obj: { + [other2.default.name]: number; +}; + +//// [other.d.ts] +declare const _default: invalid; +export default _default; + +/// [Errors] //// + +other.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. + + +==== other.ts (1 errors) ==== + type Experiment = { + name: Name; + }; + declare const createExperiment: ( + options: Experiment + ) => Experiment; + export default createExperiment({ + ~~~~~~~~~~~~~~~~~~ + name: "foo" + ~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. +!!! related TS9036 other.ts:7:1: Move the expression in default export to a variable and add a type annotation to it. + +==== main.ts (0 errors) ==== + import * as other2 from "./other"; + export const obj = { + [other2.default.name]: 1 + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts new file mode 100644 index 0000000000000..ec6d6b4f94382 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// + +//// [index.d.ts] +interface Error2 { + stack2: string; +} + +//// [app.ts] +function foo(): Error2 { + return undefined; +} + +/// [Declarations] //// + + + +//// [/app.d.ts] +declare function foo(): Error2; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/duplicatePropertiesInTypeAssertions01.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicatePropertiesInTypeAssertions01.d.ts new file mode 100644 index 0000000000000..8e1a0d16f28eb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/duplicatePropertiesInTypeAssertions01.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts] //// + +//// [duplicatePropertiesInTypeAssertions01.ts] +let x = <{a: number; a: number}>{}; + +/// [Declarations] //// + + + +//// [duplicatePropertiesInTypeAssertions01.d.ts] +declare let x: { + a: number; + a: number; +}; + +/// [Errors] //// + +duplicatePropertiesInTypeAssertions01.ts(1,11): error TS2300: Duplicate identifier 'a'. +duplicatePropertiesInTypeAssertions01.ts(1,22): error TS2300: Duplicate identifier 'a'. + + +==== duplicatePropertiesInTypeAssertions01.ts (2 errors) ==== + let x = <{a: number; a: number}>{}; + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/duplicatePropertiesInTypeAssertions02.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicatePropertiesInTypeAssertions02.d.ts new file mode 100644 index 0000000000000..1e41ebab19584 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/duplicatePropertiesInTypeAssertions02.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts] //// + +//// [duplicatePropertiesInTypeAssertions02.ts] +let x = {} as {a: number; a: number}; + +/// [Declarations] //// + + + +//// [duplicatePropertiesInTypeAssertions02.d.ts] +declare let x: { + a: number; + a: number; +}; + +/// [Errors] //// + +duplicatePropertiesInTypeAssertions02.ts(1,16): error TS2300: Duplicate identifier 'a'. +duplicatePropertiesInTypeAssertions02.ts(1,27): error TS2300: Duplicate identifier 'a'. + + +==== duplicatePropertiesInTypeAssertions02.ts (2 errors) ==== + let x = {} as {a: number; a: number}; + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts new file mode 100644 index 0000000000000..44222ff3e0340 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts @@ -0,0 +1,370 @@ +//// [tests/cases/compiler/dynamicNames.ts] //// + +//// [module.ts] +export const c0 = "a"; +export const c1 = 1; +export const s0 = Symbol(); +export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T2 extends T1 { +} +export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; +}; + +//// [main.ts] +import { c0, c1, s0, T0, T1, T2, T3 } from "./module"; +import * as M from "./module"; + +namespace N { + export const c2 = "a"; + export const c3 = 1; + export const s1: typeof s0 = s0; + + export interface T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T5 implements T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T6 extends T5 { + } + export declare type T7 = { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + }; +} + +export const c4 = "a"; +export const c5 = 1; +export const s2: typeof s0 = s0; + +interface T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; +} +declare class T9 implements T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; +} +declare class T10 extends T9 { +} +declare type T11 = { + [c4]: number; + [c5]: string; + [s2]: boolean; +}; + +interface T12 { + a: number; + 1: string; + [s2]: boolean; +} +declare class T13 implements T2 { + a: number; + 1: string; + [s2]: boolean; +} +declare class T14 extends T13 { +} +declare type T15 = { + a: number; + 1: string; + [s2]: boolean; +}; + +declare class C { + static a: number; + static 1: string; + static [s2]: boolean; +} + +let t0: T0; +let t1: T1; +let t2: T2; +let t3: T3; +let t0_1: M.T0; +let t1_1: M.T1; +let t2_1: M.T2; +let t3_1: M.T3; +let t4: N.T4; +let t5: N.T5; +let t6: N.T6; +let t7: N.T7; +let t8: T8; +let t9: T9; +let t10: T10; +let t11: T11; +let t12: T12; +let t13: T13; +let t14: T14; +let t15: T15; + +// assignability +t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2; +t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6; +t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0; +t0 = C; // static side + +// object literals +export const o1 = { + [c4]: 1, + [c5]: "a", + [s2]: true +}; + +// check element access types +export const o1_c4 = o1[c4]; +export const o1_c5 = o1[c5]; +export const o1_s2 = o1[s2]; + +export const o2: T0 = o1; + +// recursive declarations +// (type parameter indirection courtesy of #20400) +declare const rI: RI<"a">; +rI.x +interface RI { + x: T; + [rI.x]: "b"; +} + +declare const rC: RC<"a">; +rC.x +declare class RC { + x: T; + [rC.x]: "b"; +} + + +/// [Declarations] //// + + + +//// [main.d.ts] +import { s0, T0 } from "./module"; +export declare const c4 = "a"; +export declare const c5 = 1; +export declare const s2: typeof s0; +export declare const o1: { + [c4]: number; + [c5]: string; + [s2]: boolean; +}; +export declare const o1_c4: invalid; +export declare const o1_c5: invalid; +export declare const o1_s2: invalid; +export declare const o2: T0; + +//// [module.d.ts] +export declare const c0 = "a"; +export declare const c1 = 1; +export declare const s0: invalid; +export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T2 extends T1 { +} +export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; +}; + +/// [Errors] //// + +main.ts(109,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +main.ts(110,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +main.ts(111,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +module.ts(3,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== module.ts (1 errors) ==== + export const c0 = "a"; + export const c1 = 1; + export const s0 = Symbol(); + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 module.ts:3:14: Add a type annotation to the variable s0. + export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; + } + export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; + } + export declare class T2 extends T1 { + } + export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; + }; + +==== main.ts (3 errors) ==== + import { c0, c1, s0, T0, T1, T2, T3 } from "./module"; + import * as M from "./module"; + + namespace N { + export const c2 = "a"; + export const c3 = 1; + export const s1: typeof s0 = s0; + + export interface T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T5 implements T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T6 extends T5 { + } + export declare type T7 = { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + }; + } + + export const c4 = "a"; + export const c5 = 1; + export const s2: typeof s0 = s0; + + interface T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; + } + declare class T9 implements T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; + } + declare class T10 extends T9 { + } + declare type T11 = { + [c4]: number; + [c5]: string; + [s2]: boolean; + }; + + interface T12 { + a: number; + 1: string; + [s2]: boolean; + } + declare class T13 implements T2 { + a: number; + 1: string; + [s2]: boolean; + } + declare class T14 extends T13 { + } + declare type T15 = { + a: number; + 1: string; + [s2]: boolean; + }; + + declare class C { + static a: number; + static 1: string; + static [s2]: boolean; + } + + let t0: T0; + let t1: T1; + let t2: T2; + let t3: T3; + let t0_1: M.T0; + let t1_1: M.T1; + let t2_1: M.T2; + let t3_1: M.T3; + let t4: N.T4; + let t5: N.T5; + let t6: N.T6; + let t7: N.T7; + let t8: T8; + let t9: T9; + let t10: T10; + let t11: T11; + let t12: T12; + let t13: T13; + let t14: T14; + let t15: T15; + + // assignability + t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2; + t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6; + t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0; + t0 = C; // static side + + // object literals + export const o1 = { + [c4]: 1, + [c5]: "a", + [s2]: true + }; + + // check element access types + export const o1_c4 = o1[c4]; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:109:14: Add a type annotation to the variable o1_c4. + export const o1_c5 = o1[c5]; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:110:14: Add a type annotation to the variable o1_c5. + export const o1_s2 = o1[s2]; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:111:14: Add a type annotation to the variable o1_s2. + + export const o2: T0 = o1; + + // recursive declarations + // (type parameter indirection courtesy of #20400) + declare const rI: RI<"a">; + rI.x + interface RI { + x: T; + [rI.x]: "b"; + } + + declare const rC: RC<"a">; + rC.x + declare class RC { + x: T; + [rC.x]: "b"; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts new file mode 100644 index 0000000000000..8695f728c49e1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts @@ -0,0 +1,2816 @@ +//// [tests/cases/compiler/giant.ts] //// + +//// [giant.ts] +/* + Prefixes + p -> public + r -> private + i -> import + e -> export + a -> ambient + t -> static + s -> set + g -> get + + MAX DEPTH 3 LEVELS +*/ +var V; +function F() { }; +class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() +} +interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; +} +module M { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export declare module eaM { + var V; + function F() { }; + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + } +} +export var eV; +export function eF() { }; +export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() +} +export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; +} +export module eM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export declare module eaM { + var V; + function F() { }; + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + } +} +export declare var eaV; +export declare function eaF() { }; +export declare class eaC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() +} +export declare module eaM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + static tV; + static tF() { } + } + interface I { + //Call Signature + (); + (): number; + (p: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV + export declare function eaF() { }; + export declare class eaC { } + export declare module eaM { } + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + static tV + static tF() { } + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + export module eM { + var V; + function F() { }; + class C { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + } +} + +/// [Declarations] //// + + + +//// [giant.d.ts] +export declare var eV: invalid; +export declare function eF(): invalid; +export declare class eC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + private rF; + pgF(): invalid; + get pgF(): invalid; + psF(param: any): invalid; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: invalid; + static tF(): invalid; + static tsF(param: any): invalid; + static set tsF(param: any); + static tgF(): invalid; + static get tgF(): invalid; +} +export interface eI { + (): any; + (): number; + (p: invalid): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7(pa1: invalid, pa2: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; +} +export declare namespace eM { + var eV: invalid; + function eF(): invalid; + class eC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + private rF; + pgF(): invalid; + get pgF(): invalid; + psF(param: any): invalid; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: invalid; + static tF(): invalid; + static tsF(param: any): invalid; + static set tsF(param: any); + static tgF(): invalid; + static get tgF(): invalid; + } + interface eI { + (): any; + (): number; + (p: invalid): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7(pa1: invalid, pa2: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; + } + namespace eM { + var eV: invalid; + function eF(): invalid; + class eC { + } + interface eI { + } + namespace eM { } + var eaV: invalid; + function eaF(): invalid; + class eaC { + } + namespace eaM { } + } + var eaV: invalid; + function eaF(): invalid; + class eaC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + private rF; + pgF(): invalid; + get pgF(): invalid; + psF(param: any): invalid; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: invalid; + static tF(): invalid; + static tsF(param: any): invalid; + static set tsF(param: any); + static tgF(): invalid; + static get tgF(): invalid; + } + namespace eaM { + var V: invalid; + function F(): invalid; + class C { + } + interface I { + } + namespace M { } + var eV: invalid; + function eF(): invalid; + class eC { + } + interface eI { + } + namespace eM { } + } +} +export declare var eaV: invalid; +export declare function eaF(): invalid; +export declare class eaC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + private rF; + pgF(): invalid; + get pgF(): invalid; + psF(param: any): invalid; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: invalid; + static tF(): invalid; + static tsF(param: any): invalid; + static set tsF(param: any); + static tgF(): invalid; + static get tgF(): invalid; +} +export declare namespace eaM { + var V: invalid; + function F(): invalid; + class C { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + static tV: invalid; + static tF(): invalid; + } + interface I { + (): any; + (): number; + (p: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7(pa1: invalid, pa2: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; + } + namespace M { + var V: invalid; + function F(): invalid; + class C { + } + interface I { + } + namespace M { } + var eV: invalid; + function eF(): invalid; + class eC { + } + interface eI { + } + namespace eM { } + var eaV: invalid; + function eaF(): invalid; + class eaC { + } + namespace eaM { } + } + var eV: invalid; + function eF(): invalid; + class eC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + static tV: invalid; + static tF(): invalid; + } + interface eI { + (): any; + (): number; + (p: invalid): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7(pa1: invalid, pa2: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; + } + namespace eM { + var V: invalid; + function F(): invalid; + class C { + } + namespace M { } + var eV: invalid; + function eF(): invalid; + class eC { + } + interface eI { + } + namespace eM { } + } +} + +/// [Errors] //// + +giant.ts(22,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(23,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(23,20): error TS1005: '{' expected. +giant.ts(24,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(25,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(25,29): error TS1005: '{' expected. +giant.ts(26,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(27,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(27,21): error TS1005: '{' expected. +giant.ts(28,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(29,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(29,30): error TS1005: '{' expected. +giant.ts(32,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(33,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(33,29): error TS1005: '{' expected. +giant.ts(34,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(35,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(35,20): error TS1005: '{' expected. +giant.ts(60,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(60,6): error TS2304: Cannot find name 'p'. +giant.ts(61,5): error TS1021: An index signature must have a type annotation. +giant.ts(62,6): error TS1096: An index signature must have exactly one parameter. +giant.ts(75,5): error TS2386: Overload signatures must all be optional or required. +giant.ts(86,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(87,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(87,24): error TS1005: '{' expected. +giant.ts(88,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(89,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(89,33): error TS1005: '{' expected. +giant.ts(90,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(91,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(91,25): error TS1005: '{' expected. +giant.ts(92,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(93,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(93,34): error TS1005: '{' expected. +giant.ts(96,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(97,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(97,33): error TS1005: '{' expected. +giant.ts(98,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(99,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(99,24): error TS1005: '{' expected. +giant.ts(124,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(124,10): error TS2304: Cannot find name 'p'. +giant.ts(125,9): error TS1021: An index signature must have a type annotation. +giant.ts(126,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(139,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(153,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(165,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(166,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(166,24): error TS1005: '{' expected. +giant.ts(167,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(168,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(168,33): error TS1005: '{' expected. +giant.ts(169,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(170,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(170,25): error TS1005: '{' expected. +giant.ts(171,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(172,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(172,34): error TS1005: '{' expected. +giant.ts(175,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(176,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(176,33): error TS1005: '{' expected. +giant.ts(177,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(178,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(178,24): error TS1005: '{' expected. +giant.ts(203,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(203,10): error TS2304: Cannot find name 'p'. +giant.ts(204,9): error TS1021: An index signature must have a type annotation. +giant.ts(205,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(218,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(232,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(237,35): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(239,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(242,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(243,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(244,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(244,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(245,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(246,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(246,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(247,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(248,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(248,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(249,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(250,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(250,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(251,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(253,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(254,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(254,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(255,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(256,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(256,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(257,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(261,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(261,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(266,30): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(272,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(273,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(276,12): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(278,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(280,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(280,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(281,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(281,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(281,20): error TS1005: '{' expected. +giant.ts(282,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(282,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(283,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(283,29): error TS1005: '{' expected. +giant.ts(284,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(285,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(285,21): error TS1005: '{' expected. +giant.ts(286,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(287,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(287,30): error TS1005: '{' expected. +giant.ts(288,12): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(289,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(290,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(290,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(291,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(291,29): error TS1005: '{' expected. +giant.ts(292,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(292,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(293,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(293,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(293,20): error TS1005: '{' expected. +giant.ts(299,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(318,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(318,6): error TS2304: Cannot find name 'p'. +giant.ts(319,5): error TS1021: An index signature must have a type annotation. +giant.ts(320,6): error TS1096: An index signature must have exactly one parameter. +giant.ts(331,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(332,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(332,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(333,5): error TS2386: Overload signatures must all be optional or required. +giant.ts(333,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(333,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(344,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(345,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(345,24): error TS1005: '{' expected. +giant.ts(346,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(347,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(347,33): error TS1005: '{' expected. +giant.ts(348,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(349,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(349,25): error TS1005: '{' expected. +giant.ts(350,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(351,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(351,34): error TS1005: '{' expected. +giant.ts(354,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(355,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(355,33): error TS1005: '{' expected. +giant.ts(356,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(357,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(357,24): error TS1005: '{' expected. +giant.ts(382,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(382,10): error TS2304: Cannot find name 'p'. +giant.ts(383,9): error TS1021: An index signature must have a type annotation. +giant.ts(384,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(397,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(411,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(415,16): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(416,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(419,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(421,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(423,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(423,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(424,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(424,20): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(424,24): error TS1005: '{' expected. +giant.ts(425,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(425,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(426,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(426,33): error TS1005: '{' expected. +giant.ts(427,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(428,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(428,25): error TS1005: '{' expected. +giant.ts(429,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(430,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(430,34): error TS1005: '{' expected. +giant.ts(431,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(432,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(433,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(433,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(434,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(434,33): error TS1005: '{' expected. +giant.ts(435,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(435,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(436,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(436,20): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(436,24): error TS1005: '{' expected. +giant.ts(442,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(461,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(461,10): error TS2304: Cannot find name 'p'. +giant.ts(462,9): error TS1021: An index signature must have a type annotation. +giant.ts(463,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(474,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(475,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(475,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(476,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(476,14): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(476,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(484,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(485,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(489,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(490,33): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(490,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(494,24): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(495,29): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(495,35): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(497,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(498,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(500,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(500,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(501,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(502,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(502,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(502,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(503,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(503,20): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(504,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(504,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(504,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(505,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(506,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(506,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(507,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(508,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(508,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(509,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(510,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(511,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(511,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(512,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(512,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(512,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(513,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(514,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(514,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(514,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(515,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(515,20): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(518,13): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(519,18): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(519,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(519,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(523,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(524,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(524,30): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(530,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(531,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(531,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(533,20): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(534,12): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(536,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(536,17): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(537,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(538,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(538,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(538,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(539,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(539,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(540,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(540,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(540,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(541,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(542,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(542,19): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(543,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(544,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(544,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(545,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(546,12): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(547,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(547,17): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(548,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(548,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(548,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(549,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(550,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(550,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(550,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(551,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(551,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(554,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(555,14): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(555,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(555,21): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(557,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(558,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(560,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(560,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(561,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(562,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(562,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(586,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(586,10): error TS2304: Cannot find name 'p'. +giant.ts(587,9): error TS1021: An index signature must have a type annotation. +giant.ts(588,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(599,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(600,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(600,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(601,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(601,14): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(601,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(604,13): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(605,18): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(605,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(605,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(609,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(610,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(610,30): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(614,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(614,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(615,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(615,33): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(615,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(616,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(617,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(619,16): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(620,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(620,26): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(622,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(623,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(625,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(625,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(626,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(627,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(627,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(633,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(652,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(652,10): error TS2304: Cannot find name 'p'. +giant.ts(653,9): error TS1021: An index signature must have a type annotation. +giant.ts(654,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(665,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(666,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(666,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(667,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(667,14): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(667,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(670,13): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(671,18): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(671,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(671,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(674,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(675,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient contexts. + + +==== giant.ts (348 errors) ==== + /* + Prefixes + p -> public + r -> private + i -> import + e -> export + a -> ambient + t -> static + s -> set + g -> get + + MAX DEPTH 3 LEVELS + */ + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + private rV; + public pF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV; + static tF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + } + export declare module eaM { + var V; + function F() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:272:12: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:273:17: Add a return type to the function declaration. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:276:12: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:278:12: Add a return type to the method + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:280:12: Add a return type to the method + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:281:16: Add a return type to the get accessor declaration. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:282:12: Add a return type to the method + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:288:12: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:289:12: Add a return type to the method + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:290:12: Add a return type to the method + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:292:12: Add a return type to the method + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:293:16: Add a return type to the get accessor declaration. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:299:6: Add a type annotation to the parameter p. + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:331:8: Add a type annotation to the parameter pa1. + p7(pa1, pa2): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:332:8: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:332:13: Add a type annotation to the parameter pa2. + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:333:10: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:333:15: Add a type annotation to the parameter pa2. + } + export module eM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:415:16: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:416:21: Add a return type to the function declaration. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:419:16: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:421:16: Add a return type to the method + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:423:16: Add a return type to the method + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:424:20: Add a return type to the get accessor declaration. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:425:16: Add a return type to the method + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:431:16: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:432:16: Add a return type to the method + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:433:16: Add a return type to the method + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:435:16: Add a return type to the method + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:436:20: Add a return type to the get accessor declaration. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:442:10: Add a type annotation to the parameter p. + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:474:12: Add a type annotation to the parameter pa1. + p7(pa1, pa2): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:475:12: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:475:17: Add a type annotation to the parameter pa2. + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:476:14: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:476:19: Add a type annotation to the parameter pa2. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:484:20: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:485:25: Add a return type to the function declaration. + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:489:28: Add a type annotation to the variable eaV. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:490:33: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:494:24: Add a type annotation to the variable eaV. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:495:29: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:498:16: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:500:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:502:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:503:20: Add a return type to the get accessor declaration. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:504:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:510:16: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:511:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:512:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:514:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:515:20: Add a return type to the get accessor declaration. + } + export declare module eaM { + var V; + ~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:518:13: Add a type annotation to the variable V. + function F() { }; + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:519:18: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:523:20: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:524:25: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } + export declare var eaV; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:530:20: Add a type annotation to the variable eaV. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:531:25: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:534:12: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:536:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:538:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:539:16: Add a return type to the get accessor declaration. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:540:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:546:12: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:547:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:548:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:550:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:551:16: Add a return type to the get accessor declaration. + } + export declare module eaM { + var V; + ~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:554:9: Add a type annotation to the variable V. + function F() { }; + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:555:14: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:558:16: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:560:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:561:16: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:562:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + interface I { + //Call Signature + (); + (): number; + (p: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:599:12: Add a type annotation to the parameter pa1. + p7(pa1, pa2): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:600:12: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:600:17: Add a type annotation to the parameter pa2. + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:601:14: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:601:19: Add a type annotation to the parameter pa2. + } + module M { + var V; + ~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:604:13: Add a type annotation to the variable V. + function F() { }; + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:605:18: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:609:20: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:610:25: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:614:28: Add a type annotation to the variable eaV. + export declare function eaF() { }; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:615:33: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + export declare module eaM { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:619:16: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:620:21: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:623:16: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:625:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tV + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:626:16: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:627:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:633:10: Add a type annotation to the parameter p. + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:665:12: Add a type annotation to the parameter pa1. + p7(pa1, pa2): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:666:12: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:666:17: Add a type annotation to the parameter pa2. + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:667:14: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:667:19: Add a type annotation to the parameter pa2. + } + export module eM { + var V; + ~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:670:13: Add a type annotation to the variable V. + function F() { }; + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:671:18: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + module M { } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:674:20: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:675:25: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/hugeDeclarationOutputGetsTruncatedWithError.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/hugeDeclarationOutputGetsTruncatedWithError.d.ts new file mode 100644 index 0000000000000..408652cb91177 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/hugeDeclarationOutputGetsTruncatedWithError.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts] //// + +//// [hugeDeclarationOutputGetsTruncatedWithError.ts] +type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; + +type manyprops = `${props}${props}`; + +export const c = null as any as {[K in manyprops]: {[K2 in manyprops]: `${K}.${K2}`}}; + +/// [Declarations] //// + + + +//// [hugeDeclarationOutputGetsTruncatedWithError.d.ts] +type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; +type manyprops = `${props}${props}`; +export declare const c: { + [K in manyprops]: { + [K2 in manyprops]: `${K}.${K2}`; + }; +}; +export {}; + +/// [Errors] //// + +hugeDeclarationOutputGetsTruncatedWithError.ts(5,14): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. + + +==== hugeDeclarationOutputGetsTruncatedWithError.ts (1 errors) ==== + type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; + + type manyprops = `${props}${props}`; + + export const c = null as any as {[K in manyprops]: {[K2 in manyprops]: `${K}.${K2}`}}; + ~ +!!! error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts new file mode 100644 index 0000000000000..35277ad5bd69c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts @@ -0,0 +1,232 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +//// [isolatedDeclarationErrorsClasses.ts] +export class Cls { + + field = 1 + 1; + method() {} + + methodOk(): void {} + + methodParams(p): void {} + methodParams2(p = 1 + 1): void {} + + get getOnly() { return 0 } + set setOnly(value) { } + + get getSetBad() { return 0 } + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } +} + +let noAnnotationStringName: string = "noAnnotationStringName"; +let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + +const noAnnotationLiteralName = "noAnnotationLiteralName"; +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + +export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName]() { return 0;} + + set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + +} + +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsClasses.d.ts] +export declare class Cls { + field: invalid; + method(): invalid; + methodOk(): void; + methodParams(p: invalid): void; + methodParams2(p?: invalid): void; + get getOnly(): invalid; + set setOnly(value: invalid); + get getSetBad(): invalid; + set getSetBad(value: invalid); + get getSetOk(): number; + set getSetOk(value: number); + get getSetOk2(): number; + set getSetOk2(value: number); + get getSetOk3(): number; + set getSetOk3(value: number); +} +declare let noAnnotationStringName: string; +declare let noParamAnnotationStringName: string; +declare const noAnnotationLiteralName = "noAnnotationLiteralName"; +declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; +export declare class C { + [missing]: number; + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; + get [noAnnotationStringName](): invalid; + set [noParamAnnotationStringName](value: invalid); +} +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](): any; +} +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsClasses.ts(3,13): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(8,18): error TS7006: Parameter 'p' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(8,18): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(9,23): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(12,9): error TS7032: Property 'setOnly' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(12,17): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(12,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(14,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(36,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. +isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(46,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(48,39): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + + +==== isolatedDeclarationErrorsClasses.ts (20 errors) ==== + export class Cls { + + field = 1 + 1; + ~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsClasses.ts:3:5: Add a type annotation to the property field. + method() {} + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 isolatedDeclarationErrorsClasses.ts:4:5: Add a return type to the method + + methodOk(): void {} + + methodParams(p): void {} + ~ +!!! error TS7006: Parameter 'p' implicitly has an 'any' type. + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:8:18: Add a type annotation to the parameter p. + methodParams2(p = 1 + 1): void {} + ~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:9:19: Add a type annotation to the parameter p. + + get getOnly() { return 0 } + ~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:11:9: Add a return type to the get accessor declaration. + set setOnly(value) { } + ~~~~~~~ +!!! error TS7032: Property 'setOnly' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:12:9: Add a type to parameter of the set accessor declaration. + + get getSetBad() { return 0 } + ~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:15:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:14:9: Add a return type to the get accessor declaration. + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } + } + + let noAnnotationStringName: string = "noAnnotationStringName"; + let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + + const noAnnotationLiteralName = "noAnnotationLiteralName"; + const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + + export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~ +!!! error TS2304: Cannot find name 'missing'. + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + ~ +!!! error TS7006: Parameter 'v' implicitly has an 'any' type. + + get [noAnnotationStringName]() { return 0;} + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:46:9: Add a return type to the get accessor declaration. + + set [noParamAnnotationStringName](value) { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:48:9: Add a type to parameter of the set accessor declaration. + + [("A" + "B") as "AB"] = 1; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + } + + export interface I { + [noAnnotationStringName]: 10; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + [noAnnotationLiteralName](); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsObjects.d.ts new file mode 100644 index 0000000000000..150b4ee03c460 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsObjects.d.ts @@ -0,0 +1,303 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +//// [isolatedDeclarationErrorsObjects.ts] +export let o = { + a: 1, + b: "" +} + +export let oBad = { + a: Math.random(), +} +export const V = 1; +export let oBad2 = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } +} + +export let oWithMethods = { + method() { }, + okMethod(): void { }, + a: 1, + bad() { }, + e: V, +} +export let oWithMethodsNested = { + foo: { + method() { }, + a: 1, + okMethod(): void { }, + bad() { } + } +} + + + +export let oWithAccessor = { + get singleGetterBad() { return 0 }, + set singleSetterBad(value) { }, + + get getSetBad() { return 0 }, + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, +} + +function prop(v: T): T { return v } + +const s: unique symbol = Symbol(); +const str: string = ""; +enum E { + V = 10, +} +export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, +} + +const part = { a: 1 }; + +export const oWithSpread = { + b: 1, + ...part, + c: 1, + part, +} + + +export const oWithSpread = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, +} + + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsObjects.d.ts] +export declare let o: { + a: number; + b: string; +}; +export declare let oBad: invalid; +export declare const V = 1; +export declare let oBad2: invalid; +export declare let oWithMethods: invalid; +export declare let oWithMethodsNested: invalid; +export declare let oWithAccessor: invalid; +declare const s: unique symbol; +declare const str: string; +declare enum E { + V = 10 +} +export declare const oWithComputedProperties: invalid; +export declare const oWithSpread: invalid; +export declare const oWithSpread: invalid; +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsObjects.ts(7,8): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(12,12): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(16,12): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(21,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(24,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(25,8): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(29,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(32,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(39,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(40,9): error TS7032: Property 'singleSetterBad' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsObjects.ts(40,25): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsObjects.ts(40,25): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(42,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(64,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(65,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(73,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(75,5): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(77,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(81,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(84,9): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. + + +==== isolatedDeclarationErrorsObjects.ts (21 errors) ==== + export let o = { + a: 1, + b: "" + } + + export let oBad = { + a: Math.random(), + ~~~~~~~~~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:6:12: Add a type annotation to the variable oBad. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:7:8: Add a type assertion to this expression to make type type explicit. + } + export const V = 1; + export let oBad2 = { + a: { + b: Math.random(), + ~~~~~~~~~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:10:12: Add a type annotation to the variable oBad2. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:12:12: Add a type assertion to this expression to make type type explicit. + }, + c: { + d: 1, + e: V, + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:10:12: Add a type annotation to the variable oBad2. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:16:12: Add a type assertion to this expression to make type type explicit. + } + } + + export let oWithMethods = { + method() { }, + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:21:5: Add a return type to the method + okMethod(): void { }, + a: 1, + bad() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:24:5: Add a return type to the method + e: V, + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:25:8: Add a type assertion to this expression to make type type explicit. + } + export let oWithMethodsNested = { + foo: { + method() { }, + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:27:12: Add a type annotation to the variable oWithMethodsNested. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:29:9: Add a return type to the method + a: 1, + okMethod(): void { }, + bad() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:27:12: Add a type annotation to the variable oWithMethodsNested. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:32:9: Add a return type to the method + } + } + + + + export let oWithAccessor = { + get singleGetterBad() { return 0 }, + ~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 isolatedDeclarationErrorsObjects.ts:39:9: Add a return type to the get accessor declaration. + set singleSetterBad(value) { }, + ~~~~~~~~~~~~~~~ +!!! error TS7032: Property 'singleSetterBad' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsObjects.ts:40:9: Add a type to parameter of the set accessor declaration. + + get getSetBad() { return 0 }, + ~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsObjects.ts:43:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 isolatedDeclarationErrorsObjects.ts:42:9: Add a return type to the get accessor declaration. + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, + } + + function prop(v: T): T { return v } + + const s: unique symbol = Symbol(); + const str: string = ""; + enum E { + V = 10, + } + export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + [prop(2)]: 2, + ~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + [s]: 1, + [E.V]: 1, + [str]: 0, + } + + const part = { a: 1 }; + + export const oWithSpread = { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + b: 1, + ...part, + ~~~~~~~ +!!! error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:73:14: Add a type annotation to the variable oWithSpread. + c: 1, + part, + ~~~~ +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:73:14: Add a type annotation to the variable oWithSpread. + } + + + export const oWithSpread = { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + b: 1, + nested: { + ...part, + ~~~~~~~ +!!! error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + }, + c: 1, + part, + ~~~~ +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + [str]: 0, + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts new file mode 100644 index 0000000000000..bd90efe226bc1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts] //// + +//// [mappedTypeWithAsClauseAndLateBoundProperty2.ts] +export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); + + +/// [Declarations] //// + + + +//// [mappedTypeWithAsClauseAndLateBoundProperty2.d.ts] +export declare const thing: { + [K in keyof number[] as Exclude]: (number[])[K]; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts new file mode 100644 index 0000000000000..797c973d9a20b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts @@ -0,0 +1,211 @@ +//// [tests/cases/conformance/types/tuple/named/namedTupleMembers.ts] //// + +//// [namedTupleMembers.ts] +export type Segment = [length: number, count: number]; + +export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number +]; + +declare var a: Segment; +declare var b: SegmentAnnotated; +declare var c: [number, number]; +declare var d: [a: number, b: number]; + +a = b; +a = c; +a = d; + +b = a; +b = c; +b = d; + +c = a; +c = b; +c = d; + +d = a; +d = b; +d = c; + +export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; + +export type Func = (...x: T) => void; + +export const func = null as any as Func; + +export function useState(initial: T): [value: T, setter: (T) => void] { + return null as any; +} + + +export type Iter = Func<[step: number, iterations: number]>; + +export function readSegment([length, count]: [number, number]) {} + +// documenting binding pattern behavior (currently does _not_ generate tuple names) +export const val = null as any as Parameters[0]; + +export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; + +export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; + +declare var q: RecursiveTupleA; +declare var r: RecursiveTupleB; + +q = r; +r = q; + +export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; +export type RecusiveRest2 = [string, ...RecusiveRest2[]]; + +declare var x: RecusiveRest; +declare var y: RecusiveRest2; + +x = y; +y = x; + +declare function f(...x: T): T; +declare function g(elem: object, index: number): object; +declare function getArgsForInjection any>(x: T): Parameters; + +export const argumentsOfGAsFirstArgument = f(getArgsForInjection(g)); // one tuple with captures arguments as first member +export const argumentsOfG = f(...getArgsForInjection(g)); // captured arguments list re-spread + + +/// [Declarations] //// + + + +//// [namedTupleMembers.d.ts] +export type Segment = [length: number, count: number]; +export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number +]; +export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; +export type Func = (...x: T) => void; +export declare const func: Func; +export declare function useState(initial: T): [value: T, setter: (T: invalid) => void]; +export type Iter = Func<[step: number, iterations: number]>; +export declare function readSegment([length, count]: [number, number]): invalid; +export declare const val: Parameters[0]; +export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; +export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; +export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; +export type RecusiveRest2 = [string, ...RecusiveRest2[]]; +export declare const argumentsOfGAsFirstArgument: invalid; +export declare const argumentsOfG: invalid; + +/// [Errors] //// + +namedTupleMembers.ts(41,62): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +namedTupleMembers.ts(48,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +namedTupleMembers.ts(76,44): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +namedTupleMembers.ts(77,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== namedTupleMembers.ts (4 errors) ==== + export type Segment = [length: number, count: number]; + + export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number + ]; + + declare var a: Segment; + declare var b: SegmentAnnotated; + declare var c: [number, number]; + declare var d: [a: number, b: number]; + + a = b; + a = c; + a = d; + + b = a; + b = c; + b = d; + + c = a; + c = b; + c = d; + + d = a; + d = b; + d = c; + + export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; + + export type Func = (...x: T) => void; + + export const func = null as any as Func; + + export function useState(initial: T): [value: T, setter: (T) => void] { + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 namedTupleMembers.ts:41:62: Add a type annotation to the parameter T. + return null as any; + } + + + export type Iter = Func<[step: number, iterations: number]>; + + export function readSegment([length, count]: [number, number]) {} + ~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 namedTupleMembers.ts:48:17: Add a return type to the function declaration. + + // documenting binding pattern behavior (currently does _not_ generate tuple names) + export const val = null as any as Parameters[0]; + + export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; + + export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; + + declare var q: RecursiveTupleA; + declare var r: RecursiveTupleB; + + q = r; + r = q; + + export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; + export type RecusiveRest2 = [string, ...RecusiveRest2[]]; + + declare var x: RecusiveRest; + declare var y: RecusiveRest2; + + x = y; + y = x; + + declare function f(...x: T): T; + declare function g(elem: object, index: number): object; + declare function getArgsForInjection any>(x: T): Parameters; + + export const argumentsOfGAsFirstArgument = f(getArgsForInjection(g)); // one tuple with captures arguments as first member + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 namedTupleMembers.ts:76:14: Add a type annotation to the variable argumentsOfGAsFirstArgument. + export const argumentsOfG = f(...getArgsForInjection(g)); // captured arguments list re-spread + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 namedTupleMembers.ts:77:14: Add a type annotation to the variable argumentsOfG. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts new file mode 100644 index 0000000000000..0d5c065231c98 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts new file mode 100644 index 0000000000000..0d5c065231c98 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts new file mode 100644 index 0000000000000..c1d2eb1e27f81 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts @@ -0,0 +1,453 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} + +//// [require.d.ts] +export interface RequireInterface {} + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [other.ts] +// missing with: +export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + +export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); +export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + +//// [other2.ts] +// wrong attribute key +export type LocalInterface = + & import("pkg", { with: {"bad": "require"} }).RequireInterface + & import("pkg", { with: {"bad": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"bad": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"bad": "import"} }).ImportInterface); + +//// [other3.ts] +// Array instead of object-y thing +export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + +export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); +export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + +//// [other4.ts] +// Indirected attribute objecty-thing - not allowed +type Attribute1 = { with: {"resolution-mode": "require"} }; +type Attribute2 = { with: {"resolution-mode": "import"} }; + +export type LocalInterface = + & import("pkg", Attribute1).RequireInterface + & import("pkg", Attribute2).ImportInterface; + +export const a = (null as any as import("pkg", Attribute1).RequireInterface); +export const b = (null as any as import("pkg", Attribute2).ImportInterface); + +//// [other5.ts] +export type LocalInterface = + & import("pkg", { with: {} }).RequireInterface + & import("pkg", { with: {} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {} }).ImportInterface); + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + +//// [/.src/out/other.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }); +export declare const b: import("pkg", { with: {} }); + +//// [/.src/out/other2.d.ts] +export type LocalInterface = import("pkg", { with: { "bad": "require" } }).RequireInterface & import("pkg", { with: { "bad": "import" } }).ImportInterface; +export declare const a: import("pkg", { with: { "bad": "require" } }).RequireInterface; +export declare const b: import("pkg", { with: { "bad": "import" } }).ImportInterface; + +//// [/.src/out/other3.d.ts] +export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +}]; +export declare const a: invalid; +export declare const b: invalid; + +//// [/.src/out/other4.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }), Attribute1: invalid, RequireInterface: invalid; +export declare const b: import("pkg", { with: {} }), Attribute2: invalid, ImportInterface: invalid; + +//// [/.src/out/other5.d.ts] +export type LocalInterface = import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; +export declare const a: import("pkg", { with: {} }).RequireInterface; +export declare const b: import("pkg", { with: {} }).ImportInterface; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,49): error TS1453: `resolution-mode` should be either `require` or `import`. +/index.ts(5,76): error TS1453: `resolution-mode` should be either `require` or `import`. +/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(3,22): error TS1005: 'with' expected. +/other.ts(3,39): error TS1005: ';' expected. +/other.ts(3,50): error TS1128: Declaration or statement expected. +/other.ts(3,51): error TS1128: Declaration or statement expected. +/other.ts(3,52): error TS1128: Declaration or statement expected. +/other.ts(3,53): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other.ts(4,22): error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. +/other.ts(4,52): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(6,49): error TS1005: 'with' expected. +/other.ts(6,66): error TS1005: ';' expected. +/other.ts(6,77): error TS1128: Declaration or statement expected. +/other.ts(6,78): error TS1128: Declaration or statement expected. +/other.ts(6,79): error TS1128: Declaration or statement expected. +/other.ts(6,80): error TS1434: Unexpected keyword or identifier. +/other.ts(6,80): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(6,96): error TS1128: Declaration or statement expected. +/other.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(7,49): error TS1005: 'with' expected. +/other.ts(7,66): error TS1005: ';' expected. +/other.ts(7,76): error TS1128: Declaration or statement expected. +/other.ts(7,77): error TS1128: Declaration or statement expected. +/other.ts(7,78): error TS1128: Declaration or statement expected. +/other.ts(7,79): error TS1434: Unexpected keyword or identifier. +/other.ts(7,79): error TS2304: Cannot find name 'ImportInterface'. +/other.ts(7,94): error TS1128: Declaration or statement expected. +/other2.ts(3,30): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(4,30): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(4,50): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other2.ts(6,57): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(7,57): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(7,77): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other3.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(3,21): error TS1005: '{' expected. +/other3.ts(3,23): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(3,55): error TS1005: ';' expected. +/other3.ts(3,56): error TS1128: Declaration or statement expected. +/other3.ts(3,57): error TS2304: Cannot find name 'RequireInterface'. +/other3.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other3.ts(4,21): error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. +/other3.ts(4,56): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other3.ts(6,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(6,48): error TS1005: '{' expected. +/other3.ts(6,50): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(6,100): error TS1005: ',' expected. +/other3.ts(7,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(7,48): error TS1005: '{' expected. +/other3.ts(7,50): error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. +/other3.ts(7,98): error TS1005: ',' expected. +/other4.ts(6,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(6,21): error TS1005: '{' expected. +/other4.ts(6,21): error TS2448: Block-scoped variable 'Attribute1' used before its declaration. +/other4.ts(6,31): error TS1128: Declaration or statement expected. +/other4.ts(6,32): error TS1128: Declaration or statement expected. +/other4.ts(6,33): error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +/other4.ts(7,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other4.ts(7,21): error TS2448: Block-scoped variable 'Attribute2' used before its declaration. +/other4.ts(7,33): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other4.ts(9,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(9,48): error TS1005: '{' expected. +/other4.ts(9,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,58): error TS1005: ',' expected. +/other4.ts(9,59): error TS1134: Variable declaration expected. +/other4.ts(9,60): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,76): error TS1005: ',' expected. +/other4.ts(10,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(10,48): error TS1005: '{' expected. +/other4.ts(10,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,58): error TS1005: ',' expected. +/other4.ts(10,59): error TS1134: Variable declaration expected. +/other4.ts(10,60): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,75): error TS1005: ',' expected. +/other5.ts(2,29): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(3,29): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(3,35): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other5.ts(5,56): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(6,56): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(6,62): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} + +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} + +==== /index.ts (2 errors) ==== + export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + + export const a = (null as any as import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface); + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +==== /other.ts (28 errors) ==== + // missing with: + export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~ +!!! error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + +==== /other2.ts (6 errors) ==== + // wrong attribute key + export type LocalInterface = + & import("pkg", { with: {"bad": "require"} }).RequireInterface + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + & import("pkg", { with: {"bad": "import"} }).ImportInterface; + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { with: {"bad": "require"} }).RequireInterface); + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + export const b = (null as any as import("pkg", { with: {"bad": "import"} }).ImportInterface); + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + +==== /other3.ts (19 errors) ==== + // Array instead of object-y thing + export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:6:14: Add a type annotation to the variable a. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:7:14: Add a type annotation to the variable b. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + +==== /other4.ts (23 errors) ==== + // Indirected attribute objecty-thing - not allowed + type Attribute1 = { with: {"resolution-mode": "require"} }; + type Attribute2 = { with: {"resolution-mode": "import"} }; + + export type LocalInterface = + & import("pkg", Attribute1).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:6:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Attribute1' used before its declaration. +!!! related TS2728 /other4.ts:9:48: 'Attribute1' is declared here. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +!!! related TS2728 /other4.ts:9:60: 'RequireInterface' is declared here. + & import("pkg", Attribute2).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Attribute2' used before its declaration. +!!! related TS2728 /other4.ts:10:48: 'Attribute2' is declared here. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", Attribute1).RequireInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:48: Add a type annotation to the variable Attribute1. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:60: Add a type annotation to the variable RequireInterface. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", Attribute2).ImportInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:48: Add a type annotation to the variable Attribute2. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:60: Add a type annotation to the variable ImportInterface. + ~ +!!! error TS1005: ',' expected. + +==== /other5.ts (6 errors) ==== + export type LocalInterface = + & import("pkg", { with: {} }).RequireInterface + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + & import("pkg", { with: {} }).ImportInterface; + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { with: {} }).RequireInterface); + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + export const b = (null as any as import("pkg", { with: {} }).ImportInterface); + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts new file mode 100644 index 0000000000000..c1d2eb1e27f81 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts @@ -0,0 +1,453 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} + +//// [require.d.ts] +export interface RequireInterface {} + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [other.ts] +// missing with: +export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + +export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); +export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + +//// [other2.ts] +// wrong attribute key +export type LocalInterface = + & import("pkg", { with: {"bad": "require"} }).RequireInterface + & import("pkg", { with: {"bad": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"bad": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"bad": "import"} }).ImportInterface); + +//// [other3.ts] +// Array instead of object-y thing +export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + +export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); +export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + +//// [other4.ts] +// Indirected attribute objecty-thing - not allowed +type Attribute1 = { with: {"resolution-mode": "require"} }; +type Attribute2 = { with: {"resolution-mode": "import"} }; + +export type LocalInterface = + & import("pkg", Attribute1).RequireInterface + & import("pkg", Attribute2).ImportInterface; + +export const a = (null as any as import("pkg", Attribute1).RequireInterface); +export const b = (null as any as import("pkg", Attribute2).ImportInterface); + +//// [other5.ts] +export type LocalInterface = + & import("pkg", { with: {} }).RequireInterface + & import("pkg", { with: {} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {} }).ImportInterface); + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + +//// [/.src/out/other.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }); +export declare const b: import("pkg", { with: {} }); + +//// [/.src/out/other2.d.ts] +export type LocalInterface = import("pkg", { with: { "bad": "require" } }).RequireInterface & import("pkg", { with: { "bad": "import" } }).ImportInterface; +export declare const a: import("pkg", { with: { "bad": "require" } }).RequireInterface; +export declare const b: import("pkg", { with: { "bad": "import" } }).ImportInterface; + +//// [/.src/out/other3.d.ts] +export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +}]; +export declare const a: invalid; +export declare const b: invalid; + +//// [/.src/out/other4.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }), Attribute1: invalid, RequireInterface: invalid; +export declare const b: import("pkg", { with: {} }), Attribute2: invalid, ImportInterface: invalid; + +//// [/.src/out/other5.d.ts] +export type LocalInterface = import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; +export declare const a: import("pkg", { with: {} }).RequireInterface; +export declare const b: import("pkg", { with: {} }).ImportInterface; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,49): error TS1453: `resolution-mode` should be either `require` or `import`. +/index.ts(5,76): error TS1453: `resolution-mode` should be either `require` or `import`. +/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(3,22): error TS1005: 'with' expected. +/other.ts(3,39): error TS1005: ';' expected. +/other.ts(3,50): error TS1128: Declaration or statement expected. +/other.ts(3,51): error TS1128: Declaration or statement expected. +/other.ts(3,52): error TS1128: Declaration or statement expected. +/other.ts(3,53): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other.ts(4,22): error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. +/other.ts(4,52): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(6,49): error TS1005: 'with' expected. +/other.ts(6,66): error TS1005: ';' expected. +/other.ts(6,77): error TS1128: Declaration or statement expected. +/other.ts(6,78): error TS1128: Declaration or statement expected. +/other.ts(6,79): error TS1128: Declaration or statement expected. +/other.ts(6,80): error TS1434: Unexpected keyword or identifier. +/other.ts(6,80): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(6,96): error TS1128: Declaration or statement expected. +/other.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(7,49): error TS1005: 'with' expected. +/other.ts(7,66): error TS1005: ';' expected. +/other.ts(7,76): error TS1128: Declaration or statement expected. +/other.ts(7,77): error TS1128: Declaration or statement expected. +/other.ts(7,78): error TS1128: Declaration or statement expected. +/other.ts(7,79): error TS1434: Unexpected keyword or identifier. +/other.ts(7,79): error TS2304: Cannot find name 'ImportInterface'. +/other.ts(7,94): error TS1128: Declaration or statement expected. +/other2.ts(3,30): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(4,30): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(4,50): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other2.ts(6,57): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(7,57): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(7,77): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other3.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(3,21): error TS1005: '{' expected. +/other3.ts(3,23): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(3,55): error TS1005: ';' expected. +/other3.ts(3,56): error TS1128: Declaration or statement expected. +/other3.ts(3,57): error TS2304: Cannot find name 'RequireInterface'. +/other3.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other3.ts(4,21): error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. +/other3.ts(4,56): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other3.ts(6,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(6,48): error TS1005: '{' expected. +/other3.ts(6,50): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(6,100): error TS1005: ',' expected. +/other3.ts(7,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(7,48): error TS1005: '{' expected. +/other3.ts(7,50): error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. +/other3.ts(7,98): error TS1005: ',' expected. +/other4.ts(6,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(6,21): error TS1005: '{' expected. +/other4.ts(6,21): error TS2448: Block-scoped variable 'Attribute1' used before its declaration. +/other4.ts(6,31): error TS1128: Declaration or statement expected. +/other4.ts(6,32): error TS1128: Declaration or statement expected. +/other4.ts(6,33): error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +/other4.ts(7,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other4.ts(7,21): error TS2448: Block-scoped variable 'Attribute2' used before its declaration. +/other4.ts(7,33): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other4.ts(9,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(9,48): error TS1005: '{' expected. +/other4.ts(9,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,58): error TS1005: ',' expected. +/other4.ts(9,59): error TS1134: Variable declaration expected. +/other4.ts(9,60): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,76): error TS1005: ',' expected. +/other4.ts(10,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(10,48): error TS1005: '{' expected. +/other4.ts(10,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,58): error TS1005: ',' expected. +/other4.ts(10,59): error TS1134: Variable declaration expected. +/other4.ts(10,60): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,75): error TS1005: ',' expected. +/other5.ts(2,29): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(3,29): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(3,35): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other5.ts(5,56): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(6,56): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(6,62): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} + +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} + +==== /index.ts (2 errors) ==== + export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + + export const a = (null as any as import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface); + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +==== /other.ts (28 errors) ==== + // missing with: + export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~ +!!! error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + +==== /other2.ts (6 errors) ==== + // wrong attribute key + export type LocalInterface = + & import("pkg", { with: {"bad": "require"} }).RequireInterface + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + & import("pkg", { with: {"bad": "import"} }).ImportInterface; + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { with: {"bad": "require"} }).RequireInterface); + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + export const b = (null as any as import("pkg", { with: {"bad": "import"} }).ImportInterface); + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + +==== /other3.ts (19 errors) ==== + // Array instead of object-y thing + export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:6:14: Add a type annotation to the variable a. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:7:14: Add a type annotation to the variable b. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + +==== /other4.ts (23 errors) ==== + // Indirected attribute objecty-thing - not allowed + type Attribute1 = { with: {"resolution-mode": "require"} }; + type Attribute2 = { with: {"resolution-mode": "import"} }; + + export type LocalInterface = + & import("pkg", Attribute1).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:6:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Attribute1' used before its declaration. +!!! related TS2728 /other4.ts:9:48: 'Attribute1' is declared here. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +!!! related TS2728 /other4.ts:9:60: 'RequireInterface' is declared here. + & import("pkg", Attribute2).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Attribute2' used before its declaration. +!!! related TS2728 /other4.ts:10:48: 'Attribute2' is declared here. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", Attribute1).RequireInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:48: Add a type annotation to the variable Attribute1. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:60: Add a type annotation to the variable RequireInterface. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", Attribute2).ImportInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:48: Add a type annotation to the variable Attribute2. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:60: Add a type annotation to the variable ImportInterface. + ~ +!!! error TS1005: ',' expected. + +==== /other5.ts (6 errors) ==== + export type LocalInterface = + & import("pkg", { with: {} }).RequireInterface + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + & import("pkg", { with: {} }).ImportInterface; + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { with: {} }).RequireInterface); + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + export const b = (null as any as import("pkg", { with: {} }).ImportInterface); + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts new file mode 100644 index 0000000000000..423eba3ae2576 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface; +export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts new file mode 100644 index 0000000000000..423eba3ae2576 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface; +export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts new file mode 100644 index 0000000000000..59679a98a19a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts @@ -0,0 +1,441 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); +//// [other.ts] +// missing assert: +export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + +export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); +export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); +//// [other2.ts] +// wrong assertion key +export type LocalInterface = + & import("pkg", { assert: {"bad": "require"} }).RequireInterface + & import("pkg", { assert: {"bad": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"bad": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"bad": "import"} }).ImportInterface); +//// [other3.ts] +// Array instead of object-y thing +export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + +export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); +export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); +//// [other4.ts] +// Indirected assertion objecty-thing - not allowed +type Asserts1 = { assert: {"resolution-mode": "require"} }; +type Asserts2 = { assert: {"resolution-mode": "import"} }; + +export type LocalInterface = + & import("pkg", Asserts1).RequireInterface + & import("pkg", Asserts2).ImportInterface; + +export const a = (null as any as import("pkg", Asserts1).RequireInterface); +export const b = (null as any as import("pkg", Asserts2).ImportInterface); +//// [other5.ts] +export type LocalInterface = + & import("pkg", { assert: {} }).RequireInterface + & import("pkg", { assert: {} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {} }).ImportInterface); + + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface; +export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; + +//// [/.src/out/other.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }); +export declare const b: import("pkg", { with: {} }); + +//// [/.src/out/other2.d.ts] +export type LocalInterface = import("pkg", { assert: { "bad": "require" } }).RequireInterface & import("pkg", { assert: { "bad": "import" } }).ImportInterface; +export declare const a: import("pkg", { assert: { "bad": "require" } }).RequireInterface; +export declare const b: import("pkg", { assert: { "bad": "import" } }).ImportInterface; + +//// [/.src/out/other3.d.ts] +export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +}]; +export declare const a: invalid; +export declare const b: invalid; + +//// [/.src/out/other4.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }), Asserts1: invalid, RequireInterface: invalid; +export declare const b: import("pkg", { with: {} }), Asserts2: invalid, ImportInterface: invalid; + +//// [/.src/out/other5.d.ts] +export type LocalInterface = import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; +export declare const a: import("pkg", { assert: {} }).RequireInterface; +export declare const b: import("pkg", { assert: {} }).ImportInterface; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,51): error TS1453: `resolution-mode` should be either `require` or `import`. +/index.ts(5,78): error TS1453: `resolution-mode` should be either `require` or `import`. +/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(3,22): error TS1005: 'with' expected. +/other.ts(3,39): error TS1005: ';' expected. +/other.ts(3,50): error TS1128: Declaration or statement expected. +/other.ts(3,51): error TS1128: Declaration or statement expected. +/other.ts(3,52): error TS1128: Declaration or statement expected. +/other.ts(3,53): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other.ts(4,22): error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. +/other.ts(4,52): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(6,49): error TS1005: 'with' expected. +/other.ts(6,66): error TS1005: ';' expected. +/other.ts(6,77): error TS1128: Declaration or statement expected. +/other.ts(6,78): error TS1128: Declaration or statement expected. +/other.ts(6,79): error TS1128: Declaration or statement expected. +/other.ts(6,80): error TS1434: Unexpected keyword or identifier. +/other.ts(6,80): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(6,96): error TS1128: Declaration or statement expected. +/other.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(7,49): error TS1005: 'with' expected. +/other.ts(7,66): error TS1005: ';' expected. +/other.ts(7,76): error TS1128: Declaration or statement expected. +/other.ts(7,77): error TS1128: Declaration or statement expected. +/other.ts(7,78): error TS1128: Declaration or statement expected. +/other.ts(7,79): error TS1434: Unexpected keyword or identifier. +/other.ts(7,79): error TS2304: Cannot find name 'ImportInterface'. +/other.ts(7,94): error TS1128: Declaration or statement expected. +/other2.ts(3,32): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(4,32): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(4,52): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other2.ts(6,59): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(7,59): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(7,79): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other3.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(3,21): error TS1005: '{' expected. +/other3.ts(3,23): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(3,55): error TS1005: ';' expected. +/other3.ts(3,56): error TS1128: Declaration or statement expected. +/other3.ts(3,57): error TS2304: Cannot find name 'RequireInterface'. +/other3.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other3.ts(4,21): error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. +/other3.ts(4,56): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other3.ts(6,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(6,48): error TS1005: '{' expected. +/other3.ts(6,50): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(6,100): error TS1005: ',' expected. +/other3.ts(7,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(7,48): error TS1005: '{' expected. +/other3.ts(7,50): error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. +/other3.ts(7,98): error TS1005: ',' expected. +/other4.ts(6,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(6,21): error TS1005: '{' expected. +/other4.ts(6,21): error TS2448: Block-scoped variable 'Asserts1' used before its declaration. +/other4.ts(6,29): error TS1128: Declaration or statement expected. +/other4.ts(6,30): error TS1128: Declaration or statement expected. +/other4.ts(6,31): error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +/other4.ts(7,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other4.ts(7,21): error TS2448: Block-scoped variable 'Asserts2' used before its declaration. +/other4.ts(7,31): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other4.ts(9,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(9,48): error TS1005: '{' expected. +/other4.ts(9,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,56): error TS1005: ',' expected. +/other4.ts(9,57): error TS1134: Variable declaration expected. +/other4.ts(9,58): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,74): error TS1005: ',' expected. +/other4.ts(10,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(10,48): error TS1005: '{' expected. +/other4.ts(10,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,56): error TS1005: ',' expected. +/other4.ts(10,57): error TS1134: Variable declaration expected. +/other4.ts(10,58): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,73): error TS1005: ',' expected. +/other5.ts(2,31): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(3,31): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(3,37): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other5.ts(5,58): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(6,58): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(6,64): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} +==== /index.ts (2 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + + export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface); + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); +==== /other.ts (28 errors) ==== + // missing assert: + export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~ +!!! error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. +==== /other2.ts (6 errors) ==== + // wrong assertion key + export type LocalInterface = + & import("pkg", { assert: {"bad": "require"} }).RequireInterface + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + & import("pkg", { assert: {"bad": "import"} }).ImportInterface; + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { assert: {"bad": "require"} }).RequireInterface); + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + export const b = (null as any as import("pkg", { assert: {"bad": "import"} }).ImportInterface); + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +==== /other3.ts (19 errors) ==== + // Array instead of object-y thing + export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:6:14: Add a type annotation to the variable a. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:7:14: Add a type annotation to the variable b. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. +==== /other4.ts (23 errors) ==== + // Indirected assertion objecty-thing - not allowed + type Asserts1 = { assert: {"resolution-mode": "require"} }; + type Asserts2 = { assert: {"resolution-mode": "import"} }; + + export type LocalInterface = + & import("pkg", Asserts1).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:6:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Asserts1' used before its declaration. +!!! related TS2728 /other4.ts:9:48: 'Asserts1' is declared here. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +!!! related TS2728 /other4.ts:9:58: 'RequireInterface' is declared here. + & import("pkg", Asserts2).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Asserts2' used before its declaration. +!!! related TS2728 /other4.ts:10:48: 'Asserts2' is declared here. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", Asserts1).RequireInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:48: Add a type annotation to the variable Asserts1. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:58: Add a type annotation to the variable RequireInterface. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", Asserts2).ImportInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:48: Add a type annotation to the variable Asserts2. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:58: Add a type annotation to the variable ImportInterface. + ~ +!!! error TS1005: ',' expected. +==== /other5.ts (6 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {} }).RequireInterface + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + & import("pkg", { assert: {} }).ImportInterface; + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { assert: {} }).RequireInterface); + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + export const b = (null as any as import("pkg", { assert: {} }).ImportInterface); + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts new file mode 100644 index 0000000000000..59679a98a19a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts @@ -0,0 +1,441 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); +//// [other.ts] +// missing assert: +export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + +export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); +export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); +//// [other2.ts] +// wrong assertion key +export type LocalInterface = + & import("pkg", { assert: {"bad": "require"} }).RequireInterface + & import("pkg", { assert: {"bad": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"bad": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"bad": "import"} }).ImportInterface); +//// [other3.ts] +// Array instead of object-y thing +export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + +export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); +export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); +//// [other4.ts] +// Indirected assertion objecty-thing - not allowed +type Asserts1 = { assert: {"resolution-mode": "require"} }; +type Asserts2 = { assert: {"resolution-mode": "import"} }; + +export type LocalInterface = + & import("pkg", Asserts1).RequireInterface + & import("pkg", Asserts2).ImportInterface; + +export const a = (null as any as import("pkg", Asserts1).RequireInterface); +export const b = (null as any as import("pkg", Asserts2).ImportInterface); +//// [other5.ts] +export type LocalInterface = + & import("pkg", { assert: {} }).RequireInterface + & import("pkg", { assert: {} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {} }).ImportInterface); + + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface; +export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; + +//// [/.src/out/other.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }); +export declare const b: import("pkg", { with: {} }); + +//// [/.src/out/other2.d.ts] +export type LocalInterface = import("pkg", { assert: { "bad": "require" } }).RequireInterface & import("pkg", { assert: { "bad": "import" } }).ImportInterface; +export declare const a: import("pkg", { assert: { "bad": "require" } }).RequireInterface; +export declare const b: import("pkg", { assert: { "bad": "import" } }).ImportInterface; + +//// [/.src/out/other3.d.ts] +export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +}]; +export declare const a: invalid; +export declare const b: invalid; + +//// [/.src/out/other4.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }), Asserts1: invalid, RequireInterface: invalid; +export declare const b: import("pkg", { with: {} }), Asserts2: invalid, ImportInterface: invalid; + +//// [/.src/out/other5.d.ts] +export type LocalInterface = import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; +export declare const a: import("pkg", { assert: {} }).RequireInterface; +export declare const b: import("pkg", { assert: {} }).ImportInterface; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,51): error TS1453: `resolution-mode` should be either `require` or `import`. +/index.ts(5,78): error TS1453: `resolution-mode` should be either `require` or `import`. +/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(3,22): error TS1005: 'with' expected. +/other.ts(3,39): error TS1005: ';' expected. +/other.ts(3,50): error TS1128: Declaration or statement expected. +/other.ts(3,51): error TS1128: Declaration or statement expected. +/other.ts(3,52): error TS1128: Declaration or statement expected. +/other.ts(3,53): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other.ts(4,22): error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. +/other.ts(4,52): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(6,49): error TS1005: 'with' expected. +/other.ts(6,66): error TS1005: ';' expected. +/other.ts(6,77): error TS1128: Declaration or statement expected. +/other.ts(6,78): error TS1128: Declaration or statement expected. +/other.ts(6,79): error TS1128: Declaration or statement expected. +/other.ts(6,80): error TS1434: Unexpected keyword or identifier. +/other.ts(6,80): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(6,96): error TS1128: Declaration or statement expected. +/other.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(7,49): error TS1005: 'with' expected. +/other.ts(7,66): error TS1005: ';' expected. +/other.ts(7,76): error TS1128: Declaration or statement expected. +/other.ts(7,77): error TS1128: Declaration or statement expected. +/other.ts(7,78): error TS1128: Declaration or statement expected. +/other.ts(7,79): error TS1434: Unexpected keyword or identifier. +/other.ts(7,79): error TS2304: Cannot find name 'ImportInterface'. +/other.ts(7,94): error TS1128: Declaration or statement expected. +/other2.ts(3,32): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(4,32): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(4,52): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other2.ts(6,59): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(7,59): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(7,79): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other3.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(3,21): error TS1005: '{' expected. +/other3.ts(3,23): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(3,55): error TS1005: ';' expected. +/other3.ts(3,56): error TS1128: Declaration or statement expected. +/other3.ts(3,57): error TS2304: Cannot find name 'RequireInterface'. +/other3.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other3.ts(4,21): error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. +/other3.ts(4,56): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other3.ts(6,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(6,48): error TS1005: '{' expected. +/other3.ts(6,50): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(6,100): error TS1005: ',' expected. +/other3.ts(7,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(7,48): error TS1005: '{' expected. +/other3.ts(7,50): error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. +/other3.ts(7,98): error TS1005: ',' expected. +/other4.ts(6,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(6,21): error TS1005: '{' expected. +/other4.ts(6,21): error TS2448: Block-scoped variable 'Asserts1' used before its declaration. +/other4.ts(6,29): error TS1128: Declaration or statement expected. +/other4.ts(6,30): error TS1128: Declaration or statement expected. +/other4.ts(6,31): error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +/other4.ts(7,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other4.ts(7,21): error TS2448: Block-scoped variable 'Asserts2' used before its declaration. +/other4.ts(7,31): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other4.ts(9,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(9,48): error TS1005: '{' expected. +/other4.ts(9,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,56): error TS1005: ',' expected. +/other4.ts(9,57): error TS1134: Variable declaration expected. +/other4.ts(9,58): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,74): error TS1005: ',' expected. +/other4.ts(10,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(10,48): error TS1005: '{' expected. +/other4.ts(10,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,56): error TS1005: ',' expected. +/other4.ts(10,57): error TS1134: Variable declaration expected. +/other4.ts(10,58): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,73): error TS1005: ',' expected. +/other5.ts(2,31): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(3,31): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(3,37): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other5.ts(5,58): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(6,58): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(6,64): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} +==== /index.ts (2 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + + export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface); + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); +==== /other.ts (28 errors) ==== + // missing assert: + export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~ +!!! error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. +==== /other2.ts (6 errors) ==== + // wrong assertion key + export type LocalInterface = + & import("pkg", { assert: {"bad": "require"} }).RequireInterface + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + & import("pkg", { assert: {"bad": "import"} }).ImportInterface; + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { assert: {"bad": "require"} }).RequireInterface); + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + export const b = (null as any as import("pkg", { assert: {"bad": "import"} }).ImportInterface); + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +==== /other3.ts (19 errors) ==== + // Array instead of object-y thing + export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:6:14: Add a type annotation to the variable a. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:7:14: Add a type annotation to the variable b. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. +==== /other4.ts (23 errors) ==== + // Indirected assertion objecty-thing - not allowed + type Asserts1 = { assert: {"resolution-mode": "require"} }; + type Asserts2 = { assert: {"resolution-mode": "import"} }; + + export type LocalInterface = + & import("pkg", Asserts1).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:6:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Asserts1' used before its declaration. +!!! related TS2728 /other4.ts:9:48: 'Asserts1' is declared here. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +!!! related TS2728 /other4.ts:9:58: 'RequireInterface' is declared here. + & import("pkg", Asserts2).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Asserts2' used before its declaration. +!!! related TS2728 /other4.ts:10:48: 'Asserts2' is declared here. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", Asserts1).RequireInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:48: Add a type annotation to the variable Asserts1. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:58: Add a type annotation to the variable RequireInterface. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", Asserts2).ImportInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:48: Add a type annotation to the variable Asserts2. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:58: Add a type annotation to the variable ImportInterface. + ~ +!!! error TS1005: ',' expected. +==== /other5.ts (6 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {} }).RequireInterface + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + & import("pkg", { assert: {} }).ImportInterface; + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { assert: {} }).RequireInterface); + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + export const b = (null as any as import("pkg", { assert: {} }).ImportInterface); + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralComputedNameNoDeclarationError.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralComputedNameNoDeclarationError.d.ts new file mode 100644 index 0000000000000..ef2c8f2a65ba5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralComputedNameNoDeclarationError.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts] //// + +//// [objectLiteralComputedNameNoDeclarationError.ts] +const Foo = { + BANANA: 'banana' as 'banana', +} + +export const Baa = { + [Foo.BANANA]: 1 +}; + +/// [Declarations] //// + + + +//// [objectLiteralComputedNameNoDeclarationError.d.ts] +declare const Foo: { + BANANA: "banana"; +}; +export declare const Baa: { + [Foo.BANANA]: number; +}; +export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseAssertEntriesError.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseAssertEntriesError.d.ts new file mode 100644 index 0000000000000..88e89e89662c6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseAssertEntriesError.d.ts @@ -0,0 +1,162 @@ +//// [tests/cases/compiler/parseAssertEntriesError.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: {} }); +export declare const a: import("pkg", { assert: {} }); +export declare const b: import("pkg", { assert: {} }); + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(2,32): error TS1478: Identifier or string literal expected. +/index.ts(2,32): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(2,55): error TS1005: ';' expected. +/index.ts(2,66): error TS1128: Declaration or statement expected. +/index.ts(2,68): error TS1128: Declaration or statement expected. +/index.ts(2,69): error TS1128: Declaration or statement expected. +/index.ts(2,70): error TS1128: Declaration or statement expected. +/index.ts(2,71): error TS2304: Cannot find name 'RequireInterface'. +/index.ts(3,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/index.ts(3,36): error TS1005: ':' expected. +/index.ts(3,70): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/index.ts(5,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(5,59): error TS1478: Identifier or string literal expected. +/index.ts(5,59): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(5,82): error TS1005: ';' expected. +/index.ts(5,93): error TS1128: Declaration or statement expected. +/index.ts(5,95): error TS1128: Declaration or statement expected. +/index.ts(5,96): error TS1128: Declaration or statement expected. +/index.ts(5,97): error TS1128: Declaration or statement expected. +/index.ts(5,98): error TS1434: Unexpected keyword or identifier. +/index.ts(5,98): error TS2304: Cannot find name 'RequireInterface'. +/index.ts(5,114): error TS1128: Declaration or statement expected. +/index.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(6,59): error TS1478: Identifier or string literal expected. +/index.ts(6,59): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(6,82): error TS1005: ';' expected. +/index.ts(6,92): error TS1128: Declaration or statement expected. +/index.ts(6,94): error TS1128: Declaration or statement expected. +/index.ts(6,95): error TS1128: Declaration or statement expected. +/index.ts(6,96): error TS1128: Declaration or statement expected. +/index.ts(6,97): error TS1434: Unexpected keyword or identifier. +/index.ts(6,97): error TS2304: Cannot find name 'ImportInterface'. +/index.ts(6,112): error TS1128: Declaration or statement expected. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /index.ts (34 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~ +!!! error TS1005: ':' expected. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseImportAttributesError.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseImportAttributesError.d.ts new file mode 100644 index 0000000000000..90ec9089ac8db --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseImportAttributesError.d.ts @@ -0,0 +1,168 @@ +//// [tests/cases/compiler/parseImportAttributesError.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} + +//// [import.d.ts] +export interface ImportInterface {} + +//// [require.d.ts] +export interface RequireInterface {} + + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: import("pkg", { with: {} }); +export declare const b: import("pkg", { with: {} }); + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(2,30): error TS1478: Identifier or string literal expected. +/index.ts(2,30): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(2,53): error TS1005: ';' expected. +/index.ts(2,64): error TS1128: Declaration or statement expected. +/index.ts(2,66): error TS1128: Declaration or statement expected. +/index.ts(2,67): error TS1128: Declaration or statement expected. +/index.ts(2,68): error TS1128: Declaration or statement expected. +/index.ts(2,69): error TS2304: Cannot find name 'RequireInterface'. +/index.ts(3,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/index.ts(3,34): error TS1005: ':' expected. +/index.ts(3,68): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/index.ts(5,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(5,57): error TS1478: Identifier or string literal expected. +/index.ts(5,57): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(5,80): error TS1005: ';' expected. +/index.ts(5,91): error TS1128: Declaration or statement expected. +/index.ts(5,93): error TS1128: Declaration or statement expected. +/index.ts(5,94): error TS1128: Declaration or statement expected. +/index.ts(5,95): error TS1128: Declaration or statement expected. +/index.ts(5,96): error TS1434: Unexpected keyword or identifier. +/index.ts(5,96): error TS2304: Cannot find name 'RequireInterface'. +/index.ts(5,112): error TS1128: Declaration or statement expected. +/index.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(6,57): error TS1478: Identifier or string literal expected. +/index.ts(6,57): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(6,80): error TS1005: ';' expected. +/index.ts(6,90): error TS1128: Declaration or statement expected. +/index.ts(6,92): error TS1128: Declaration or statement expected. +/index.ts(6,93): error TS1128: Declaration or statement expected. +/index.ts(6,94): error TS1128: Declaration or statement expected. +/index.ts(6,95): error TS1434: Unexpected keyword or identifier. +/index.ts(6,95): error TS2304: Cannot find name 'ImportInterface'. +/index.ts(6,110): error TS1128: Declaration or statement expected. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /index.ts (34 errors) ==== + export type LocalInterface = + & import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~ +!!! error TS1005: ':' expected. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} + +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts new file mode 100644 index 0000000000000..8c398216dee4b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts @@ -0,0 +1,407 @@ +//// [tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts] //// + +//// [renamingDestructuredPropertyInFunctionType.ts] +// GH#37454, GH#41044 + +type O = { a?: string; b: number; c: number; }; +type F1 = (arg: number) => any; // OK +type F2 = ({ a: string }: O) => any; // Error +type F3 = ({ a: string, b, c }: O) => any; // Error +type F4 = ({ a: string }: O) => any; // Error +type F5 = ({ a: string, b, c }: O) => any; // Error +type F6 = ({ a: string }) => typeof string; // OK +type F7 = ({ a: string, b: number }) => typeof number; // Error +type F8 = ({ a, b: number }) => typeof number; // OK +type F9 = ([a, b, c]) => void; // OK + +type G1 = new (arg: number) => any; // OK +type G2 = new ({ a: string }: O) => any; // Error +type G3 = new ({ a: string, b, c }: O) => any; // Error +type G4 = new ({ a: string }: O) => any; // Error +type G5 = new ({ a: string, b, c }: O) => any; // Error +type G6 = new ({ a: string }) => typeof string; // OK +type G7 = new ({ a: string, b: number }) => typeof number; // Error +type G8 = new ({ a, b: number }) => typeof number; // OK +type G9 = new ([a, b, c]) => void; // OK + +// Below are Error but renaming is retained in declaration emit, +// since elinding it would leave invalid syntax. +type F10 = ({ "a": string }) => void; // Error +type F11 = ({ 2: string }) => void; // Error +type F12 = ({ ["a"]: string }: O) => void; // Error +type F13 = ({ [2]: string }) => void; // Error +type G10 = new ({ "a": string }) => void; // Error +type G11 = new ({ 2: string }) => void; // Error +type G12 = new ({ ["a"]: string }: O) => void; // Error +type G13 = new ({ [2]: string }) => void; // Error + +interface I { + method1(arg: number): any; // OK + method2({ a: string }): any; // Error + + (arg: number): any; // OK + ({ a: string }): any; // Error + + new (arg: number): any; // OK + new ({ a: string }): any; // Error +} + +// Below are OK but renaming should be removed from declaration emit +function f1({ a: string }: O) { } +const f2 = function({ a: string }: O) { }; +const f3 = ({ a: string, b, c }: O) => { }; +const f4 = function({ a: string }: O): typeof string { return string; }; +const f5 = ({ a: string, b, c }: O): typeof string => ''; +const obj1 = { + method({ a: string }: O) { } +}; +const obj2 = { + method({ a: string }: O): typeof string { return string; } +}; +function f6({ a: string = "" }: O) { } +const f7 = ({ a: string = "", b, c }: O) => { }; +const f8 = ({ "a": string }: O) => { }; +function f9 ({ 2: string }) { }; +function f10 ({ ["a"]: string }: O) { }; +const f11 = ({ [2]: string }) => { }; + +// In below case `string` should be kept because it is used +function f12({ a: string = "" }: O): typeof string { return "a"; } + +/// [Declarations] //// + + + +//// [renamingDestructuredPropertyInFunctionType.d.ts] +type O = { + a?: string; + b: number; + c: number; +}; +type F1 = (arg: number) => any; +type F2 = ({ a: string }: O) => any; +type F3 = ({ a: string, b, c }: O) => any; +type F4 = ({ a: string }: O) => any; +type F5 = ({ a: string, b, c }: O) => any; +type F6 = ({ a: string }: invalid) => typeof string; +type F7 = ({ a: string, b: number }: invalid) => typeof number; +type F8 = ({ a, b: number }: invalid) => typeof number; +type F9 = ([a, b, c]: invalid) => void; +type G1 = new (arg: number) => any; +type G2 = new ({ a: string }: O) => any; +type G3 = new ({ a: string, b, c }: O) => any; +type G4 = new ({ a: string }: O) => any; +type G5 = new ({ a: string, b, c }: O) => any; +type G6 = new ({ a: string }: invalid) => typeof string; +type G7 = new ({ a: string, b: number }: invalid) => typeof number; +type G8 = new ({ a, b: number }: invalid) => typeof number; +type G9 = new ([a, b, c]: invalid) => void; +type F10 = ({ "a": string }: invalid) => void; +type F11 = ({ 2: string }: invalid) => void; +type F12 = ({ ["a"]: string }: O) => void; +type F13 = ({ [2]: string }: invalid) => void; +type G10 = new ({ "a": string }: invalid) => void; +type G11 = new ({ 2: string }: invalid) => void; +type G12 = new ({ ["a"]: string }: O) => void; +type G13 = new ({ [2]: string }: invalid) => void; +interface I { + method1(arg: number): any; + method2({ a: string }: invalid): any; + (arg: number): any; + ({ a: string }: invalid): any; + new (arg: number): any; + new ({ a: string }: invalid): any; +} +declare function f1({ a: string }: O): invalid; +declare const f2: ({ a: string }: O) => invalid; +declare const f3: ({ a: string, b, c }: O) => invalid; +declare const f4: ({ a: string }: O) => typeof string; +declare const f5: ({ a: string, b, c }: O) => typeof string; +declare const obj1: invalid; +declare const obj2: { + method({ a: string }: O): typeof string; +}; +declare function f6({ a: string }: O): invalid; +declare const f7: ({ a: string, b, c }: O) => invalid; +declare const f8: ({ "a": string }: O) => invalid; +declare function f9({ 2: string }: invalid): invalid; +declare function f10({ ["a"]: string }: O): invalid; +declare const f11: ({ [2]: string }: invalid) => invalid; +declare function f12({ a: string }: O): typeof string; + +/// [Errors] //// + +renamingDestructuredPropertyInFunctionType.ts(5,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(6,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(7,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(8,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(9,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(10,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(10,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(11,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(12,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(15,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(16,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(17,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(18,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(19,16): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(20,16): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(20,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(21,16): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(22,16): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(26,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(26,20): error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(27,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(27,18): error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(28,22): error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(29,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(29,20): error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(30,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(30,24): error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(31,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(31,22): error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(32,26): error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(33,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(33,24): error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(37,11): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(37,16): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(40,4): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(40,9): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(43,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(43,13): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(47,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(50,47): error TS4025: Exported variable 'f4' has or is using private name 'string'. +renamingDestructuredPropertyInFunctionType.ts(51,45): error TS4025: Exported variable 'f5' has or is using private name 'string'. +renamingDestructuredPropertyInFunctionType.ts(53,3): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(56,36): error TS4025: Exported variable 'obj2' has or is using private name 'string'. +renamingDestructuredPropertyInFunctionType.ts(58,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(61,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(61,14): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(62,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. + + +==== renamingDestructuredPropertyInFunctionType.ts (53 errors) ==== + // GH#37454, GH#41044 + + type O = { a?: string; b: number; c: number; }; + type F1 = (arg: number) => any; // OK + type F2 = ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F3 = ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F4 = ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F5 = ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F6 = ({ a: string }) => typeof string; // OK + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:9:12: Add a type annotation to the parameter { a: string }. + type F7 = ({ a: string, b: number }) => typeof number; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:10:12: Add a type annotation to the parameter { a: string, b: number }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:10:36: We can only write a type for 'a' by adding a type for the entire parameter here. + type F8 = ({ a, b: number }) => typeof number; // OK + ~~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:11:12: Add a type annotation to the parameter { a, b: number }. + type F9 = ([a, b, c]) => void; // OK + ~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:12:12: Add a type annotation to the parameter [a, b, c]. + + type G1 = new (arg: number) => any; // OK + type G2 = new ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G3 = new ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G4 = new ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G5 = new ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G6 = new ({ a: string }) => typeof string; // OK + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:19:16: Add a type annotation to the parameter { a: string }. + type G7 = new ({ a: string, b: number }) => typeof number; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:20:16: Add a type annotation to the parameter { a: string, b: number }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:20:40: We can only write a type for 'a' by adding a type for the entire parameter here. + type G8 = new ({ a, b: number }) => typeof number; // OK + ~~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:21:16: Add a type annotation to the parameter { a, b: number }. + type G9 = new ([a, b, c]) => void; // OK + ~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:22:16: Add a type annotation to the parameter [a, b, c]. + + // Below are Error but renaming is retained in declaration emit, + // since elinding it would leave invalid syntax. + type F10 = ({ "a": string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:26:13: Add a type annotation to the parameter { "a": string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:26:28: We can only write a type for '"a"' by adding a type for the entire parameter here. + type F11 = ({ 2: string }) => void; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:27:13: Add a type annotation to the parameter { 2: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:27:26: We can only write a type for '2' by adding a type for the entire parameter here. + type F12 = ({ ["a"]: string }: O) => void; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? + type F13 = ({ [2]: string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:29:13: Add a type annotation to the parameter { [2]: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:29:28: We can only write a type for '[2]' by adding a type for the entire parameter here. + type G10 = new ({ "a": string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:30:17: Add a type annotation to the parameter { "a": string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:30:32: We can only write a type for '"a"' by adding a type for the entire parameter here. + type G11 = new ({ 2: string }) => void; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:31:17: Add a type annotation to the parameter { 2: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:31:30: We can only write a type for '2' by adding a type for the entire parameter here. + type G12 = new ({ ["a"]: string }: O) => void; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? + type G13 = new ({ [2]: string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:33:17: Add a type annotation to the parameter { [2]: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:33:32: We can only write a type for '[2]' by adding a type for the entire parameter here. + + interface I { + method1(arg: number): any; // OK + method2({ a: string }): any; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:37:11: Add a type annotation to the parameter { a: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:37:24: We can only write a type for 'a' by adding a type for the entire parameter here. + + (arg: number): any; // OK + ({ a: string }): any; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:40:4: Add a type annotation to the parameter { a: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:40:17: We can only write a type for 'a' by adding a type for the entire parameter here. + + new (arg: number): any; // OK + new ({ a: string }): any; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:43:8: Add a type annotation to the parameter { a: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:43:21: We can only write a type for 'a' by adding a type for the entire parameter here. + } + + // Below are OK but renaming should be removed from declaration emit + function f1({ a: string }: O) { } + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 renamingDestructuredPropertyInFunctionType.ts:47:10: Add a return type to the function declaration. + const f2 = function({ a: string }: O) { }; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:48:7: Add a type annotation to the variable f2. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:48:12: Add a return type to the function expression. + const f3 = ({ a: string, b, c }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:49:7: Add a type annotation to the variable f3. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:49:12: Add a return type to the function expression. + const f4 = function({ a: string }: O): typeof string { return string; }; + ~~~~~~ +!!! error TS4025: Exported variable 'f4' has or is using private name 'string'. + const f5 = ({ a: string, b, c }: O): typeof string => ''; + ~~~~~~ +!!! error TS4025: Exported variable 'f5' has or is using private name 'string'. + const obj1 = { + method({ a: string }: O) { } + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:52:7: Add a type annotation to the variable obj1. +!!! related TS9034 renamingDestructuredPropertyInFunctionType.ts:53:3: Add a return type to the method + }; + const obj2 = { + method({ a: string }: O): typeof string { return string; } + ~~~~~~ +!!! error TS4025: Exported variable 'obj2' has or is using private name 'string'. + }; + function f6({ a: string = "" }: O) { } + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 renamingDestructuredPropertyInFunctionType.ts:58:10: Add a return type to the function declaration. + const f7 = ({ a: string = "", b, c }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:59:7: Add a type annotation to the variable f7. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:59:12: Add a return type to the function expression. + const f8 = ({ "a": string }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:60:7: Add a type annotation to the variable f8. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:60:12: Add a return type to the function expression. + function f9 ({ 2: string }) { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 renamingDestructuredPropertyInFunctionType.ts:61:10: Add a return type to the function declaration. + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:61:14: Add a type annotation to the parameter { 2: string }. + function f10 ({ ["a"]: string }: O) { }; + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 renamingDestructuredPropertyInFunctionType.ts:62:10: Add a return type to the function declaration. + const f11 = ({ [2]: string }) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:63:7: Add a type annotation to the variable f11. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:63:14: Add a return type to the function expression. + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:63:15: Add a type annotation to the parameter { [2]: string }. + + // In below case `string` should be kept because it is used + function f12({ a: string = "" }: O): typeof string { return "a"; } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts new file mode 100644 index 0000000000000..7bbb9488c783d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts @@ -0,0 +1,65 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// + +//// [symbolDeclarationEmit12.ts] +module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + set [Symbol.toPrimitive](x: I) { } + } +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit12.d.ts] +declare namespace M { + interface I { + } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I): invalid; + [Symbol.isConcatSpreadable](): I; + get [Symbol.toPrimitive](): invalid; + set [Symbol.toPrimitive](x: I); + } + export {}; +} + +/// [Errors] //// + +symbolDeclarationEmit12.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. +symbolDeclarationEmit12.ts(9,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +==== symbolDeclarationEmit12.ts (4 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 symbolDeclarationEmit12.ts:5:9: Add a return type to the method + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 symbolDeclarationEmit12.ts:9:13: Add a return type to the get accessor declaration. + set [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts new file mode 100644 index 0000000000000..31b9aa2c2a877 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/typeReferenceDirectives11.ts] //// + +//// [mod2.ts] +import {foo} from "./mod1"; +export const bar = foo(); + +//// [index.d.ts] +interface Lib { x } + +//// [mod1.ts] +export function foo(): Lib { return {x: 1} } + + +/// [Declarations] //// + + + +//// [/mod1.d.ts] +export declare function foo(): Lib; + +//// [/mod2.d.ts] +export declare const bar: invalid; + +/// [Errors] //// + +/mod2.ts(2,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== /mod2.ts (1 errors) ==== + import {foo} from "./mod1"; + export const bar = foo(); + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /mod2.ts:2:14: Add a type annotation to the variable bar. + +==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } + +==== /mod1.ts (0 errors) ==== + export function foo(): Lib { return {x: 1} } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts new file mode 100644 index 0000000000000..02b26e1697c09 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/typeReferenceDirectives13.ts] //// + +//// [app.ts] +/// +import {$} from "./ref"; +export interface A { + x: () => typeof $ +} + +//// [ref.d.ts] +export interface $ { x } + +//// [index.d.ts] +declare let $: { x: number } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +import { $ } from "./ref"; +export interface A { + x: () => typeof $; +} + +/// [Errors] //// + +/app.ts(1,23): error TS9025: Reference directives are not supported with --isolatedDeclarations. + + +==== /app.ts (1 errors) ==== + /// + ~~~ +!!! error TS9025: Reference directives are not supported with --isolatedDeclarations. + import {$} from "./ref"; + export interface A { + x: () => typeof $ + } + +==== /ref.d.ts (0 errors) ==== + export interface $ { x } + +==== /types/lib/index.d.ts (0 errors) ==== + declare let $: { x: number } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts new file mode 100644 index 0000000000000..6dc94773e98de --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/typeReferenceDirectives2.ts] //// + +//// [app.ts] +interface A { + x: $ +} +//// [index.d.ts] +interface $ { x } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +interface A { + x: $; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts new file mode 100644 index 0000000000000..c75c9c2e4cee1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/typeReferenceDirectives5.ts] //// + +//// [app.ts] +/// +import {$} from "./ref"; +export interface A { + x: typeof $; +} +//// [ref.d.ts] +export interface $ { x } + +//// [index.d.ts] +declare let $: { x: number } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +import { $ } from "./ref"; +export interface A { + x: typeof $; +} + +/// [Errors] //// + +/app.ts(1,23): error TS9025: Reference directives are not supported with --isolatedDeclarations. + + +==== /app.ts (1 errors) ==== + /// + ~~~ +!!! error TS9025: Reference directives are not supported with --isolatedDeclarations. + import {$} from "./ref"; + export interface A { + x: typeof $; + } +==== /ref.d.ts (0 errors) ==== + export interface $ { x } + +==== /types/lib/index.d.ts (0 errors) ==== + declare let $: { x: number } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts new file mode 100644 index 0000000000000..c8552c033897f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/typeReferenceDirectives8.ts] //// + +//// [mod2.ts] +import {foo} from "./mod1"; +export const bar = foo(); +//// [index.d.ts] +interface Lib { x } + +//// [mod1.ts] +export function foo(): Lib { return {x: 1} } + + +/// [Declarations] //// + + + +//// [/mod1.d.ts] +export declare function foo(): Lib; + +//// [/mod2.d.ts] +export declare const bar: invalid; + +/// [Errors] //// + +/mod2.ts(2,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== /mod2.ts (1 errors) ==== + import {foo} from "./mod1"; + export const bar = foo(); + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /mod2.ts:2:14: Add a type annotation to the variable bar. +==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } + +==== /mod1.ts (0 errors) ==== + export function foo(): Lib { return {x: 1} } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts new file mode 100644 index 0000000000000..69900aa02d3b5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts @@ -0,0 +1,164 @@ +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +//// [computedPropertiesNarrowed.ts] +const x: 0 | 1 = Math.random()? 0: 1; +declare function assert(n: number): asserts n is 1; +assert(x); +export let o = { + [x]: 1 // error narrow type !== declared type +} + + +const y: 0 = 0 +export let o2 = { + [y]: 1 // ok literal computed type +} + +// literals are ok +export let o3 = { [1]: 1 } +export let o31 = { [-1]: 1 } + +export let o32 = { [1-1]: 1 } // error number + +let u = Symbol(); +export let o4 = { + [u]: 1 // Should error, nut a unique symbol +} + +export let o5 ={ + [Symbol()]: 1 // Should error +} + +const uu: unique symbol = Symbol(); +export let o6 = { + [uu]: 1 // Should be ok +} + + +function foo (): 1 { return 1; } +export let o7 = { + [foo()]: 1 // Should error +}; + +let E = { A: 1 } as const +export const o8 = { + [E.A]: 1 // Fresh +} + +function ns() { return { v: 0 } as const } +export const o9 = { + [ns().v]: 1 +} + + +/// [Declarations] //// + + + +//// [computedPropertiesNarrowed.d.ts] +export declare let o: invalid; +declare const y: 0; +export declare let o2: { + 0: number; +}; +export declare let o3: { + 1: number; +}; +export declare let o31: { + [-1]: number; +}; +export declare let o32: invalid; +export declare let o4: invalid; +export declare let o5: invalid; +declare const uu: unique symbol; +export declare let o6: { + [uu]: number; +}; +export declare let o7: invalid; +declare let E: { + readonly A: 1; +}; +export declare const o8: { + 1: number; +}; +export declare const o9: invalid; +export {}; + +/// [Errors] //// + +computedPropertiesNarrowed.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(18,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(22,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(26,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(37,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + +==== computedPropertiesNarrowed.ts (6 errors) ==== + const x: 0 | 1 = Math.random()? 0: 1; + declare function assert(n: number): asserts n is 1; + assert(x); + export let o = { + [x]: 1 // error narrow type !== declared type + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:4:12: Add a type annotation to the variable o. + } + + + const y: 0 = 0 + export let o2 = { + [y]: 1 // ok literal computed type + } + + // literals are ok + export let o3 = { [1]: 1 } + export let o31 = { [-1]: 1 } + + export let o32 = { [1-1]: 1 } // error number + ~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:18:12: Add a type annotation to the variable o32. + + let u = Symbol(); + export let o4 = { + [u]: 1 // Should error, nut a unique symbol + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:21:12: Add a type annotation to the variable o4. + } + + export let o5 ={ + [Symbol()]: 1 // Should error + ~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:25:12: Add a type annotation to the variable o5. + } + + const uu: unique symbol = Symbol(); + export let o6 = { + [uu]: 1 // Should be ok + } + + + function foo (): 1 { return 1; } + export let o7 = { + [foo()]: 1 // Should error + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:36:12: Add a type annotation to the variable o7. + }; + + let E = { A: 1 } as const + export const o8 = { + [E.A]: 1 // Fresh + } + + function ns() { return { v: 0 } as const } + export const o9 = { + [ns().v]: 1 + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertiesNarrowed.ts:46:14: Add a type annotation to the variable o9. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts new file mode 100644 index 0000000000000..227385c887ee2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts @@ -0,0 +1,845 @@ +//// [tests/cases/compiler/correlatedUnions.ts] //// + +//// [correlatedUnions.ts] +// Various repros from #30581 + +type RecordMap = { n: number, s: string, b: boolean }; +type UnionRecord = { [P in K]: { + kind: P, + v: RecordMap[P], + f: (v: RecordMap[P]) => void +}}[K]; + +function processRecord(rec: UnionRecord) { + rec.f(rec.v); +} + +declare const r1: UnionRecord<'n'>; // { kind: 'n', v: number, f: (v: number) => void } +declare const r2: UnionRecord; // { kind: 'n', ... } | { kind: 's', ... } | { kind: 'b', ... } + +processRecord(r1); +processRecord(r2); +processRecord({ kind: 'n', v: 42, f: v => v.toExponential() }); + +// -------- + +type TextFieldData = { value: string } +type SelectFieldData = { options: string[], selectedValue: string } + +type FieldMap = { + text: TextFieldData; + select: SelectFieldData; +} + +type FormField = { type: K, data: FieldMap[K] }; + +type RenderFunc = (props: FieldMap[K]) => void; +type RenderFuncMap = { [K in keyof FieldMap]: RenderFunc }; + +function renderTextField(props: TextFieldData) {} +function renderSelectField(props: SelectFieldData) {} + +const renderFuncs: RenderFuncMap = { + text: renderTextField, + select: renderSelectField, +}; + +function renderField(field: FormField) { + const renderFn = renderFuncs[field.type]; + renderFn(field.data); +} + +// -------- + +type TypeMap = { + foo: string, + bar: number +}; + +type Keys = keyof TypeMap; + +type HandlerMap = { [P in Keys]: (x: TypeMap[P]) => void }; + +const handlers: HandlerMap = { + foo: s => s.length, + bar: n => n.toFixed(2) +}; + +type DataEntry = { [P in K]: { + type: P, + data: TypeMap[P] +}}[K]; + +const data: DataEntry[] = [ + { type: 'foo', data: 'abc' }, + { type: 'foo', data: 'def' }, + { type: 'bar', data: 42 }, +]; + +function process(data: DataEntry[]) { + data.forEach(block => { + if (block.type in handlers) { + handlers[block.type](block.data) + } + }); +} + +process(data); +process([{ type: 'foo', data: 'abc' }]); + +// -------- + +type LetterMap = { A: string, B: number } +type LetterCaller = { [P in K]: { letter: Record, caller: (x: Record) => void } }[K]; + +function call({ letter, caller }: LetterCaller): void { + caller(letter); +} + +type A = { A: string }; +type B = { B: number }; +type ACaller = (a: A) => void; +type BCaller = (b: B) => void; + +declare const xx: { letter: A, caller: ACaller } | { letter: B, caller: BCaller }; + +call(xx); + +// -------- + +type Ev = { [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; +}}[K]; + +function processEvents(events: Ev[]) { + for (const event of events) { + document.addEventListener(event.name, (ev) => event.callback(ev), { once: event.once }); + } +} + +function createEventListener({ name, once = false, callback }: Ev): Ev { + return { name, once, callback }; +} + +const clickEvent = createEventListener({ + name: "click", + callback: ev => console.log(ev), +}); + +const scrollEvent = createEventListener({ + name: "scroll", + callback: ev => console.log(ev), +}); + +processEvents([clickEvent, scrollEvent]); + +processEvents([ + { name: "click", callback: ev => console.log(ev) }, + { name: "scroll", callback: ev => console.log(ev) }, +]); + +// -------- + +function ff1() { + type ArgMap = { + sum: [a: number, b: number], + concat: [a: string, b: string, c: string] + } + type Keys = keyof ArgMap; + const funs: { [P in Keys]: (...args: ArgMap[P]) => void } = { + sum: (a, b) => a + b, + concat: (a, b, c) => a + b + c + } + function apply(funKey: K, ...args: ArgMap[K]) { + const fn = funs[funKey]; + fn(...args); + } + const x1 = apply('sum', 1, 2) + const x2 = apply('concat', 'str1', 'str2', 'str3' ) +} + +// Repro from #47368 + +type ArgMap = { a: number, b: string }; +type Func = (x: ArgMap[K]) => void; +type Funcs = { [K in keyof ArgMap]: Func }; + +function f1(funcs: Funcs, key: K, arg: ArgMap[K]) { + funcs[key](arg); +} + +function f2(funcs: Funcs, key: K, arg: ArgMap[K]) { + const func = funcs[key]; // Type Funcs[K] + func(arg); +} + +function f3(funcs: Funcs, key: K, arg: ArgMap[K]) { + const func: Func = funcs[key]; + func(arg); +} + +function f4(x: Funcs[keyof ArgMap], y: Funcs[K]) { + x = y; +} + +// Repro from #47890 + +interface MyObj { + someKey: { + name: string; + } + someOtherKey: { + name: number; + } +} + +const ref: MyObj = { + someKey: { name: "" }, + someOtherKey: { name: 42 } +}; + +function func(k: K): MyObj[K]['name'] | undefined { + const myObj: Partial[K] = ref[k]; + if (myObj) { + return myObj.name; + } + const myObj2: Partial[keyof MyObj] = ref[k]; + if (myObj2) { + return myObj2.name; + } + return undefined; +} + +// Repro from #48157 + +interface Foo { + bar?: string +} + +function foo(prop: T, f: Required) { + bar(f[prop]); +} + +declare function bar(t: string): void; + +// Repro from #48246 + +declare function makeCompleteLookupMapping, Attr extends keyof T[number]>( + ops: T, attr: Attr): { [Item in T[number]as Item[Attr]]: Item }; + +const ALL_BARS = [{ name: 'a'}, {name: 'b'}] as const; + +const BAR_LOOKUP = makeCompleteLookupMapping(ALL_BARS, 'name'); + +type BarLookup = typeof BAR_LOOKUP; + +type Baz = { [K in keyof BarLookup]: BarLookup[K]['name'] }; + +// repro from #43982 + +interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; +} +type KeyOfOriginal = keyof Original; +type NestedKeyOfOriginalFor = keyof Original[T]; + +type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; +}; + +type MappedFromOriginal = SameKeys; + +const getStringAndNumberFromOriginalAndMapped = < + K extends KeyOfOriginal, + N extends NestedKeyOfOriginalFor +>( + original: Original, + mappedFromOriginal: MappedFromOriginal, + key: K, + nestedKey: N +): [Original[K][N], MappedFromOriginal[K][N]] => { + return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]]; +}; + +// repro from #31675 +interface Config { + string: string; + number: number; +} + +function getConfigOrDefault( + userConfig: Partial, + key: T, + defaultValue: Config[T] +): Config[T] { + const userValue = userConfig[key]; + const assertedCheck = userValue ? userValue! : defaultValue; + return assertedCheck; +} + +// repro from #47523 + +type Foo1 = { + x: number; + y: string; +}; + +function getValueConcrete( + o: Partial, + k: K +): Foo1[K] | undefined { + return o[k]; +} + + +/// [Declarations] //// + + + +//// [correlatedUnions.d.ts] +type RecordMap = { + n: number; + s: string; + b: boolean; +}; +type UnionRecord = { + [P in K]: { + kind: P; + v: RecordMap[P]; + f: (v: RecordMap[P]) => void; + }; +}[K]; +declare function processRecord(rec: UnionRecord): invalid; +declare const r1: UnionRecord<'n'>; +declare const r2: UnionRecord; +type TextFieldData = { + value: string; +}; +type SelectFieldData = { + options: string[]; + selectedValue: string; +}; +type FieldMap = { + text: TextFieldData; + select: SelectFieldData; +}; +type FormField = { + type: K; + data: FieldMap[K]; +}; +type RenderFunc = (props: FieldMap[K]) => void; +type RenderFuncMap = { + [K in keyof FieldMap]: RenderFunc; +}; +declare function renderTextField(props: TextFieldData): invalid; +declare function renderSelectField(props: SelectFieldData): invalid; +declare const renderFuncs: RenderFuncMap; +declare function renderField(field: FormField): invalid; +type TypeMap = { + foo: string; + bar: number; +}; +type Keys = keyof TypeMap; +type HandlerMap = { + [P in Keys]: (x: TypeMap[P]) => void; +}; +declare const handlers: HandlerMap; +type DataEntry = { + [P in K]: { + type: P; + data: TypeMap[P]; + }; +}[K]; +declare const data: DataEntry[]; +declare function process(data: DataEntry[]): invalid; +type LetterMap = { + A: string; + B: number; +}; +type LetterCaller = { + [P in K]: { + letter: Record; + caller: (x: Record) => void; + }; +}[K]; +declare function call({ letter, caller }: LetterCaller): void; +type A = { + A: string; +}; +type B = { + B: number; +}; +type ACaller = (a: A) => void; +type BCaller = (b: B) => void; +declare const xx: { + letter: A; + caller: ACaller; +} | { + letter: B; + caller: BCaller; +}; +type Ev = { + [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; + }; +}[K]; +declare function processEvents(events: Ev[]): invalid; +declare function createEventListener({ name, once, callback }: Ev): Ev; +declare const clickEvent: invalid; +declare const scrollEvent: invalid; +declare function ff1(): invalid; +type ArgMap = { + a: number; + b: string; +}; +type Func = (x: ArgMap[K]) => void; +type Funcs = { + [K in keyof ArgMap]: Func; +}; +declare function f1(funcs: Funcs, key: K, arg: ArgMap[K]): invalid; +declare function f2(funcs: Funcs, key: K, arg: ArgMap[K]): invalid; +declare function f3(funcs: Funcs, key: K, arg: ArgMap[K]): invalid; +declare function f4(x: Funcs[keyof ArgMap], y: Funcs[K]): invalid; +interface MyObj { + someKey: { + name: string; + }; + someOtherKey: { + name: number; + }; +} +declare const ref: MyObj; +declare function func(k: K): MyObj[K]['name'] | undefined; +interface Foo { + bar?: string; +} +declare function foo(prop: T, f: Required): invalid; +declare function bar(t: string): void; +declare function makeCompleteLookupMapping, Attr extends keyof T[number]>(ops: T, attr: Attr): { + [Item in T[number] as Item[Attr]]: Item; +}; +declare const ALL_BARS: readonly [{ + readonly name: "a"; +}, { + readonly name: "b"; +}]; +declare const BAR_LOOKUP: invalid; +type BarLookup = typeof BAR_LOOKUP; +type Baz = { + [K in keyof BarLookup]: BarLookup[K]['name']; +}; +interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; +} +type KeyOfOriginal = keyof Original; +type NestedKeyOfOriginalFor = keyof Original[T]; +type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; +}; +type MappedFromOriginal = SameKeys; +declare const getStringAndNumberFromOriginalAndMapped: (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]; +interface Config { + string: string; + number: number; +} +declare function getConfigOrDefault(userConfig: Partial, key: T, defaultValue: Config[T]): Config[T]; +type Foo1 = { + x: number; + y: string; +}; +declare function getValueConcrete(o: Partial, k: K): Foo1[K] | undefined; + +/// [Errors] //// + +correlatedUnions.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(36,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(37,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(44,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(76,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(113,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(123,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +correlatedUnions.ts(128,21): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +correlatedUnions.ts(142,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(166,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(170,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(175,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(180,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(218,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== correlatedUnions.ts (15 errors) ==== + // Various repros from #30581 + + type RecordMap = { n: number, s: string, b: boolean }; + type UnionRecord = { [P in K]: { + kind: P, + v: RecordMap[P], + f: (v: RecordMap[P]) => void + }}[K]; + + function processRecord(rec: UnionRecord) { + ~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:10:10: Add a return type to the function declaration. + rec.f(rec.v); + } + + declare const r1: UnionRecord<'n'>; // { kind: 'n', v: number, f: (v: number) => void } + declare const r2: UnionRecord; // { kind: 'n', ... } | { kind: 's', ... } | { kind: 'b', ... } + + processRecord(r1); + processRecord(r2); + processRecord({ kind: 'n', v: 42, f: v => v.toExponential() }); + + // -------- + + type TextFieldData = { value: string } + type SelectFieldData = { options: string[], selectedValue: string } + + type FieldMap = { + text: TextFieldData; + select: SelectFieldData; + } + + type FormField = { type: K, data: FieldMap[K] }; + + type RenderFunc = (props: FieldMap[K]) => void; + type RenderFuncMap = { [K in keyof FieldMap]: RenderFunc }; + + function renderTextField(props: TextFieldData) {} + ~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:36:10: Add a return type to the function declaration. + function renderSelectField(props: SelectFieldData) {} + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:37:10: Add a return type to the function declaration. + + const renderFuncs: RenderFuncMap = { + text: renderTextField, + select: renderSelectField, + }; + + function renderField(field: FormField) { + ~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:44:10: Add a return type to the function declaration. + const renderFn = renderFuncs[field.type]; + renderFn(field.data); + } + + // -------- + + type TypeMap = { + foo: string, + bar: number + }; + + type Keys = keyof TypeMap; + + type HandlerMap = { [P in Keys]: (x: TypeMap[P]) => void }; + + const handlers: HandlerMap = { + foo: s => s.length, + bar: n => n.toFixed(2) + }; + + type DataEntry = { [P in K]: { + type: P, + data: TypeMap[P] + }}[K]; + + const data: DataEntry[] = [ + { type: 'foo', data: 'abc' }, + { type: 'foo', data: 'def' }, + { type: 'bar', data: 42 }, + ]; + + function process(data: DataEntry[]) { + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:76:10: Add a return type to the function declaration. + data.forEach(block => { + if (block.type in handlers) { + handlers[block.type](block.data) + } + }); + } + + process(data); + process([{ type: 'foo', data: 'abc' }]); + + // -------- + + type LetterMap = { A: string, B: number } + type LetterCaller = { [P in K]: { letter: Record, caller: (x: Record) => void } }[K]; + + function call({ letter, caller }: LetterCaller): void { + caller(letter); + } + + type A = { A: string }; + type B = { B: number }; + type ACaller = (a: A) => void; + type BCaller = (b: B) => void; + + declare const xx: { letter: A, caller: ACaller } | { letter: B, caller: BCaller }; + + call(xx); + + // -------- + + type Ev = { [P in K]: { + readonly name: P; + readonly once?: boolean; + readonly callback: (ev: DocumentEventMap[P]) => void; + }}[K]; + + function processEvents(events: Ev[]) { + ~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:113:10: Add a return type to the function declaration. + for (const event of events) { + document.addEventListener(event.name, (ev) => event.callback(ev), { once: event.once }); + } + } + + function createEventListener({ name, once = false, callback }: Ev): Ev { + return { name, once, callback }; + } + + const clickEvent = createEventListener({ + ~~~~~~~~~~~~~~~~~~~~~ + name: "click", + ~~~~~~~~~~~~~~~~~~ + callback: ev => console.log(ev), + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 correlatedUnions.ts:123:7: Add a type annotation to the variable clickEvent. + + const scrollEvent = createEventListener({ + ~~~~~~~~~~~~~~~~~~~~~ + name: "scroll", + ~~~~~~~~~~~~~~~~~~~ + callback: ev => console.log(ev), + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 correlatedUnions.ts:128:7: Add a type annotation to the variable scrollEvent. + + processEvents([clickEvent, scrollEvent]); + + processEvents([ + { name: "click", callback: ev => console.log(ev) }, + { name: "scroll", callback: ev => console.log(ev) }, + ]); + + // -------- + + function ff1() { + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:142:10: Add a return type to the function declaration. + type ArgMap = { + sum: [a: number, b: number], + concat: [a: string, b: string, c: string] + } + type Keys = keyof ArgMap; + const funs: { [P in Keys]: (...args: ArgMap[P]) => void } = { + sum: (a, b) => a + b, + concat: (a, b, c) => a + b + c + } + function apply(funKey: K, ...args: ArgMap[K]) { + const fn = funs[funKey]; + fn(...args); + } + const x1 = apply('sum', 1, 2) + const x2 = apply('concat', 'str1', 'str2', 'str3' ) + } + + // Repro from #47368 + + type ArgMap = { a: number, b: string }; + type Func = (x: ArgMap[K]) => void; + type Funcs = { [K in keyof ArgMap]: Func }; + + function f1(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:166:10: Add a return type to the function declaration. + funcs[key](arg); + } + + function f2(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:170:10: Add a return type to the function declaration. + const func = funcs[key]; // Type Funcs[K] + func(arg); + } + + function f3(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:175:10: Add a return type to the function declaration. + const func: Func = funcs[key]; + func(arg); + } + + function f4(x: Funcs[keyof ArgMap], y: Funcs[K]) { + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:180:10: Add a return type to the function declaration. + x = y; + } + + // Repro from #47890 + + interface MyObj { + someKey: { + name: string; + } + someOtherKey: { + name: number; + } + } + + const ref: MyObj = { + someKey: { name: "" }, + someOtherKey: { name: 42 } + }; + + function func(k: K): MyObj[K]['name'] | undefined { + const myObj: Partial[K] = ref[k]; + if (myObj) { + return myObj.name; + } + const myObj2: Partial[keyof MyObj] = ref[k]; + if (myObj2) { + return myObj2.name; + } + return undefined; + } + + // Repro from #48157 + + interface Foo { + bar?: string + } + + function foo(prop: T, f: Required) { + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 correlatedUnions.ts:218:10: Add a return type to the function declaration. + bar(f[prop]); + } + + declare function bar(t: string): void; + + // Repro from #48246 + + declare function makeCompleteLookupMapping, Attr extends keyof T[number]>( + ops: T, attr: Attr): { [Item in T[number]as Item[Attr]]: Item }; + + const ALL_BARS = [{ name: 'a'}, {name: 'b'}] as const; + + const BAR_LOOKUP = makeCompleteLookupMapping(ALL_BARS, 'name'); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 correlatedUnions.ts:231:7: Add a type annotation to the variable BAR_LOOKUP. + + type BarLookup = typeof BAR_LOOKUP; + + type Baz = { [K in keyof BarLookup]: BarLookup[K]['name'] }; + + // repro from #43982 + + interface Original { + prop1: { + subProp1: string; + subProp2: string; + }; + prop2: { + subProp3: string; + subProp4: string; + }; + } + type KeyOfOriginal = keyof Original; + type NestedKeyOfOriginalFor = keyof Original[T]; + + type SameKeys = { + [K in keyof T]: { + [K2 in keyof T[K]]: number; + }; + }; + + type MappedFromOriginal = SameKeys; + + const getStringAndNumberFromOriginalAndMapped = < + K extends KeyOfOriginal, + N extends NestedKeyOfOriginalFor + >( + original: Original, + mappedFromOriginal: MappedFromOriginal, + key: K, + nestedKey: N + ): [Original[K][N], MappedFromOriginal[K][N]] => { + return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]]; + }; + + // repro from #31675 + interface Config { + string: string; + number: number; + } + + function getConfigOrDefault( + userConfig: Partial, + key: T, + defaultValue: Config[T] + ): Config[T] { + const userValue = userConfig[key]; + const assertedCheck = userValue ? userValue! : defaultValue; + return assertedCheck; + } + + // repro from #47523 + + type Foo1 = { + x: number; + y: string; + }; + + function getValueConcrete( + o: Partial, + k: K + ): Foo1[K] | undefined { + return o[k]; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts new file mode 100644 index 0000000000000..9c7f7134b5ab5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// + +//// [index.ts] +class Src implements NS.Dep { } + +//// [dep.d.ts] +declare namespace NS { + interface Dep { + } +} +//// [package.json] +{ + "typings": "dep.d.ts" +} + +/// [Declarations] //// + + + +//// [/src/index.d.ts] +declare class Src implements NS.Dep { +} + +/// [Errors] //// + +/src/index.ts(1,22): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + + +==== /src/index.ts (1 errors) ==== + class Src implements NS.Dep { } + ~~~~~~ +!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + +==== /deps/dep/dep.d.ts (0 errors) ==== + declare namespace NS { + interface Dep { + } + } +==== /deps/dep/package.json (0 errors) ==== + { + "typings": "dep.d.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitNoNonRequiredParens.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitNoNonRequiredParens.d.ts new file mode 100644 index 0000000000000..c6ec6c6fef9f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitNoNonRequiredParens.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitNoNonRequiredParens.ts] //// + +//// [declarationEmitNoNonRequiredParens.ts] +export enum Test { + A, B, C +} + +export type TestType = typeof Test; + +export const bar = (null as TestType[Extract][]); + +/// [Declarations] //// + + + +//// [declarationEmitNoNonRequiredParens.d.ts] +export declare enum Test { + A = 0, + B = 1, + C = 2 +} +export type TestType = typeof Test; +export declare const bar: Test[]; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitObjectLiteralAccessors1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitObjectLiteralAccessors1.d.ts new file mode 100644 index 0000000000000..1fab674b6d8ff --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitObjectLiteralAccessors1.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + +//// [declarationEmitObjectLiteralAccessors1.ts] +// same type accessors +export const obj1 = { + /** my awesome getter (first in source order) */ + get x(): string { + return ""; + }, + /** my awesome setter (second in source order) */ + set x(a: string) {}, +}; + +// divergent accessors +export const obj2 = { + /** my awesome getter */ + get x(): string { + return ""; + }, + /** my awesome setter */ + set x(a: number) {}, +}; + +export const obj3 = { + /** my awesome getter */ + get x(): string { + return ""; + }, +}; + +export const obj4 = { + /** my awesome setter */ + set x(a: number) {}, +}; + + +/// [Declarations] //// + + + +//// [declarationEmitObjectLiteralAccessors1.d.ts] +export declare const obj1: { + /** my awesome getter (first in source order) */ + x: string; +}; +export declare const obj2: { + /** my awesome getter */ + get x(): string; + /** my awesome setter */ + set x(a: number); +}; +export declare const obj3: { + /** my awesome getter */ + readonly x: string; +}; +export declare const obj4: { + /** my awesome setter */ + x: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitPropertyNumericStringKey.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitPropertyNumericStringKey.d.ts new file mode 100644 index 0000000000000..c821d0151d2e0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitPropertyNumericStringKey.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts] //// + +//// [declarationEmitPropertyNumericStringKey.ts] +// https://github.com/microsoft/TypeScript/issues/55292 + +const STATUS = { + ["404"]: "not found", +} as const; + +const hundredStr = "100"; +const obj = { [hundredStr]: "foo" }; + +const hundredNum = 100; +const obj2 = { [hundredNum]: "bar" }; + + +/// [Declarations] //// + + + +//// [declarationEmitPropertyNumericStringKey.d.ts] +declare const STATUS: { + readonly "404": "not found"; +}; +declare const hundredStr = "100"; +declare const obj: { + "100": string; +}; +declare const hundredNum = 100; +declare const obj2: { + 100: string; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitShadowingInferNotRenamed.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitShadowingInferNotRenamed.d.ts new file mode 100644 index 0000000000000..295bf51fb0503 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitShadowingInferNotRenamed.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts] //// + +//// [declarationEmitShadowingInferNotRenamed.ts] +// Any instance type +type Client = string + +// Modified instance +type UpdatedClient = C & {foo: number} + +export const createClient = < + D extends + | (new (...args: any[]) => Client) // accept class + | Record Client> // or map of classes +>( + clientDef: D +): D extends new (...args: any[]) => infer C + ? UpdatedClient // return instance + : { + [K in keyof D]: D[K] extends new (...args: any[]) => infer C // or map of instances respectively + ? UpdatedClient + : never + } => { + return null as any +} + +/// [Declarations] //// + + + +//// [declarationEmitShadowingInferNotRenamed.d.ts] +type Client = string; +type UpdatedClient = C & { + foo: number; +}; +export declare const createClient: Client> | (new (...args: any[]) => Client)>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { [K in keyof D]: D[K] extends new (...args: any[]) => infer C_1 ? UpdatedClient : never; }; +export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts new file mode 100644 index 0000000000000..53de168e23ad9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts] //// + +//// [other.ts] +type Experiment = { + name: Name; +}; +declare const createExperiment: ( + options: Experiment +) => Experiment; +export default createExperiment({ + name: "foo" +}); + +//// [main.ts] +import other from "./other"; +export const obj = { + [other.name]: 1, +}; + +/// [Declarations] //// + + + +//// [main.d.ts] +import other from "./other"; +export declare const obj: { + foo: number; +}; + +//// [other.d.ts] +declare const _default: invalid; +export default _default; + +/// [Errors] //// + +other.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. + + +==== other.ts (1 errors) ==== + type Experiment = { + name: Name; + }; + declare const createExperiment: ( + options: Experiment + ) => Experiment; + export default createExperiment({ + ~~~~~~~~~~~~~~~~~~ + name: "foo" + ~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. +!!! related TS9036 other.ts:7:1: Move the expression in default export to a variable and add a type annotation to it. + +==== main.ts (0 errors) ==== + import other from "./other"; + export const obj = { + [other.name]: 1, + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts new file mode 100644 index 0000000000000..ffbf562723203 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts] //// + +//// [other.ts] +type Experiment = { + name: Name; +}; +declare const createExperiment: ( + options: Experiment +) => Experiment; +export default createExperiment({ + name: "foo" +}); + +//// [main.ts] +import * as other2 from "./other"; +export const obj = { + [other2.default.name]: 1 +}; + +/// [Declarations] //// + + + +//// [main.d.ts] +import * as other2 from "./other"; +export declare const obj: { + foo: number; +}; + +//// [other.d.ts] +declare const _default: invalid; +export default _default; + +/// [Errors] //// + +other.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. + + +==== other.ts (1 errors) ==== + type Experiment = { + name: Name; + }; + declare const createExperiment: ( + options: Experiment + ) => Experiment; + export default createExperiment({ + ~~~~~~~~~~~~~~~~~~ + name: "foo" + ~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. +!!! related TS9036 other.ts:7:1: Move the expression in default export to a variable and add a type annotation to it. + +==== main.ts (0 errors) ==== + import * as other2 from "./other"; + export const obj = { + [other2.default.name]: 1 + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts new file mode 100644 index 0000000000000..9f755a5e07cd1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// + +//// [index.d.ts] +interface Error2 { + stack2: string; +} + +//// [app.ts] +function foo(): Error2 { + return undefined; +} + +/// [Declarations] //// + + + +//// [/app.d.ts] +declare function foo(): Error2; + +/// [Errors] //// + +/app.ts(1,17): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + + +==== /node_modules/@types/node/index.d.ts (0 errors) ==== + interface Error2 { + stack2: string; + } + +==== /app.ts (1 errors) ==== + function foo(): Error2 { + ~~~~~~ +!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + return undefined; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/duplicatePropertiesInTypeAssertions01.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicatePropertiesInTypeAssertions01.d.ts new file mode 100644 index 0000000000000..7e6295ee7a15b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/duplicatePropertiesInTypeAssertions01.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts] //// + +//// [duplicatePropertiesInTypeAssertions01.ts] +let x = <{a: number; a: number}>{}; + +/// [Declarations] //// + + + +//// [duplicatePropertiesInTypeAssertions01.d.ts] +declare let x: { + a: number; +}; + +/// [Errors] //// + +duplicatePropertiesInTypeAssertions01.ts(1,11): error TS2300: Duplicate identifier 'a'. +duplicatePropertiesInTypeAssertions01.ts(1,22): error TS2300: Duplicate identifier 'a'. + + +==== duplicatePropertiesInTypeAssertions01.ts (2 errors) ==== + let x = <{a: number; a: number}>{}; + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/duplicatePropertiesInTypeAssertions02.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicatePropertiesInTypeAssertions02.d.ts new file mode 100644 index 0000000000000..36d0009105084 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/duplicatePropertiesInTypeAssertions02.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts] //// + +//// [duplicatePropertiesInTypeAssertions02.ts] +let x = {} as {a: number; a: number}; + +/// [Declarations] //// + + + +//// [duplicatePropertiesInTypeAssertions02.d.ts] +declare let x: { + a: number; +}; + +/// [Errors] //// + +duplicatePropertiesInTypeAssertions02.ts(1,16): error TS2300: Duplicate identifier 'a'. +duplicatePropertiesInTypeAssertions02.ts(1,27): error TS2300: Duplicate identifier 'a'. + + +==== duplicatePropertiesInTypeAssertions02.ts (2 errors) ==== + let x = {} as {a: number; a: number}; + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts new file mode 100644 index 0000000000000..e9c5b84d6f2c0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts @@ -0,0 +1,370 @@ +//// [tests/cases/compiler/dynamicNames.ts] //// + +//// [module.ts] +export const c0 = "a"; +export const c1 = 1; +export const s0 = Symbol(); +export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T2 extends T1 { +} +export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; +}; + +//// [main.ts] +import { c0, c1, s0, T0, T1, T2, T3 } from "./module"; +import * as M from "./module"; + +namespace N { + export const c2 = "a"; + export const c3 = 1; + export const s1: typeof s0 = s0; + + export interface T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T5 implements T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T6 extends T5 { + } + export declare type T7 = { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + }; +} + +export const c4 = "a"; +export const c5 = 1; +export const s2: typeof s0 = s0; + +interface T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; +} +declare class T9 implements T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; +} +declare class T10 extends T9 { +} +declare type T11 = { + [c4]: number; + [c5]: string; + [s2]: boolean; +}; + +interface T12 { + a: number; + 1: string; + [s2]: boolean; +} +declare class T13 implements T2 { + a: number; + 1: string; + [s2]: boolean; +} +declare class T14 extends T13 { +} +declare type T15 = { + a: number; + 1: string; + [s2]: boolean; +}; + +declare class C { + static a: number; + static 1: string; + static [s2]: boolean; +} + +let t0: T0; +let t1: T1; +let t2: T2; +let t3: T3; +let t0_1: M.T0; +let t1_1: M.T1; +let t2_1: M.T2; +let t3_1: M.T3; +let t4: N.T4; +let t5: N.T5; +let t6: N.T6; +let t7: N.T7; +let t8: T8; +let t9: T9; +let t10: T10; +let t11: T11; +let t12: T12; +let t13: T13; +let t14: T14; +let t15: T15; + +// assignability +t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2; +t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6; +t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0; +t0 = C; // static side + +// object literals +export const o1 = { + [c4]: 1, + [c5]: "a", + [s2]: true +}; + +// check element access types +export const o1_c4 = o1[c4]; +export const o1_c5 = o1[c5]; +export const o1_s2 = o1[s2]; + +export const o2: T0 = o1; + +// recursive declarations +// (type parameter indirection courtesy of #20400) +declare const rI: RI<"a">; +rI.x +interface RI { + x: T; + [rI.x]: "b"; +} + +declare const rC: RC<"a">; +rC.x +declare class RC { + x: T; + [rC.x]: "b"; +} + + +/// [Declarations] //// + + + +//// [main.d.ts] +import { s0, T0 } from "./module"; +export declare const c4 = "a"; +export declare const c5 = 1; +export declare const s2: typeof s0; +export declare const o1: { + a: number; + 1: string; + [s0]: boolean; +}; +export declare const o1_c4: invalid; +export declare const o1_c5: invalid; +export declare const o1_s2: invalid; +export declare const o2: T0; + +//// [module.d.ts] +export declare const c0 = "a"; +export declare const c1 = 1; +export declare const s0: invalid; +export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T2 extends T1 { +} +export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; +}; + +/// [Errors] //// + +main.ts(109,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +main.ts(110,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +main.ts(111,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +module.ts(3,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== module.ts (1 errors) ==== + export const c0 = "a"; + export const c1 = 1; + export const s0 = Symbol(); + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 module.ts:3:14: Add a type annotation to the variable s0. + export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; + } + export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; + } + export declare class T2 extends T1 { + } + export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; + }; + +==== main.ts (3 errors) ==== + import { c0, c1, s0, T0, T1, T2, T3 } from "./module"; + import * as M from "./module"; + + namespace N { + export const c2 = "a"; + export const c3 = 1; + export const s1: typeof s0 = s0; + + export interface T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T5 implements T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T6 extends T5 { + } + export declare type T7 = { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + }; + } + + export const c4 = "a"; + export const c5 = 1; + export const s2: typeof s0 = s0; + + interface T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; + } + declare class T9 implements T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; + } + declare class T10 extends T9 { + } + declare type T11 = { + [c4]: number; + [c5]: string; + [s2]: boolean; + }; + + interface T12 { + a: number; + 1: string; + [s2]: boolean; + } + declare class T13 implements T2 { + a: number; + 1: string; + [s2]: boolean; + } + declare class T14 extends T13 { + } + declare type T15 = { + a: number; + 1: string; + [s2]: boolean; + }; + + declare class C { + static a: number; + static 1: string; + static [s2]: boolean; + } + + let t0: T0; + let t1: T1; + let t2: T2; + let t3: T3; + let t0_1: M.T0; + let t1_1: M.T1; + let t2_1: M.T2; + let t3_1: M.T3; + let t4: N.T4; + let t5: N.T5; + let t6: N.T6; + let t7: N.T7; + let t8: T8; + let t9: T9; + let t10: T10; + let t11: T11; + let t12: T12; + let t13: T13; + let t14: T14; + let t15: T15; + + // assignability + t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2; + t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6; + t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0; + t0 = C; // static side + + // object literals + export const o1 = { + [c4]: 1, + [c5]: "a", + [s2]: true + }; + + // check element access types + export const o1_c4 = o1[c4]; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:109:14: Add a type annotation to the variable o1_c4. + export const o1_c5 = o1[c5]; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:110:14: Add a type annotation to the variable o1_c5. + export const o1_s2 = o1[s2]; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 main.ts:111:14: Add a type annotation to the variable o1_s2. + + export const o2: T0 = o1; + + // recursive declarations + // (type parameter indirection courtesy of #20400) + declare const rI: RI<"a">; + rI.x + interface RI { + x: T; + [rI.x]: "b"; + } + + declare const rC: RC<"a">; + rC.x + declare class RC { + x: T; + [rC.x]: "b"; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts new file mode 100644 index 0000000000000..5bcce1543b51c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts @@ -0,0 +1,2812 @@ +//// [tests/cases/compiler/giant.ts] //// + +//// [giant.ts] +/* + Prefixes + p -> public + r -> private + i -> import + e -> export + a -> ambient + t -> static + s -> set + g -> get + + MAX DEPTH 3 LEVELS +*/ +var V; +function F() { }; +class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() +} +interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; +} +module M { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export declare module eaM { + var V; + function F() { }; + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + } +} +export var eV; +export function eF() { }; +export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() +} +export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; +} +export module eM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export declare module eaM { + var V; + function F() { }; + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + } +} +export declare var eaV; +export declare function eaF() { }; +export declare class eaC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() +} +export declare module eaM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + static tV; + static tF() { } + } + interface I { + //Call Signature + (); + (): number; + (p: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV + export declare function eaF() { }; + export declare class eaC { } + export declare module eaM { } + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + static tV + static tF() { } + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + export module eM { + var V; + function F() { }; + class C { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + } +} + +/// [Declarations] //// + + + +//// [giant.d.ts] +export declare var eV: invalid; +export declare function eF(): invalid; +export declare class eC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + private rF; + pgF(): invalid; + get pgF(): invalid; + psF(param: any): invalid; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: invalid; + static tF(): invalid; + static tsF(param: any): invalid; + static set tsF(param: any); + static tgF(): invalid; + static get tgF(): invalid; +} +export interface eI { + (): any; + (): number; + (p: invalid): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7(pa1: invalid, pa2: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; +} +export declare namespace eM { + var eV: invalid; + function eF(): invalid; + class eC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + private rF; + pgF(): invalid; + get pgF(): invalid; + psF(param: any): invalid; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: invalid; + static tF(): invalid; + static tsF(param: any): invalid; + static set tsF(param: any); + static tgF(): invalid; + static get tgF(): invalid; + } + interface eI { + (): any; + (): number; + (p: invalid): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7(pa1: invalid, pa2: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; + } + namespace eM { + var eV: invalid; + function eF(): invalid; + class eC { + } + interface eI { + } + namespace eM { } + var eaV: invalid; + function eaF(): invalid; + class eaC { + } + namespace eaM { } + } + var eaV: invalid; + function eaF(): invalid; + class eaC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + private rF; + pgF(): invalid; + get pgF(): invalid; + psF(param: any): invalid; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: invalid; + static tF(): invalid; + static tsF(param: any): invalid; + static set tsF(param: any); + static tgF(): invalid; + static get tgF(): invalid; + } + namespace eaM { + var V: invalid; + function F(): invalid; + class C { + } + interface I { + } + namespace M { } + var eV: invalid; + function eF(): invalid; + class eC { + } + interface eI { + } + namespace eM { } + } +} +export declare var eaV: invalid; +export declare function eaF(): invalid; +export declare class eaC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + private rF; + pgF(): invalid; + get pgF(): invalid; + psF(param: any): invalid; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: invalid; + static tF(): invalid; + static tsF(param: any): invalid; + static set tsF(param: any); + static tgF(): invalid; + static get tgF(): invalid; +} +export declare namespace eaM { + var V: invalid; + function F(): invalid; + class C { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + static tV: invalid; + static tF(): invalid; + } + interface I { + (): any; + (): number; + (p: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7(pa1: invalid, pa2: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; + } + namespace M { + var V: invalid; + function F(): invalid; + class C { + } + interface I { + } + namespace M { } + var eV: invalid; + function eF(): invalid; + class eC { + } + interface eI { + } + namespace eM { } + var eaV: invalid; + function eaF(): invalid; + class eaC { + } + namespace eaM { } + } + var eV: invalid; + function eF(): invalid; + class eC { + constructor(); + pV: invalid; + private rV; + pF(): invalid; + static tV: invalid; + static tF(): invalid; + } + interface eI { + (): any; + (): number; + (p: invalid): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7(pa1: invalid, pa2: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; + } + namespace eM { + var V: invalid; + function F(): invalid; + class C { + } + namespace M { } + var eV: invalid; + function eF(): invalid; + class eC { + } + interface eI { + } + namespace eM { } + } +} + +/// [Errors] //// + +giant.ts(22,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(23,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(23,20): error TS1005: '{' expected. +giant.ts(24,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(25,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(25,29): error TS1005: '{' expected. +giant.ts(26,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(27,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(27,21): error TS1005: '{' expected. +giant.ts(28,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(29,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(29,30): error TS1005: '{' expected. +giant.ts(32,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(33,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(33,29): error TS1005: '{' expected. +giant.ts(34,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(35,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(35,20): error TS1005: '{' expected. +giant.ts(60,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(60,6): error TS2304: Cannot find name 'p'. +giant.ts(61,5): error TS1021: An index signature must have a type annotation. +giant.ts(62,6): error TS1096: An index signature must have exactly one parameter. +giant.ts(75,5): error TS2386: Overload signatures must all be optional or required. +giant.ts(86,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(87,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(87,24): error TS1005: '{' expected. +giant.ts(88,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(89,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(89,33): error TS1005: '{' expected. +giant.ts(90,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(91,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(91,25): error TS1005: '{' expected. +giant.ts(92,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(93,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(93,34): error TS1005: '{' expected. +giant.ts(96,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(97,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(97,33): error TS1005: '{' expected. +giant.ts(98,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(99,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(99,24): error TS1005: '{' expected. +giant.ts(124,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(124,10): error TS2304: Cannot find name 'p'. +giant.ts(125,9): error TS1021: An index signature must have a type annotation. +giant.ts(126,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(139,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(153,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(165,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(166,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(166,24): error TS1005: '{' expected. +giant.ts(167,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(168,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(168,33): error TS1005: '{' expected. +giant.ts(169,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(170,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(170,25): error TS1005: '{' expected. +giant.ts(171,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(172,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(172,34): error TS1005: '{' expected. +giant.ts(175,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(176,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(176,33): error TS1005: '{' expected. +giant.ts(177,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(178,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(178,24): error TS1005: '{' expected. +giant.ts(203,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(203,10): error TS2304: Cannot find name 'p'. +giant.ts(204,9): error TS1021: An index signature must have a type annotation. +giant.ts(205,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(218,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(232,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(237,35): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(239,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(242,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(243,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(244,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(244,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(245,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(246,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(246,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(247,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(248,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(248,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(249,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(250,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(250,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(251,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(253,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(254,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(254,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(255,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(256,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(256,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(257,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(261,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(261,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(266,30): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(272,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(273,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(276,12): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(278,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(280,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(280,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(281,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(281,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(281,20): error TS1005: '{' expected. +giant.ts(282,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(282,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(283,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(283,29): error TS1005: '{' expected. +giant.ts(284,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(285,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(285,21): error TS1005: '{' expected. +giant.ts(286,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(287,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(287,30): error TS1005: '{' expected. +giant.ts(288,12): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(289,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(290,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(290,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(291,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(291,29): error TS1005: '{' expected. +giant.ts(292,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(292,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(293,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(293,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(293,20): error TS1005: '{' expected. +giant.ts(299,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(318,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(318,6): error TS2304: Cannot find name 'p'. +giant.ts(319,5): error TS1021: An index signature must have a type annotation. +giant.ts(320,6): error TS1096: An index signature must have exactly one parameter. +giant.ts(331,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(332,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(332,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(333,5): error TS2386: Overload signatures must all be optional or required. +giant.ts(333,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(333,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(344,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(345,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(345,24): error TS1005: '{' expected. +giant.ts(346,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(347,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(347,33): error TS1005: '{' expected. +giant.ts(348,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(349,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(349,25): error TS1005: '{' expected. +giant.ts(350,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(351,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(351,34): error TS1005: '{' expected. +giant.ts(354,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(355,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(355,33): error TS1005: '{' expected. +giant.ts(356,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(357,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(357,24): error TS1005: '{' expected. +giant.ts(382,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(382,10): error TS2304: Cannot find name 'p'. +giant.ts(383,9): error TS1021: An index signature must have a type annotation. +giant.ts(384,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(397,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(411,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(415,16): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(416,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(419,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(421,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(423,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(423,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(424,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(424,20): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(424,24): error TS1005: '{' expected. +giant.ts(425,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(425,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(426,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(426,33): error TS1005: '{' expected. +giant.ts(427,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(428,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(428,25): error TS1005: '{' expected. +giant.ts(429,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(430,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(430,34): error TS1005: '{' expected. +giant.ts(431,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(432,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(433,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(433,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(434,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(434,33): error TS1005: '{' expected. +giant.ts(435,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(435,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(436,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(436,20): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(436,24): error TS1005: '{' expected. +giant.ts(442,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(461,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(461,10): error TS2304: Cannot find name 'p'. +giant.ts(462,9): error TS1021: An index signature must have a type annotation. +giant.ts(463,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(474,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(475,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(475,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(476,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(476,14): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(476,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(484,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(485,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(489,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(490,33): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(490,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(494,24): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(495,29): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(495,35): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(497,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(498,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(500,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(500,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(501,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(502,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(502,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(502,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(503,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(503,20): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(504,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(504,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(504,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(505,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(506,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(506,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(507,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(508,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(508,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(509,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(510,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(511,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(511,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(512,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(512,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(512,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(513,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(514,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(514,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(514,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(515,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(515,20): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(518,13): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(519,18): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(519,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(519,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(523,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(524,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(524,30): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(530,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(531,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(531,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(533,20): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(534,12): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(536,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(536,17): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(537,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(538,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(538,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(538,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(539,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(539,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(540,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(540,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(540,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(541,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(542,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(542,19): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(543,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(544,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(544,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(545,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(546,12): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(547,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(547,17): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(548,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(548,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(548,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(549,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(550,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(550,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(550,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(551,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(551,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(554,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(555,14): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(555,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(555,21): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(557,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(558,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(560,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(560,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(561,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(562,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(562,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(586,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(586,10): error TS2304: Cannot find name 'p'. +giant.ts(587,9): error TS1021: An index signature must have a type annotation. +giant.ts(588,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(599,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(600,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(600,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(601,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(601,14): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(601,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(604,13): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(605,18): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(605,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(605,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(609,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(610,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(610,30): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(614,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(614,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(615,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(615,33): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(615,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(616,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(617,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(619,16): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(620,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(620,26): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(622,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(623,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(625,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(625,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(626,16): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +giant.ts(627,16): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(627,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(633,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(652,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(652,10): error TS2304: Cannot find name 'p'. +giant.ts(653,9): error TS1021: An index signature must have a type annotation. +giant.ts(654,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(665,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(666,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(666,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(667,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(667,14): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(667,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +giant.ts(670,13): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(671,18): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(671,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(671,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(674,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +giant.ts(675,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient contexts. + + +==== giant.ts (348 errors) ==== + /* + Prefixes + p -> public + r -> private + i -> import + e -> export + a -> ambient + t -> static + s -> set + g -> get + + MAX DEPTH 3 LEVELS + */ + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + private rV; + public pF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV; + static tF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + } + export declare module eaM { + var V; + function F() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:272:12: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:273:17: Add a return type to the function declaration. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:276:12: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:278:12: Add a return type to the method + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:280:12: Add a return type to the method + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:281:16: Add a return type to the get accessor declaration. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:282:12: Add a return type to the method + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:288:12: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:289:12: Add a return type to the method + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:290:12: Add a return type to the method + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:292:12: Add a return type to the method + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:293:16: Add a return type to the get accessor declaration. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:299:6: Add a type annotation to the parameter p. + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:331:8: Add a type annotation to the parameter pa1. + p7(pa1, pa2): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:332:8: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:332:13: Add a type annotation to the parameter pa2. + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:333:10: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:333:15: Add a type annotation to the parameter pa2. + } + export module eM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:415:16: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:416:21: Add a return type to the function declaration. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:419:16: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:421:16: Add a return type to the method + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:423:16: Add a return type to the method + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:424:20: Add a return type to the get accessor declaration. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:425:16: Add a return type to the method + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:431:16: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:432:16: Add a return type to the method + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:433:16: Add a return type to the method + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:435:16: Add a return type to the method + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:436:20: Add a return type to the get accessor declaration. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:442:10: Add a type annotation to the parameter p. + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:474:12: Add a type annotation to the parameter pa1. + p7(pa1, pa2): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:475:12: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:475:17: Add a type annotation to the parameter pa2. + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:476:14: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:476:19: Add a type annotation to the parameter pa2. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:484:20: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:485:25: Add a return type to the function declaration. + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:489:28: Add a type annotation to the variable eaV. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:490:33: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:494:24: Add a type annotation to the variable eaV. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:495:29: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:498:16: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:500:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:502:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:503:20: Add a return type to the get accessor declaration. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:504:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:510:16: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:511:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:512:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:514:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:515:20: Add a return type to the get accessor declaration. + } + export declare module eaM { + var V; + ~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:518:13: Add a type annotation to the variable V. + function F() { }; + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:519:18: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:523:20: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:524:25: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } + export declare var eaV; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:530:20: Add a type annotation to the variable eaV. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:531:25: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:534:12: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:536:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:538:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:539:16: Add a return type to the get accessor declaration. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:540:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:546:12: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:547:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:548:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:550:12: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 giant.ts:551:16: Add a return type to the get accessor declaration. + } + export declare module eaM { + var V; + ~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:554:9: Add a type annotation to the variable V. + function F() { }; + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:555:14: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:558:16: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:560:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:561:16: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:562:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + interface I { + //Call Signature + (); + (): number; + (p: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:599:12: Add a type annotation to the parameter pa1. + p7(pa1, pa2): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:600:12: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:600:17: Add a type annotation to the parameter pa2. + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:601:14: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:601:19: Add a type annotation to the parameter pa2. + } + module M { + var V; + ~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:604:13: Add a type annotation to the variable V. + function F() { }; + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:605:18: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:609:20: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:610:25: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:614:28: Add a type annotation to the variable eaV. + export declare function eaF() { }; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:615:33: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + export declare module eaM { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:619:16: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:620:21: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:623:16: Add a type annotation to the property pV. + private rV; + public pF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:625:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tV + ~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 giant.ts:626:16: Add a type annotation to the property tV. + static tF() { } + ~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 giant.ts:627:16: Add a return type to the method + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:633:10: Add a type annotation to the parameter p. + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:665:12: Add a type annotation to the parameter pa1. + p7(pa1, pa2): void; + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:666:12: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:666:17: Add a type annotation to the parameter pa2. + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:667:14: Add a type annotation to the parameter pa1. + ~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 giant.ts:667:19: Add a type annotation to the parameter pa2. + } + export module eM { + var V; + ~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:670:13: Add a type annotation to the variable V. + function F() { }; + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:671:18: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + module M { } + export var eV; + ~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 giant.ts:674:20: Add a type annotation to the variable eV. + export function eF() { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 giant.ts:675:25: Add a return type to the function declaration. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/hugeDeclarationOutputGetsTruncatedWithError.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/hugeDeclarationOutputGetsTruncatedWithError.d.ts new file mode 100644 index 0000000000000..479480b2407f5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/hugeDeclarationOutputGetsTruncatedWithError.d.ts @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts] //// + +//// [hugeDeclarationOutputGetsTruncatedWithError.ts] +type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; + +type manyprops = `${props}${props}`; + +export const c = null as any as {[K in manyprops]: {[K2 in manyprops]: `${K}.${K2}`}}; + +/// [Declarations] //// + + +/// [Errors] //// + +hugeDeclarationOutputGetsTruncatedWithError.ts(5,14): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. + + +==== hugeDeclarationOutputGetsTruncatedWithError.ts (1 errors) ==== + type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; + + type manyprops = `${props}${props}`; + + export const c = null as any as {[K in manyprops]: {[K2 in manyprops]: `${K}.${K2}`}}; + ~ +!!! error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts new file mode 100644 index 0000000000000..92f592af315ca --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts @@ -0,0 +1,230 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +//// [isolatedDeclarationErrorsClasses.ts] +export class Cls { + + field = 1 + 1; + method() {} + + methodOk(): void {} + + methodParams(p): void {} + methodParams2(p = 1 + 1): void {} + + get getOnly() { return 0 } + set setOnly(value) { } + + get getSetBad() { return 0 } + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } +} + +let noAnnotationStringName: string = "noAnnotationStringName"; +let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + +const noAnnotationLiteralName = "noAnnotationLiteralName"; +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + +export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName]() { return 0;} + + set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + +} + +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsClasses.d.ts] +export declare class Cls { + field: invalid; + method(): invalid; + methodOk(): void; + methodParams(p: invalid): void; + methodParams2(p?: invalid): void; + get getOnly(): invalid; + set setOnly(value: invalid); + get getSetBad(): invalid; + set getSetBad(value: invalid); + get getSetOk(): number; + set getSetOk(value: number); + get getSetOk2(): number; + set getSetOk2(value: number); + get getSetOk3(): number; + set getSetOk3(value: number); +} +declare const noAnnotationLiteralName = "noAnnotationLiteralName"; +declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; +export declare class C { + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; +} +export interface I { + [noAnnotationLiteralName](): any; +} +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsClasses.ts(3,13): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(8,18): error TS7006: Parameter 'p' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(8,18): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(9,23): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(12,9): error TS7032: Property 'setOnly' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(12,17): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(12,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(14,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(36,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. +isolatedDeclarationErrorsClasses.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(44,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(46,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(48,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + + +==== isolatedDeclarationErrorsClasses.ts (22 errors) ==== + export class Cls { + + field = 1 + 1; + ~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsClasses.ts:3:5: Add a type annotation to the property field. + method() {} + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 isolatedDeclarationErrorsClasses.ts:4:5: Add a return type to the method + + methodOk(): void {} + + methodParams(p): void {} + ~ +!!! error TS7006: Parameter 'p' implicitly has an 'any' type. + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:8:18: Add a type annotation to the parameter p. + methodParams2(p = 1 + 1): void {} + ~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:9:19: Add a type annotation to the parameter p. + + get getOnly() { return 0 } + ~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:11:9: Add a return type to the get accessor declaration. + set setOnly(value) { } + ~~~~~~~ +!!! error TS7032: Property 'setOnly' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:12:9: Add a type to parameter of the set accessor declaration. + + get getSetBad() { return 0 } + ~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:15:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:14:9: Add a return type to the get accessor declaration. + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } + } + + let noAnnotationStringName: string = "noAnnotationStringName"; + let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + + const noAnnotationLiteralName = "noAnnotationLiteralName"; + const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + + export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~ +!!! error TS2304: Cannot find name 'missing'. + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + [noParamAnnotationStringName](v): void { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + ~ +!!! error TS7006: Parameter 'v' implicitly has an 'any' type. + + get [noAnnotationStringName]() { return 0;} + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + set [noParamAnnotationStringName](value) { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + + [("A" + "B") as "AB"] = 1; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + } + + export interface I { + [noAnnotationStringName]: 10; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + [noAnnotationLiteralName](); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsObjects.d.ts new file mode 100644 index 0000000000000..d97a4fae1e5ad --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsObjects.d.ts @@ -0,0 +1,310 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +//// [isolatedDeclarationErrorsObjects.ts] +export let o = { + a: 1, + b: "" +} + +export let oBad = { + a: Math.random(), +} +export const V = 1; +export let oBad2 = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } +} + +export let oWithMethods = { + method() { }, + okMethod(): void { }, + a: 1, + bad() { }, + e: V, +} +export let oWithMethodsNested = { + foo: { + method() { }, + a: 1, + okMethod(): void { }, + bad() { } + } +} + + + +export let oWithAccessor = { + get singleGetterBad() { return 0 }, + set singleSetterBad(value) { }, + + get getSetBad() { return 0 }, + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, +} + +function prop(v: T): T { return v } + +const s: unique symbol = Symbol(); +const str: string = ""; +enum E { + V = 10, +} +export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, +} + +const part = { a: 1 }; + +export const oWithSpread = { + b: 1, + ...part, + c: 1, + part, +} + + +export const oWithSpread = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, +} + + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsObjects.d.ts] +export declare let o: { + a: number; + b: string; +}; +export declare let oBad: invalid; +export declare const V = 1; +export declare let oBad2: invalid; +export declare let oWithMethods: invalid; +export declare let oWithMethodsNested: invalid; +export declare let oWithAccessor: invalid; +declare const s: unique symbol; +declare enum E { + V = 10 +} +export declare const oWithComputedProperties: invalid; +export declare const oWithSpread: invalid; +export declare const oWithSpread: invalid; +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsObjects.ts(7,8): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(12,12): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(16,12): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(21,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(24,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(25,8): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(29,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(32,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(39,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(40,9): error TS7032: Property 'singleSetterBad' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsObjects.ts(40,25): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsObjects.ts(40,25): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(42,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(64,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(65,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(68,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(73,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(75,5): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(77,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(81,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(84,9): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + +==== isolatedDeclarationErrorsObjects.ts (23 errors) ==== + export let o = { + a: 1, + b: "" + } + + export let oBad = { + a: Math.random(), + ~~~~~~~~~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:6:12: Add a type annotation to the variable oBad. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:7:8: Add a type assertion to this expression to make type type explicit. + } + export const V = 1; + export let oBad2 = { + a: { + b: Math.random(), + ~~~~~~~~~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:10:12: Add a type annotation to the variable oBad2. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:12:12: Add a type assertion to this expression to make type type explicit. + }, + c: { + d: 1, + e: V, + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:10:12: Add a type annotation to the variable oBad2. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:16:12: Add a type assertion to this expression to make type type explicit. + } + } + + export let oWithMethods = { + method() { }, + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:21:5: Add a return type to the method + okMethod(): void { }, + a: 1, + bad() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:24:5: Add a return type to the method + e: V, + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:25:8: Add a type assertion to this expression to make type type explicit. + } + export let oWithMethodsNested = { + foo: { + method() { }, + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:27:12: Add a type annotation to the variable oWithMethodsNested. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:29:9: Add a return type to the method + a: 1, + okMethod(): void { }, + bad() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:27:12: Add a type annotation to the variable oWithMethodsNested. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:32:9: Add a return type to the method + } + } + + + + export let oWithAccessor = { + get singleGetterBad() { return 0 }, + ~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 isolatedDeclarationErrorsObjects.ts:39:9: Add a return type to the get accessor declaration. + set singleSetterBad(value) { }, + ~~~~~~~~~~~~~~~ +!!! error TS7032: Property 'singleSetterBad' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsObjects.ts:40:9: Add a type to parameter of the set accessor declaration. + + get getSetBad() { return 0 }, + ~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsObjects.ts:43:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 isolatedDeclarationErrorsObjects.ts:42:9: Add a return type to the get accessor declaration. + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, + } + + function prop(v: T): T { return v } + + const s: unique symbol = Symbol(); + const str: string = ""; + enum E { + V = 10, + } + export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + [prop(2)]: 2, + ~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + [s]: 1, + [E.V]: 1, + [str]: 0, + ~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + } + + const part = { a: 1 }; + + export const oWithSpread = { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + b: 1, + ...part, + ~~~~~~~ +!!! error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:73:14: Add a type annotation to the variable oWithSpread. + c: 1, + part, + ~~~~ +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:73:14: Add a type annotation to the variable oWithSpread. + } + + + export const oWithSpread = { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + b: 1, + nested: { + ...part, + ~~~~~~~ +!!! error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + }, + c: 1, + part, + ~~~~ +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + [str]: 0, + ~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts new file mode 100644 index 0000000000000..e58a54fd6245a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts @@ -0,0 +1,106 @@ +//// [tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts] //// + +//// [mappedTypeWithAsClauseAndLateBoundProperty2.ts] +export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); + + +/// [Declarations] //// + + + +//// [mappedTypeWithAsClauseAndLateBoundProperty2.d.ts] +export declare const thing: { + [x: number]: number; + toString: () => string; + toLocaleString: () => string; + pop: () => number; + push: (...items: number[]) => number; + concat: { + (...items: ConcatArray[]): number[]; + (...items: (number | ConcatArray)[]): number[]; + }; + join: (separator?: string) => string; + reverse: () => number[]; + shift: () => number; + slice: (start?: number, end?: number) => number[]; + sort: (compareFn?: (a: number, b: number) => number) => number[]; + splice: { + (start: number, deleteCount?: number): number[]; + (start: number, deleteCount: number, ...items: number[]): number[]; + }; + unshift: (...items: number[]) => number; + indexOf: (searchElement: number, fromIndex?: number) => number; + lastIndexOf: (searchElement: number, fromIndex?: number) => number; + every: { + (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; + (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; + }; + some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; + forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; + map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; + filter: { + (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; + (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; + }; + reduce: { + (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; + (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; + (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; + }; + reduceRight: { + (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; + (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; + (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; + }; + find: { + (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; + (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; + }; + findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; + fill: (value: number, start?: number, end?: number) => number[]; + copyWithin: (target: number, start: number, end?: number) => number[]; + entries: () => IterableIterator<[number, number]>; + keys: () => IterableIterator; + values: () => IterableIterator; + includes: (searchElement: number, fromIndex?: number) => boolean; + flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; + flat: (this: A, depth?: D) => FlatArray[]; + [Symbol.iterator]: () => IterableIterator; + readonly [Symbol.unscopables]: { + [x: number]: boolean; + length?: boolean; + toString?: boolean; + toLocaleString?: boolean; + pop?: boolean; + push?: boolean; + concat?: boolean; + join?: boolean; + reverse?: boolean; + shift?: boolean; + slice?: boolean; + sort?: boolean; + splice?: boolean; + unshift?: boolean; + indexOf?: boolean; + lastIndexOf?: boolean; + every?: boolean; + some?: boolean; + forEach?: boolean; + map?: boolean; + filter?: boolean; + reduce?: boolean; + reduceRight?: boolean; + find?: boolean; + findIndex?: boolean; + fill?: boolean; + copyWithin?: boolean; + entries?: boolean; + keys?: boolean; + values?: boolean; + includes?: boolean; + flatMap?: boolean; + flat?: boolean; + [Symbol.iterator]?: boolean; + readonly [Symbol.unscopables]?: boolean; + }; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts new file mode 100644 index 0000000000000..16bc2c981b1bf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts @@ -0,0 +1,211 @@ +//// [tests/cases/conformance/types/tuple/named/namedTupleMembers.ts] //// + +//// [namedTupleMembers.ts] +export type Segment = [length: number, count: number]; + +export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number +]; + +declare var a: Segment; +declare var b: SegmentAnnotated; +declare var c: [number, number]; +declare var d: [a: number, b: number]; + +a = b; +a = c; +a = d; + +b = a; +b = c; +b = d; + +c = a; +c = b; +c = d; + +d = a; +d = b; +d = c; + +export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; + +export type Func = (...x: T) => void; + +export const func = null as any as Func; + +export function useState(initial: T): [value: T, setter: (T) => void] { + return null as any; +} + + +export type Iter = Func<[step: number, iterations: number]>; + +export function readSegment([length, count]: [number, number]) {} + +// documenting binding pattern behavior (currently does _not_ generate tuple names) +export const val = null as any as Parameters[0]; + +export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; + +export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; + +declare var q: RecursiveTupleA; +declare var r: RecursiveTupleB; + +q = r; +r = q; + +export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; +export type RecusiveRest2 = [string, ...RecusiveRest2[]]; + +declare var x: RecusiveRest; +declare var y: RecusiveRest2; + +x = y; +y = x; + +declare function f(...x: T): T; +declare function g(elem: object, index: number): object; +declare function getArgsForInjection any>(x: T): Parameters; + +export const argumentsOfGAsFirstArgument = f(getArgsForInjection(g)); // one tuple with captures arguments as first member +export const argumentsOfG = f(...getArgsForInjection(g)); // captured arguments list re-spread + + +/// [Declarations] //// + + + +//// [namedTupleMembers.d.ts] +export type Segment = [length: number, count: number]; +export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number +]; +export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; +export type Func = (...x: T) => void; +export declare const func: Func; +export declare function useState(initial: T): [value: T, setter: (T: invalid) => void]; +export type Iter = Func<[step: number, iterations: number]>; +export declare function readSegment([length, count]: [number, number]): invalid; +export declare const val: [number, number]; +export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; +export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; +export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; +export type RecusiveRest2 = [string, ...RecusiveRest2[]]; +export declare const argumentsOfGAsFirstArgument: invalid; +export declare const argumentsOfG: invalid; + +/// [Errors] //// + +namedTupleMembers.ts(41,62): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +namedTupleMembers.ts(48,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +namedTupleMembers.ts(76,44): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +namedTupleMembers.ts(77,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== namedTupleMembers.ts (4 errors) ==== + export type Segment = [length: number, count: number]; + + export type SegmentAnnotated = [ + /** + * Size of message buffer segment handles + */ + length: number, + /** + * Number of segments handled at once + */ + count: number + ]; + + declare var a: Segment; + declare var b: SegmentAnnotated; + declare var c: [number, number]; + declare var d: [a: number, b: number]; + + a = b; + a = c; + a = d; + + b = a; + b = c; + b = d; + + c = a; + c = b; + c = d; + + d = a; + d = b; + d = c; + + export type WithOptAndRest = [first: number, second?: number, ...rest: string[]]; + + export type Func = (...x: T) => void; + + export const func = null as any as Func; + + export function useState(initial: T): [value: T, setter: (T) => void] { + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 namedTupleMembers.ts:41:62: Add a type annotation to the parameter T. + return null as any; + } + + + export type Iter = Func<[step: number, iterations: number]>; + + export function readSegment([length, count]: [number, number]) {} + ~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 namedTupleMembers.ts:48:17: Add a return type to the function declaration. + + // documenting binding pattern behavior (currently does _not_ generate tuple names) + export const val = null as any as Parameters[0]; + + export type RecursiveTupleA = [initial: string, next: RecursiveTupleA]; + + export type RecursiveTupleB = [first: string, ptr: RecursiveTupleB]; + + declare var q: RecursiveTupleA; + declare var r: RecursiveTupleB; + + q = r; + r = q; + + export type RecusiveRest = [first: string, ...rest: RecusiveRest[]]; + export type RecusiveRest2 = [string, ...RecusiveRest2[]]; + + declare var x: RecusiveRest; + declare var y: RecusiveRest2; + + x = y; + y = x; + + declare function f(...x: T): T; + declare function g(elem: object, index: number): object; + declare function getArgsForInjection any>(x: T): Parameters; + + export const argumentsOfGAsFirstArgument = f(getArgsForInjection(g)); // one tuple with captures arguments as first member + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 namedTupleMembers.ts:76:14: Add a type annotation to the variable argumentsOfGAsFirstArgument. + export const argumentsOfG = f(...getArgsForInjection(g)); // captured arguments list re-spread + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 namedTupleMembers.ts:77:14: Add a type annotation to the variable argumentsOfG. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts new file mode 100644 index 0000000000000..f2f214d0009ed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts new file mode 100644 index 0000000000000..f2f214d0009ed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts new file mode 100644 index 0000000000000..74dc5dfcd82a1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts @@ -0,0 +1,453 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} + +//// [require.d.ts] +export interface RequireInterface {} + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [other.ts] +// missing with: +export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + +export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); +export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + +//// [other2.ts] +// wrong attribute key +export type LocalInterface = + & import("pkg", { with: {"bad": "require"} }).RequireInterface + & import("pkg", { with: {"bad": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"bad": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"bad": "import"} }).ImportInterface); + +//// [other3.ts] +// Array instead of object-y thing +export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + +export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); +export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + +//// [other4.ts] +// Indirected attribute objecty-thing - not allowed +type Attribute1 = { with: {"resolution-mode": "require"} }; +type Attribute2 = { with: {"resolution-mode": "import"} }; + +export type LocalInterface = + & import("pkg", Attribute1).RequireInterface + & import("pkg", Attribute2).ImportInterface; + +export const a = (null as any as import("pkg", Attribute1).RequireInterface); +export const b = (null as any as import("pkg", Attribute2).ImportInterface); + +//// [other5.ts] +export type LocalInterface = + & import("pkg", { with: {} }).RequireInterface + & import("pkg", { with: {} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {} }).ImportInterface); + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + +//// [/.src/out/other.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any; +export declare const b: any; + +//// [/.src/out/other2.d.ts] +export type LocalInterface = import("pkg", { with: { "bad": "require" } }).RequireInterface & import("pkg", { with: { "bad": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: any; + +//// [/.src/out/other3.d.ts] +export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +}]; +export declare const a: invalid; +export declare const b: invalid; + +//// [/.src/out/other4.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any, Attribute1: invalid, RequireInterface: invalid; +export declare const b: any, Attribute2: invalid, ImportInterface: invalid; + +//// [/.src/out/other5.d.ts] +export type LocalInterface = import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: any; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,49): error TS1453: `resolution-mode` should be either `require` or `import`. +/index.ts(5,76): error TS1453: `resolution-mode` should be either `require` or `import`. +/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(3,22): error TS1005: 'with' expected. +/other.ts(3,39): error TS1005: ';' expected. +/other.ts(3,50): error TS1128: Declaration or statement expected. +/other.ts(3,51): error TS1128: Declaration or statement expected. +/other.ts(3,52): error TS1128: Declaration or statement expected. +/other.ts(3,53): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other.ts(4,22): error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. +/other.ts(4,52): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(6,49): error TS1005: 'with' expected. +/other.ts(6,66): error TS1005: ';' expected. +/other.ts(6,77): error TS1128: Declaration or statement expected. +/other.ts(6,78): error TS1128: Declaration or statement expected. +/other.ts(6,79): error TS1128: Declaration or statement expected. +/other.ts(6,80): error TS1434: Unexpected keyword or identifier. +/other.ts(6,80): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(6,96): error TS1128: Declaration or statement expected. +/other.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(7,49): error TS1005: 'with' expected. +/other.ts(7,66): error TS1005: ';' expected. +/other.ts(7,76): error TS1128: Declaration or statement expected. +/other.ts(7,77): error TS1128: Declaration or statement expected. +/other.ts(7,78): error TS1128: Declaration or statement expected. +/other.ts(7,79): error TS1434: Unexpected keyword or identifier. +/other.ts(7,79): error TS2304: Cannot find name 'ImportInterface'. +/other.ts(7,94): error TS1128: Declaration or statement expected. +/other2.ts(3,30): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(4,30): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(4,50): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other2.ts(6,57): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(7,57): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(7,77): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other3.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(3,21): error TS1005: '{' expected. +/other3.ts(3,23): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(3,55): error TS1005: ';' expected. +/other3.ts(3,56): error TS1128: Declaration or statement expected. +/other3.ts(3,57): error TS2304: Cannot find name 'RequireInterface'. +/other3.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other3.ts(4,21): error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. +/other3.ts(4,56): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other3.ts(6,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(6,48): error TS1005: '{' expected. +/other3.ts(6,50): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(6,100): error TS1005: ',' expected. +/other3.ts(7,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(7,48): error TS1005: '{' expected. +/other3.ts(7,50): error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. +/other3.ts(7,98): error TS1005: ',' expected. +/other4.ts(6,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(6,21): error TS1005: '{' expected. +/other4.ts(6,21): error TS2448: Block-scoped variable 'Attribute1' used before its declaration. +/other4.ts(6,31): error TS1128: Declaration or statement expected. +/other4.ts(6,32): error TS1128: Declaration or statement expected. +/other4.ts(6,33): error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +/other4.ts(7,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other4.ts(7,21): error TS2448: Block-scoped variable 'Attribute2' used before its declaration. +/other4.ts(7,33): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other4.ts(9,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(9,48): error TS1005: '{' expected. +/other4.ts(9,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,58): error TS1005: ',' expected. +/other4.ts(9,59): error TS1134: Variable declaration expected. +/other4.ts(9,60): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,76): error TS1005: ',' expected. +/other4.ts(10,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(10,48): error TS1005: '{' expected. +/other4.ts(10,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,58): error TS1005: ',' expected. +/other4.ts(10,59): error TS1134: Variable declaration expected. +/other4.ts(10,60): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,75): error TS1005: ',' expected. +/other5.ts(2,29): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(3,29): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(3,35): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other5.ts(5,56): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(6,56): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(6,62): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} + +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} + +==== /index.ts (2 errors) ==== + export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + + export const a = (null as any as import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface); + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +==== /other.ts (28 errors) ==== + // missing with: + export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~ +!!! error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + +==== /other2.ts (6 errors) ==== + // wrong attribute key + export type LocalInterface = + & import("pkg", { with: {"bad": "require"} }).RequireInterface + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + & import("pkg", { with: {"bad": "import"} }).ImportInterface; + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { with: {"bad": "require"} }).RequireInterface); + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + export const b = (null as any as import("pkg", { with: {"bad": "import"} }).ImportInterface); + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + +==== /other3.ts (19 errors) ==== + // Array instead of object-y thing + export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:6:14: Add a type annotation to the variable a. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:7:14: Add a type annotation to the variable b. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + +==== /other4.ts (23 errors) ==== + // Indirected attribute objecty-thing - not allowed + type Attribute1 = { with: {"resolution-mode": "require"} }; + type Attribute2 = { with: {"resolution-mode": "import"} }; + + export type LocalInterface = + & import("pkg", Attribute1).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:6:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Attribute1' used before its declaration. +!!! related TS2728 /other4.ts:9:48: 'Attribute1' is declared here. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +!!! related TS2728 /other4.ts:9:60: 'RequireInterface' is declared here. + & import("pkg", Attribute2).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Attribute2' used before its declaration. +!!! related TS2728 /other4.ts:10:48: 'Attribute2' is declared here. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", Attribute1).RequireInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:48: Add a type annotation to the variable Attribute1. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:60: Add a type annotation to the variable RequireInterface. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", Attribute2).ImportInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:48: Add a type annotation to the variable Attribute2. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:60: Add a type annotation to the variable ImportInterface. + ~ +!!! error TS1005: ',' expected. + +==== /other5.ts (6 errors) ==== + export type LocalInterface = + & import("pkg", { with: {} }).RequireInterface + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + & import("pkg", { with: {} }).ImportInterface; + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { with: {} }).RequireInterface); + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + export const b = (null as any as import("pkg", { with: {} }).ImportInterface); + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts new file mode 100644 index 0000000000000..74dc5dfcd82a1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts @@ -0,0 +1,453 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} + +//// [require.d.ts] +export interface RequireInterface {} + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +//// [other.ts] +// missing with: +export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + +export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); +export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + +//// [other2.ts] +// wrong attribute key +export type LocalInterface = + & import("pkg", { with: {"bad": "require"} }).RequireInterface + & import("pkg", { with: {"bad": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {"bad": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {"bad": "import"} }).ImportInterface); + +//// [other3.ts] +// Array instead of object-y thing +export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + +export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); +export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + +//// [other4.ts] +// Indirected attribute objecty-thing - not allowed +type Attribute1 = { with: {"resolution-mode": "require"} }; +type Attribute2 = { with: {"resolution-mode": "import"} }; + +export type LocalInterface = + & import("pkg", Attribute1).RequireInterface + & import("pkg", Attribute2).ImportInterface; + +export const a = (null as any as import("pkg", Attribute1).RequireInterface); +export const b = (null as any as import("pkg", Attribute2).ImportInterface); + +//// [other5.ts] +export type LocalInterface = + & import("pkg", { with: {} }).RequireInterface + & import("pkg", { with: {} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {} }).ImportInterface); + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + +//// [/.src/out/other.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any; +export declare const b: any; + +//// [/.src/out/other2.d.ts] +export type LocalInterface = import("pkg", { with: { "bad": "require" } }).RequireInterface & import("pkg", { with: { "bad": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: any; + +//// [/.src/out/other3.d.ts] +export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +}]; +export declare const a: invalid; +export declare const b: invalid; + +//// [/.src/out/other4.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any, Attribute1: invalid, RequireInterface: invalid; +export declare const b: any, Attribute2: invalid, ImportInterface: invalid; + +//// [/.src/out/other5.d.ts] +export type LocalInterface = import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: any; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,49): error TS1453: `resolution-mode` should be either `require` or `import`. +/index.ts(5,76): error TS1453: `resolution-mode` should be either `require` or `import`. +/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(3,22): error TS1005: 'with' expected. +/other.ts(3,39): error TS1005: ';' expected. +/other.ts(3,50): error TS1128: Declaration or statement expected. +/other.ts(3,51): error TS1128: Declaration or statement expected. +/other.ts(3,52): error TS1128: Declaration or statement expected. +/other.ts(3,53): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other.ts(4,22): error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. +/other.ts(4,52): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(6,49): error TS1005: 'with' expected. +/other.ts(6,66): error TS1005: ';' expected. +/other.ts(6,77): error TS1128: Declaration or statement expected. +/other.ts(6,78): error TS1128: Declaration or statement expected. +/other.ts(6,79): error TS1128: Declaration or statement expected. +/other.ts(6,80): error TS1434: Unexpected keyword or identifier. +/other.ts(6,80): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(6,96): error TS1128: Declaration or statement expected. +/other.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(7,49): error TS1005: 'with' expected. +/other.ts(7,66): error TS1005: ';' expected. +/other.ts(7,76): error TS1128: Declaration or statement expected. +/other.ts(7,77): error TS1128: Declaration or statement expected. +/other.ts(7,78): error TS1128: Declaration or statement expected. +/other.ts(7,79): error TS1434: Unexpected keyword or identifier. +/other.ts(7,79): error TS2304: Cannot find name 'ImportInterface'. +/other.ts(7,94): error TS1128: Declaration or statement expected. +/other2.ts(3,30): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(4,30): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(4,50): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other2.ts(6,57): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(7,57): error TS1463: 'resolution-mode' is the only valid key for type import attributes. +/other2.ts(7,77): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other3.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(3,21): error TS1005: '{' expected. +/other3.ts(3,23): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(3,55): error TS1005: ';' expected. +/other3.ts(3,56): error TS1128: Declaration or statement expected. +/other3.ts(3,57): error TS2304: Cannot find name 'RequireInterface'. +/other3.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other3.ts(4,21): error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. +/other3.ts(4,56): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other3.ts(6,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(6,48): error TS1005: '{' expected. +/other3.ts(6,50): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(6,100): error TS1005: ',' expected. +/other3.ts(7,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(7,48): error TS1005: '{' expected. +/other3.ts(7,50): error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. +/other3.ts(7,98): error TS1005: ',' expected. +/other4.ts(6,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(6,21): error TS1005: '{' expected. +/other4.ts(6,21): error TS2448: Block-scoped variable 'Attribute1' used before its declaration. +/other4.ts(6,31): error TS1128: Declaration or statement expected. +/other4.ts(6,32): error TS1128: Declaration or statement expected. +/other4.ts(6,33): error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +/other4.ts(7,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other4.ts(7,21): error TS2448: Block-scoped variable 'Attribute2' used before its declaration. +/other4.ts(7,33): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other4.ts(9,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(9,48): error TS1005: '{' expected. +/other4.ts(9,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,58): error TS1005: ',' expected. +/other4.ts(9,59): error TS1134: Variable declaration expected. +/other4.ts(9,60): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,76): error TS1005: ',' expected. +/other4.ts(10,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(10,48): error TS1005: '{' expected. +/other4.ts(10,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,58): error TS1005: ',' expected. +/other4.ts(10,59): error TS1134: Variable declaration expected. +/other4.ts(10,60): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,75): error TS1005: ',' expected. +/other5.ts(2,29): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(3,29): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(3,35): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other5.ts(5,56): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(6,56): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/other5.ts(6,62): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} + +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} + +==== /index.ts (2 errors) ==== + export type LocalInterface = + & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; + + export const a = (null as any as import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface); + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + export const b = (null as any as import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface); + +==== /other.ts (28 errors) ==== + // missing with: + export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~ +!!! error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + +==== /other2.ts (6 errors) ==== + // wrong attribute key + export type LocalInterface = + & import("pkg", { with: {"bad": "require"} }).RequireInterface + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + & import("pkg", { with: {"bad": "import"} }).ImportInterface; + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { with: {"bad": "require"} }).RequireInterface); + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + export const b = (null as any as import("pkg", { with: {"bad": "import"} }).ImportInterface); + ~~~~~ +!!! error TS1463: 'resolution-mode' is the only valid key for type import attributes. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + +==== /other3.ts (19 errors) ==== + // Array instead of object-y thing + export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:6:14: Add a type annotation to the variable a. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:7:14: Add a type annotation to the variable b. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + +==== /other4.ts (23 errors) ==== + // Indirected attribute objecty-thing - not allowed + type Attribute1 = { with: {"resolution-mode": "require"} }; + type Attribute2 = { with: {"resolution-mode": "import"} }; + + export type LocalInterface = + & import("pkg", Attribute1).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:6:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Attribute1' used before its declaration. +!!! related TS2728 /other4.ts:9:48: 'Attribute1' is declared here. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +!!! related TS2728 /other4.ts:9:60: 'RequireInterface' is declared here. + & import("pkg", Attribute2).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Attribute2' used before its declaration. +!!! related TS2728 /other4.ts:10:48: 'Attribute2' is declared here. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", Attribute1).RequireInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:48: Add a type annotation to the variable Attribute1. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:60: Add a type annotation to the variable RequireInterface. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", Attribute2).ImportInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:48: Add a type annotation to the variable Attribute2. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:60: Add a type annotation to the variable ImportInterface. + ~ +!!! error TS1005: ',' expected. + +==== /other5.ts (6 errors) ==== + export type LocalInterface = + & import("pkg", { with: {} }).RequireInterface + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + & import("pkg", { with: {} }).ImportInterface; + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { with: {} }).RequireInterface); + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + export const b = (null as any as import("pkg", { with: {} }).ImportInterface); + ~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts new file mode 100644 index 0000000000000..392bce9ddd0b7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts new file mode 100644 index 0000000000000..392bce9ddd0b7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts new file mode 100644 index 0000000000000..46f5501137e72 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts @@ -0,0 +1,441 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); +//// [other.ts] +// missing assert: +export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + +export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); +export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); +//// [other2.ts] +// wrong assertion key +export type LocalInterface = + & import("pkg", { assert: {"bad": "require"} }).RequireInterface + & import("pkg", { assert: {"bad": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"bad": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"bad": "import"} }).ImportInterface); +//// [other3.ts] +// Array instead of object-y thing +export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + +export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); +export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); +//// [other4.ts] +// Indirected assertion objecty-thing - not allowed +type Asserts1 = { assert: {"resolution-mode": "require"} }; +type Asserts2 = { assert: {"resolution-mode": "import"} }; + +export type LocalInterface = + & import("pkg", Asserts1).RequireInterface + & import("pkg", Asserts2).ImportInterface; + +export const a = (null as any as import("pkg", Asserts1).RequireInterface); +export const b = (null as any as import("pkg", Asserts2).ImportInterface); +//// [other5.ts] +export type LocalInterface = + & import("pkg", { assert: {} }).RequireInterface + & import("pkg", { assert: {} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {} }).ImportInterface); + + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + +//// [/.src/out/other.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any; +export declare const b: any; + +//// [/.src/out/other2.d.ts] +export type LocalInterface = import("pkg", { assert: { "bad": "require" } }).RequireInterface & import("pkg", { assert: { "bad": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: any; + +//// [/.src/out/other3.d.ts] +export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +}]; +export declare const a: invalid; +export declare const b: invalid; + +//// [/.src/out/other4.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any, Asserts1: invalid, RequireInterface: invalid; +export declare const b: any, Asserts2: invalid, ImportInterface: invalid; + +//// [/.src/out/other5.d.ts] +export type LocalInterface = import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: any; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,51): error TS1453: `resolution-mode` should be either `require` or `import`. +/index.ts(5,78): error TS1453: `resolution-mode` should be either `require` or `import`. +/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(3,22): error TS1005: 'with' expected. +/other.ts(3,39): error TS1005: ';' expected. +/other.ts(3,50): error TS1128: Declaration or statement expected. +/other.ts(3,51): error TS1128: Declaration or statement expected. +/other.ts(3,52): error TS1128: Declaration or statement expected. +/other.ts(3,53): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other.ts(4,22): error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. +/other.ts(4,52): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(6,49): error TS1005: 'with' expected. +/other.ts(6,66): error TS1005: ';' expected. +/other.ts(6,77): error TS1128: Declaration or statement expected. +/other.ts(6,78): error TS1128: Declaration or statement expected. +/other.ts(6,79): error TS1128: Declaration or statement expected. +/other.ts(6,80): error TS1434: Unexpected keyword or identifier. +/other.ts(6,80): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(6,96): error TS1128: Declaration or statement expected. +/other.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(7,49): error TS1005: 'with' expected. +/other.ts(7,66): error TS1005: ';' expected. +/other.ts(7,76): error TS1128: Declaration or statement expected. +/other.ts(7,77): error TS1128: Declaration or statement expected. +/other.ts(7,78): error TS1128: Declaration or statement expected. +/other.ts(7,79): error TS1434: Unexpected keyword or identifier. +/other.ts(7,79): error TS2304: Cannot find name 'ImportInterface'. +/other.ts(7,94): error TS1128: Declaration or statement expected. +/other2.ts(3,32): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(4,32): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(4,52): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other2.ts(6,59): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(7,59): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(7,79): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other3.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(3,21): error TS1005: '{' expected. +/other3.ts(3,23): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(3,55): error TS1005: ';' expected. +/other3.ts(3,56): error TS1128: Declaration or statement expected. +/other3.ts(3,57): error TS2304: Cannot find name 'RequireInterface'. +/other3.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other3.ts(4,21): error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. +/other3.ts(4,56): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other3.ts(6,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(6,48): error TS1005: '{' expected. +/other3.ts(6,50): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(6,100): error TS1005: ',' expected. +/other3.ts(7,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(7,48): error TS1005: '{' expected. +/other3.ts(7,50): error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. +/other3.ts(7,98): error TS1005: ',' expected. +/other4.ts(6,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(6,21): error TS1005: '{' expected. +/other4.ts(6,21): error TS2448: Block-scoped variable 'Asserts1' used before its declaration. +/other4.ts(6,29): error TS1128: Declaration or statement expected. +/other4.ts(6,30): error TS1128: Declaration or statement expected. +/other4.ts(6,31): error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +/other4.ts(7,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other4.ts(7,21): error TS2448: Block-scoped variable 'Asserts2' used before its declaration. +/other4.ts(7,31): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other4.ts(9,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(9,48): error TS1005: '{' expected. +/other4.ts(9,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,56): error TS1005: ',' expected. +/other4.ts(9,57): error TS1134: Variable declaration expected. +/other4.ts(9,58): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,74): error TS1005: ',' expected. +/other4.ts(10,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(10,48): error TS1005: '{' expected. +/other4.ts(10,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,56): error TS1005: ',' expected. +/other4.ts(10,57): error TS1134: Variable declaration expected. +/other4.ts(10,58): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,73): error TS1005: ',' expected. +/other5.ts(2,31): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(3,31): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(3,37): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other5.ts(5,58): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(6,58): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(6,64): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} +==== /index.ts (2 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + + export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface); + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); +==== /other.ts (28 errors) ==== + // missing assert: + export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~ +!!! error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. +==== /other2.ts (6 errors) ==== + // wrong assertion key + export type LocalInterface = + & import("pkg", { assert: {"bad": "require"} }).RequireInterface + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + & import("pkg", { assert: {"bad": "import"} }).ImportInterface; + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { assert: {"bad": "require"} }).RequireInterface); + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + export const b = (null as any as import("pkg", { assert: {"bad": "import"} }).ImportInterface); + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +==== /other3.ts (19 errors) ==== + // Array instead of object-y thing + export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:6:14: Add a type annotation to the variable a. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:7:14: Add a type annotation to the variable b. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. +==== /other4.ts (23 errors) ==== + // Indirected assertion objecty-thing - not allowed + type Asserts1 = { assert: {"resolution-mode": "require"} }; + type Asserts2 = { assert: {"resolution-mode": "import"} }; + + export type LocalInterface = + & import("pkg", Asserts1).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:6:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Asserts1' used before its declaration. +!!! related TS2728 /other4.ts:9:48: 'Asserts1' is declared here. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +!!! related TS2728 /other4.ts:9:58: 'RequireInterface' is declared here. + & import("pkg", Asserts2).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Asserts2' used before its declaration. +!!! related TS2728 /other4.ts:10:48: 'Asserts2' is declared here. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", Asserts1).RequireInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:48: Add a type annotation to the variable Asserts1. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:58: Add a type annotation to the variable RequireInterface. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", Asserts2).ImportInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:48: Add a type annotation to the variable Asserts2. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:58: Add a type annotation to the variable ImportInterface. + ~ +!!! error TS1005: ',' expected. +==== /other5.ts (6 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {} }).RequireInterface + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + & import("pkg", { assert: {} }).ImportInterface; + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { assert: {} }).RequireInterface); + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + export const b = (null as any as import("pkg", { assert: {} }).ImportInterface); + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts new file mode 100644 index 0000000000000..46f5501137e72 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts @@ -0,0 +1,441 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); +//// [other.ts] +// missing assert: +export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + +export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); +export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); +//// [other2.ts] +// wrong assertion key +export type LocalInterface = + & import("pkg", { assert: {"bad": "require"} }).RequireInterface + & import("pkg", { assert: {"bad": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {"bad": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {"bad": "import"} }).ImportInterface); +//// [other3.ts] +// Array instead of object-y thing +export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + +export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); +export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); +//// [other4.ts] +// Indirected assertion objecty-thing - not allowed +type Asserts1 = { assert: {"resolution-mode": "require"} }; +type Asserts2 = { assert: {"resolution-mode": "import"} }; + +export type LocalInterface = + & import("pkg", Asserts1).RequireInterface + & import("pkg", Asserts2).ImportInterface; + +export const a = (null as any as import("pkg", Asserts1).RequireInterface); +export const b = (null as any as import("pkg", Asserts2).ImportInterface); +//// [other5.ts] +export type LocalInterface = + & import("pkg", { assert: {} }).RequireInterface + & import("pkg", { assert: {} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {} }).ImportInterface); + + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: import("pkg", { with: { "resolution-mode": "import" } }).ImportInterface; + +//// [/.src/out/other.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any; +export declare const b: any; + +//// [/.src/out/other2.d.ts] +export type LocalInterface = import("pkg", { assert: { "bad": "require" } }).RequireInterface & import("pkg", { assert: { "bad": "import" } }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: any; + +//// [/.src/out/other3.d.ts] +export type LocalInterface = import("pkg", { with: {} })[{ + "resolution-mode": "require"; +}]; +export declare const a: invalid; +export declare const b: invalid; + +//// [/.src/out/other4.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any, Asserts1: invalid, RequireInterface: invalid; +export declare const b: any, Asserts2: invalid, ImportInterface: invalid; + +//// [/.src/out/other5.d.ts] +export type LocalInterface = import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; +export declare const a: import("pkg").RequireInterface; +export declare const b: any; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,51): error TS1453: `resolution-mode` should be either `require` or `import`. +/index.ts(5,78): error TS1453: `resolution-mode` should be either `require` or `import`. +/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(3,22): error TS1005: 'with' expected. +/other.ts(3,39): error TS1005: ';' expected. +/other.ts(3,50): error TS1128: Declaration or statement expected. +/other.ts(3,51): error TS1128: Declaration or statement expected. +/other.ts(3,52): error TS1128: Declaration or statement expected. +/other.ts(3,53): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other.ts(4,22): error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. +/other.ts(4,52): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(6,49): error TS1005: 'with' expected. +/other.ts(6,66): error TS1005: ';' expected. +/other.ts(6,77): error TS1128: Declaration or statement expected. +/other.ts(6,78): error TS1128: Declaration or statement expected. +/other.ts(6,79): error TS1128: Declaration or statement expected. +/other.ts(6,80): error TS1434: Unexpected keyword or identifier. +/other.ts(6,80): error TS2304: Cannot find name 'RequireInterface'. +/other.ts(6,96): error TS1128: Declaration or statement expected. +/other.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other.ts(7,49): error TS1005: 'with' expected. +/other.ts(7,66): error TS1005: ';' expected. +/other.ts(7,76): error TS1128: Declaration or statement expected. +/other.ts(7,77): error TS1128: Declaration or statement expected. +/other.ts(7,78): error TS1128: Declaration or statement expected. +/other.ts(7,79): error TS1434: Unexpected keyword or identifier. +/other.ts(7,79): error TS2304: Cannot find name 'ImportInterface'. +/other.ts(7,94): error TS1128: Declaration or statement expected. +/other2.ts(3,32): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(4,32): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(4,52): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other2.ts(6,59): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(7,59): error TS1455: `resolution-mode` is the only valid key for type import assertions. +/other2.ts(7,79): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other3.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(3,21): error TS1005: '{' expected. +/other3.ts(3,23): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(3,55): error TS1005: ';' expected. +/other3.ts(3,56): error TS1128: Declaration or statement expected. +/other3.ts(3,57): error TS2304: Cannot find name 'RequireInterface'. +/other3.ts(4,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other3.ts(4,21): error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. +/other3.ts(4,56): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other3.ts(6,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(6,48): error TS1005: '{' expected. +/other3.ts(6,50): error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. +/other3.ts(6,100): error TS1005: ',' expected. +/other3.ts(7,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other3.ts(7,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other3.ts(7,48): error TS1005: '{' expected. +/other3.ts(7,50): error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. +/other3.ts(7,98): error TS1005: ',' expected. +/other4.ts(6,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(6,21): error TS1005: '{' expected. +/other4.ts(6,21): error TS2448: Block-scoped variable 'Asserts1' used before its declaration. +/other4.ts(6,29): error TS1128: Declaration or statement expected. +/other4.ts(6,30): error TS1128: Declaration or statement expected. +/other4.ts(6,31): error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +/other4.ts(7,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/other4.ts(7,21): error TS2448: Block-scoped variable 'Asserts2' used before its declaration. +/other4.ts(7,31): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/other4.ts(9,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(9,48): error TS1005: '{' expected. +/other4.ts(9,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,56): error TS1005: ',' expected. +/other4.ts(9,57): error TS1134: Variable declaration expected. +/other4.ts(9,58): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(9,74): error TS1005: ',' expected. +/other4.ts(10,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/other4.ts(10,48): error TS1005: '{' expected. +/other4.ts(10,48): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,56): error TS1005: ',' expected. +/other4.ts(10,57): error TS1134: Variable declaration expected. +/other4.ts(10,58): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +/other4.ts(10,73): error TS1005: ',' expected. +/other5.ts(2,31): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(3,31): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(3,37): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +/other5.ts(5,58): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(6,58): error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. +/other5.ts(6,64): error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} +==== /index.ts (2 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; + + export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface); + ~~~~~~~~ +!!! error TS1453: `resolution-mode` should be either `require` or `import`. + export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface); +==== /other.ts (28 errors) ==== + // missing assert: + export type LocalInterface = + & import("pkg", {"resolution-mode": "require"}).RequireInterface + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", {"resolution-mode": "import"}).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~ +!!! error TS2353: Object literal may only specify known properties, and '"resolution-mode"' does not exist in type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", {"resolution-mode": "require"}).RequireInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", {"resolution-mode": "import"}).ImportInterface); + ~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: 'with' expected. +!!! related TS1007 /other.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. +==== /other2.ts (6 errors) ==== + // wrong assertion key + export type LocalInterface = + & import("pkg", { assert: {"bad": "require"} }).RequireInterface + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + & import("pkg", { assert: {"bad": "import"} }).ImportInterface; + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { assert: {"bad": "require"} }).RequireInterface); + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + export const b = (null as any as import("pkg", { assert: {"bad": "import"} }).ImportInterface); + ~~~~~ +!!! error TS1455: `resolution-mode` is the only valid key for type import assertions. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. +==== /other3.ts (19 errors) ==== + // Array instead of object-y thing + export type LocalInterface = + & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:3:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2559: Type '{ "resolution-mode": string; }[]' has no properties in common with type 'ImportCallOptions'. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:6:14: Add a type annotation to the variable a. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:6:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "require"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other3.ts:7:14: Add a type annotation to the variable b. + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other3.ts:7:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2538: Type '{ "resolution-mode": "import"; }' cannot be used as an index type. + ~ +!!! error TS1005: ',' expected. +==== /other4.ts (23 errors) ==== + // Indirected assertion objecty-thing - not allowed + type Asserts1 = { assert: {"resolution-mode": "require"} }; + type Asserts2 = { assert: {"resolution-mode": "import"} }; + + export type LocalInterface = + & import("pkg", Asserts1).RequireInterface + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:6:21: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Asserts1' used before its declaration. +!!! related TS2728 /other4.ts:9:48: 'Asserts1' is declared here. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2448: Block-scoped variable 'RequireInterface' used before its declaration. +!!! related TS2728 /other4.ts:9:58: 'RequireInterface' is declared here. + & import("pkg", Asserts2).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~~~~~~~~ +!!! error TS2448: Block-scoped variable 'Asserts2' used before its declaration. +!!! related TS2728 /other4.ts:10:48: 'Asserts2' is declared here. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", Asserts1).RequireInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:48: Add a type annotation to the variable Asserts1. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:9:58: Add a type annotation to the variable RequireInterface. + ~ +!!! error TS1005: ',' expected. + export const b = (null as any as import("pkg", Asserts2).ImportInterface); + ~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~~~~~ +!!! error TS1005: '{' expected. +!!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:48: Add a type annotation to the variable Asserts2. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /other4.ts:10:58: Add a type annotation to the variable ImportInterface. + ~ +!!! error TS1005: ',' expected. +==== /other5.ts (6 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {} }).RequireInterface + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + & import("pkg", { assert: {} }).ImportInterface; + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + + export const a = (null as any as import("pkg", { assert: {} }).RequireInterface); + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + export const b = (null as any as import("pkg", { assert: {} }).ImportInterface); + ~~ +!!! error TS1456: Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`. + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace '"/node_modules/pkg/require"' has no exported member 'ImportInterface'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralComputedNameNoDeclarationError.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralComputedNameNoDeclarationError.d.ts new file mode 100644 index 0000000000000..eb4fa7a65abc2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralComputedNameNoDeclarationError.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts] //// + +//// [objectLiteralComputedNameNoDeclarationError.ts] +const Foo = { + BANANA: 'banana' as 'banana', +} + +export const Baa = { + [Foo.BANANA]: 1 +}; + +/// [Declarations] //// + + + +//// [objectLiteralComputedNameNoDeclarationError.d.ts] +declare const Foo: { + BANANA: "banana"; +}; +export declare const Baa: { + banana: number; +}; +export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseAssertEntriesError.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseAssertEntriesError.d.ts new file mode 100644 index 0000000000000..c8df99fda7e5a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseAssertEntriesError.d.ts @@ -0,0 +1,162 @@ +//// [tests/cases/compiler/parseAssertEntriesError.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface + & import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [import.d.ts] +export interface ImportInterface {} +//// [require.d.ts] +export interface RequireInterface {} + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { assert: {} }); +export declare const a: any; +export declare const b: any; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(2,32): error TS1478: Identifier or string literal expected. +/index.ts(2,32): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(2,55): error TS1005: ';' expected. +/index.ts(2,66): error TS1128: Declaration or statement expected. +/index.ts(2,68): error TS1128: Declaration or statement expected. +/index.ts(2,69): error TS1128: Declaration or statement expected. +/index.ts(2,70): error TS1128: Declaration or statement expected. +/index.ts(2,71): error TS2304: Cannot find name 'RequireInterface'. +/index.ts(3,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/index.ts(3,36): error TS1005: ':' expected. +/index.ts(3,70): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/index.ts(5,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(5,59): error TS1478: Identifier or string literal expected. +/index.ts(5,59): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(5,82): error TS1005: ';' expected. +/index.ts(5,93): error TS1128: Declaration or statement expected. +/index.ts(5,95): error TS1128: Declaration or statement expected. +/index.ts(5,96): error TS1128: Declaration or statement expected. +/index.ts(5,97): error TS1128: Declaration or statement expected. +/index.ts(5,98): error TS1434: Unexpected keyword or identifier. +/index.ts(5,98): error TS2304: Cannot find name 'RequireInterface'. +/index.ts(5,114): error TS1128: Declaration or statement expected. +/index.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(6,59): error TS1478: Identifier or string literal expected. +/index.ts(6,59): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(6,82): error TS1005: ';' expected. +/index.ts(6,92): error TS1128: Declaration or statement expected. +/index.ts(6,94): error TS1128: Declaration or statement expected. +/index.ts(6,95): error TS1128: Declaration or statement expected. +/index.ts(6,96): error TS1128: Declaration or statement expected. +/index.ts(6,97): error TS1434: Unexpected keyword or identifier. +/index.ts(6,97): error TS2304: Cannot find name 'ImportInterface'. +/index.ts(6,112): error TS1128: Declaration or statement expected. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /index.ts (34 errors) ==== + export type LocalInterface = + & import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~ +!!! error TS1005: ':' expected. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseImportAttributesError.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseImportAttributesError.d.ts new file mode 100644 index 0000000000000..dc4201799c4fc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseImportAttributesError.d.ts @@ -0,0 +1,168 @@ +//// [tests/cases/compiler/parseImportAttributesError.ts] //// + +//// [index.ts] +export type LocalInterface = + & import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface + & import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface; + +export const a = (null as any as import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface); +export const b = (null as any as import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface); + +//// [package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} + +//// [import.d.ts] +export interface ImportInterface {} + +//// [require.d.ts] +export interface RequireInterface {} + + +/// [Declarations] //// + + + +//// [/.src/out/index.d.ts] +export type LocalInterface = import("pkg", { with: {} }); +export declare const a: any; +export declare const b: any; + +/// [Errors] //// + +error TS2468: Cannot find global value 'Promise'. +/index.ts(2,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(2,30): error TS1478: Identifier or string literal expected. +/index.ts(2,30): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(2,53): error TS1005: ';' expected. +/index.ts(2,64): error TS1128: Declaration or statement expected. +/index.ts(2,66): error TS1128: Declaration or statement expected. +/index.ts(2,67): error TS1128: Declaration or statement expected. +/index.ts(2,68): error TS1128: Declaration or statement expected. +/index.ts(2,69): error TS2304: Cannot find name 'RequireInterface'. +/index.ts(3,7): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +/index.ts(3,34): error TS1005: ':' expected. +/index.ts(3,68): error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. +/index.ts(5,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(5,57): error TS1478: Identifier or string literal expected. +/index.ts(5,57): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(5,80): error TS1005: ';' expected. +/index.ts(5,91): error TS1128: Declaration or statement expected. +/index.ts(5,93): error TS1128: Declaration or statement expected. +/index.ts(5,94): error TS1128: Declaration or statement expected. +/index.ts(5,95): error TS1128: Declaration or statement expected. +/index.ts(5,96): error TS1434: Unexpected keyword or identifier. +/index.ts(5,96): error TS2304: Cannot find name 'RequireInterface'. +/index.ts(5,112): error TS1128: Declaration or statement expected. +/index.ts(6,34): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? +/index.ts(6,57): error TS1478: Identifier or string literal expected. +/index.ts(6,57): error TS2695: Left side of comma operator is unused and has no side effects. +/index.ts(6,80): error TS1005: ';' expected. +/index.ts(6,90): error TS1128: Declaration or statement expected. +/index.ts(6,92): error TS1128: Declaration or statement expected. +/index.ts(6,93): error TS1128: Declaration or statement expected. +/index.ts(6,94): error TS1128: Declaration or statement expected. +/index.ts(6,95): error TS1434: Unexpected keyword or identifier. +/index.ts(6,95): error TS2304: Cannot find name 'ImportInterface'. +/index.ts(6,110): error TS1128: Declaration or statement expected. + + +!!! error TS2468: Cannot find global value 'Promise'. +==== /index.ts (34 errors) ==== + export type LocalInterface = + & import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + & import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + ~ +!!! error TS1005: ':' expected. + ~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'ImportInterface' does not exist on type 'Promise<{ default: typeof import("/node_modules/pkg/import"); }>'. + + export const a = (null as any as import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RequireInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + export const b = (null as any as import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'? + ~~~~ +!!! error TS1478: Identifier or string literal expected. + ~~~~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ImportInterface'. + ~ +!!! error TS1128: Declaration or statement expected. + +==== /node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + +==== /node_modules/pkg/import.d.ts (0 errors) ==== + export interface ImportInterface {} + +==== /node_modules/pkg/require.d.ts (0 errors) ==== + export interface RequireInterface {} + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts new file mode 100644 index 0000000000000..3f7954f937255 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts @@ -0,0 +1,407 @@ +//// [tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts] //// + +//// [renamingDestructuredPropertyInFunctionType.ts] +// GH#37454, GH#41044 + +type O = { a?: string; b: number; c: number; }; +type F1 = (arg: number) => any; // OK +type F2 = ({ a: string }: O) => any; // Error +type F3 = ({ a: string, b, c }: O) => any; // Error +type F4 = ({ a: string }: O) => any; // Error +type F5 = ({ a: string, b, c }: O) => any; // Error +type F6 = ({ a: string }) => typeof string; // OK +type F7 = ({ a: string, b: number }) => typeof number; // Error +type F8 = ({ a, b: number }) => typeof number; // OK +type F9 = ([a, b, c]) => void; // OK + +type G1 = new (arg: number) => any; // OK +type G2 = new ({ a: string }: O) => any; // Error +type G3 = new ({ a: string, b, c }: O) => any; // Error +type G4 = new ({ a: string }: O) => any; // Error +type G5 = new ({ a: string, b, c }: O) => any; // Error +type G6 = new ({ a: string }) => typeof string; // OK +type G7 = new ({ a: string, b: number }) => typeof number; // Error +type G8 = new ({ a, b: number }) => typeof number; // OK +type G9 = new ([a, b, c]) => void; // OK + +// Below are Error but renaming is retained in declaration emit, +// since elinding it would leave invalid syntax. +type F10 = ({ "a": string }) => void; // Error +type F11 = ({ 2: string }) => void; // Error +type F12 = ({ ["a"]: string }: O) => void; // Error +type F13 = ({ [2]: string }) => void; // Error +type G10 = new ({ "a": string }) => void; // Error +type G11 = new ({ 2: string }) => void; // Error +type G12 = new ({ ["a"]: string }: O) => void; // Error +type G13 = new ({ [2]: string }) => void; // Error + +interface I { + method1(arg: number): any; // OK + method2({ a: string }): any; // Error + + (arg: number): any; // OK + ({ a: string }): any; // Error + + new (arg: number): any; // OK + new ({ a: string }): any; // Error +} + +// Below are OK but renaming should be removed from declaration emit +function f1({ a: string }: O) { } +const f2 = function({ a: string }: O) { }; +const f3 = ({ a: string, b, c }: O) => { }; +const f4 = function({ a: string }: O): typeof string { return string; }; +const f5 = ({ a: string, b, c }: O): typeof string => ''; +const obj1 = { + method({ a: string }: O) { } +}; +const obj2 = { + method({ a: string }: O): typeof string { return string; } +}; +function f6({ a: string = "" }: O) { } +const f7 = ({ a: string = "", b, c }: O) => { }; +const f8 = ({ "a": string }: O) => { }; +function f9 ({ 2: string }) { }; +function f10 ({ ["a"]: string }: O) { }; +const f11 = ({ [2]: string }) => { }; + +// In below case `string` should be kept because it is used +function f12({ a: string = "" }: O): typeof string { return "a"; } + +/// [Declarations] //// + + + +//// [renamingDestructuredPropertyInFunctionType.d.ts] +type O = { + a?: string; + b: number; + c: number; +}; +type F1 = (arg: number) => any; +type F2 = ({ a: string }: O) => any; +type F3 = ({ a: string, b, c }: O) => any; +type F4 = ({ a: string }: O) => any; +type F5 = ({ a: string, b, c }: O) => any; +type F6 = ({ a: string }: invalid) => typeof string; +type F7 = ({ a: string, b: number }: invalid) => typeof number; +type F8 = ({ a, b: number }: invalid) => typeof number; +type F9 = ([a, b, c]: invalid) => void; +type G1 = new (arg: number) => any; +type G2 = new ({ a: string }: O) => any; +type G3 = new ({ a: string, b, c }: O) => any; +type G4 = new ({ a: string }: O) => any; +type G5 = new ({ a: string, b, c }: O) => any; +type G6 = new ({ a: string }: invalid) => typeof string; +type G7 = new ({ a: string, b: number }: invalid) => typeof number; +type G8 = new ({ a, b: number }: invalid) => typeof number; +type G9 = new ([a, b, c]: invalid) => void; +type F10 = ({ "a": string }: invalid) => void; +type F11 = ({ 2: string }: invalid) => void; +type F12 = ({ ["a"]: string }: O) => void; +type F13 = ({ [2]: string }: invalid) => void; +type G10 = new ({ "a": string }: invalid) => void; +type G11 = new ({ 2: string }: invalid) => void; +type G12 = new ({ ["a"]: string }: O) => void; +type G13 = new ({ [2]: string }: invalid) => void; +interface I { + method1(arg: number): any; + method2({ a: string }: invalid): any; + (arg: number): any; + ({ a: string }: invalid): any; + new (arg: number): any; + new ({ a: string }: invalid): any; +} +declare function f1({ a: string }: O): invalid; +declare const f2: ({ a: string }: O) => invalid; +declare const f3: ({ a: string, b, c }: O) => invalid; +declare const f4: ({ a: string }: O) => string; +declare const f5: ({ a: string, b, c }: O) => string; +declare const obj1: invalid; +declare const obj2: { + method({ a: string }: O): string; +}; +declare function f6({ a: string }: O): invalid; +declare const f7: ({ a: string, b, c }: O) => invalid; +declare const f8: ({ "a": string }: O) => invalid; +declare function f9({ 2: string }: invalid): invalid; +declare function f10({ ["a"]: string }: O): invalid; +declare const f11: ({ [2]: string }: invalid) => invalid; +declare function f12({ a: string }: O): typeof string; + +/// [Errors] //// + +renamingDestructuredPropertyInFunctionType.ts(5,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(6,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(7,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(8,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(9,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(10,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(10,17): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(11,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(12,12): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(15,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(16,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(17,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(18,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(19,16): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(20,16): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(20,21): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(21,16): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(22,16): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(26,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(26,20): error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(27,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(27,18): error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(28,22): error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(29,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(29,20): error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(30,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(30,24): error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(31,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(31,22): error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(32,26): error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(33,17): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(33,24): error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(37,11): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(37,16): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(40,4): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(40,9): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(43,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(43,13): error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +renamingDestructuredPropertyInFunctionType.ts(47,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(50,47): error TS4025: Exported variable 'f4' has or is using private name 'string'. +renamingDestructuredPropertyInFunctionType.ts(51,45): error TS4025: Exported variable 'f5' has or is using private name 'string'. +renamingDestructuredPropertyInFunctionType.ts(53,3): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(56,36): error TS4025: Exported variable 'obj2' has or is using private name 'string'. +renamingDestructuredPropertyInFunctionType.ts(58,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(61,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(61,14): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(62,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. + + +==== renamingDestructuredPropertyInFunctionType.ts (53 errors) ==== + // GH#37454, GH#41044 + + type O = { a?: string; b: number; c: number; }; + type F1 = (arg: number) => any; // OK + type F2 = ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F3 = ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F4 = ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F5 = ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type F6 = ({ a: string }) => typeof string; // OK + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:9:12: Add a type annotation to the parameter { a: string }. + type F7 = ({ a: string, b: number }) => typeof number; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:10:12: Add a type annotation to the parameter { a: string, b: number }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:10:36: We can only write a type for 'a' by adding a type for the entire parameter here. + type F8 = ({ a, b: number }) => typeof number; // OK + ~~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:11:12: Add a type annotation to the parameter { a, b: number }. + type F9 = ([a, b, c]) => void; // OK + ~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:12:12: Add a type annotation to the parameter [a, b, c]. + + type G1 = new (arg: number) => any; // OK + type G2 = new ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G3 = new ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G4 = new ({ a: string }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G5 = new ({ a: string, b, c }: O) => any; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + type G6 = new ({ a: string }) => typeof string; // OK + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:19:16: Add a type annotation to the parameter { a: string }. + type G7 = new ({ a: string, b: number }) => typeof number; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:20:16: Add a type annotation to the parameter { a: string, b: number }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:20:40: We can only write a type for 'a' by adding a type for the entire parameter here. + type G8 = new ({ a, b: number }) => typeof number; // OK + ~~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:21:16: Add a type annotation to the parameter { a, b: number }. + type G9 = new ([a, b, c]) => void; // OK + ~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:22:16: Add a type annotation to the parameter [a, b, c]. + + // Below are Error but renaming is retained in declaration emit, + // since elinding it would leave invalid syntax. + type F10 = ({ "a": string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:26:13: Add a type annotation to the parameter { "a": string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:26:28: We can only write a type for '"a"' by adding a type for the entire parameter here. + type F11 = ({ 2: string }) => void; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:27:13: Add a type annotation to the parameter { 2: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:27:26: We can only write a type for '2' by adding a type for the entire parameter here. + type F12 = ({ ["a"]: string }: O) => void; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? + type F13 = ({ [2]: string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:29:13: Add a type annotation to the parameter { [2]: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:29:28: We can only write a type for '[2]' by adding a type for the entire parameter here. + type G10 = new ({ "a": string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:30:17: Add a type annotation to the parameter { "a": string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '"a"'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:30:32: We can only write a type for '"a"' by adding a type for the entire parameter here. + type G11 = new ({ 2: string }) => void; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:31:17: Add a type annotation to the parameter { 2: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '2'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:31:30: We can only write a type for '2' by adding a type for the entire parameter here. + type G12 = new ({ ["a"]: string }: O) => void; // Error + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '["a"]'. Did you intend to use it as a type annotation? + type G13 = new ({ [2]: string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:33:17: Add a type annotation to the parameter { [2]: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of '[2]'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:33:32: We can only write a type for '[2]' by adding a type for the entire parameter here. + + interface I { + method1(arg: number): any; // OK + method2({ a: string }): any; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:37:11: Add a type annotation to the parameter { a: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:37:24: We can only write a type for 'a' by adding a type for the entire parameter here. + + (arg: number): any; // OK + ({ a: string }): any; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:40:4: Add a type annotation to the parameter { a: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:40:17: We can only write a type for 'a' by adding a type for the entire parameter here. + + new (arg: number): any; // OK + new ({ a: string }): any; // Error + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:43:8: Add a type annotation to the parameter { a: string }. + ~~~~~~ +!!! error TS2842: 'string' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +!!! related TS2843 renamingDestructuredPropertyInFunctionType.ts:43:21: We can only write a type for 'a' by adding a type for the entire parameter here. + } + + // Below are OK but renaming should be removed from declaration emit + function f1({ a: string }: O) { } + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 renamingDestructuredPropertyInFunctionType.ts:47:10: Add a return type to the function declaration. + const f2 = function({ a: string }: O) { }; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:48:7: Add a type annotation to the variable f2. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:48:12: Add a return type to the function expression. + const f3 = ({ a: string, b, c }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:49:7: Add a type annotation to the variable f3. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:49:12: Add a return type to the function expression. + const f4 = function({ a: string }: O): typeof string { return string; }; + ~~~~~~ +!!! error TS4025: Exported variable 'f4' has or is using private name 'string'. + const f5 = ({ a: string, b, c }: O): typeof string => ''; + ~~~~~~ +!!! error TS4025: Exported variable 'f5' has or is using private name 'string'. + const obj1 = { + method({ a: string }: O) { } + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:52:7: Add a type annotation to the variable obj1. +!!! related TS9034 renamingDestructuredPropertyInFunctionType.ts:53:3: Add a return type to the method + }; + const obj2 = { + method({ a: string }: O): typeof string { return string; } + ~~~~~~ +!!! error TS4025: Exported variable 'obj2' has or is using private name 'string'. + }; + function f6({ a: string = "" }: O) { } + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 renamingDestructuredPropertyInFunctionType.ts:58:10: Add a return type to the function declaration. + const f7 = ({ a: string = "", b, c }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:59:7: Add a type annotation to the variable f7. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:59:12: Add a return type to the function expression. + const f8 = ({ "a": string }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:60:7: Add a type annotation to the variable f8. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:60:12: Add a return type to the function expression. + function f9 ({ 2: string }) { }; + ~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 renamingDestructuredPropertyInFunctionType.ts:61:10: Add a return type to the function declaration. + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:61:14: Add a type annotation to the parameter { 2: string }. + function f10 ({ ["a"]: string }: O) { }; + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 renamingDestructuredPropertyInFunctionType.ts:62:10: Add a return type to the function declaration. + const f11 = ({ [2]: string }) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 renamingDestructuredPropertyInFunctionType.ts:63:7: Add a type annotation to the variable f11. +!!! related TS9030 renamingDestructuredPropertyInFunctionType.ts:63:14: Add a return type to the function expression. + ~~~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 renamingDestructuredPropertyInFunctionType.ts:63:15: Add a type annotation to the parameter { [2]: string }. + + // In below case `string` should be kept because it is used + function f12({ a: string = "" }: O): typeof string { return "a"; } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts new file mode 100644 index 0000000000000..1569fbc871bf6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// + +//// [symbolDeclarationEmit12.ts] +module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + set [Symbol.toPrimitive](x: I) { } + } +} + +/// [Declarations] //// + + + +//// [symbolDeclarationEmit12.d.ts] +declare namespace M { + interface I { + } + export class C { + [Symbol.iterator]: I; + [Symbol.isConcatSpreadable](): I; + get [Symbol.toPrimitive](): I; + set [Symbol.toPrimitive](x: I); + } + export {}; +} + +/// [Errors] //// + +symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. +symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +==== symbolDeclarationEmit12.ts (2 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + set [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts new file mode 100644 index 0000000000000..5b6c5a1bfde11 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/typeReferenceDirectives11.ts] //// + +//// [mod2.ts] +import {foo} from "./mod1"; +export const bar = foo(); + +//// [index.d.ts] +interface Lib { x } + +//// [mod1.ts] +export function foo(): Lib { return {x: 1} } + + +/// [Declarations] //// + + + +//// [/mod1.d.ts] +export declare function foo(): Lib; + +//// [/mod2.d.ts] +export declare const bar: invalid; + +/// [Errors] //// + +/mod1.ts(1,24): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations +/mod2.ts(2,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== /mod2.ts (1 errors) ==== + import {foo} from "./mod1"; + export const bar = foo(); + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /mod2.ts:2:14: Add a type annotation to the variable bar. + +==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } + +==== /mod1.ts (1 errors) ==== + export function foo(): Lib { return {x: 1} } + ~~~ +!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts new file mode 100644 index 0000000000000..4c7d78a887ca5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/typeReferenceDirectives13.ts] //// + +//// [app.ts] +/// +import {$} from "./ref"; +export interface A { + x: () => typeof $ +} + +//// [ref.d.ts] +export interface $ { x } + +//// [index.d.ts] +declare let $: { x: number } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +export interface A { + x: () => typeof $; +} + +/// [Errors] //// + +/app.ts(1,23): error TS9025: Reference directives are not supported with --isolatedDeclarations. + + +==== /app.ts (1 errors) ==== + /// + ~~~ +!!! error TS9025: Reference directives are not supported with --isolatedDeclarations. + import {$} from "./ref"; + export interface A { + x: () => typeof $ + } + +==== /ref.d.ts (0 errors) ==== + export interface $ { x } + +==== /types/lib/index.d.ts (0 errors) ==== + declare let $: { x: number } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts new file mode 100644 index 0000000000000..cc529addfd456 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/typeReferenceDirectives2.ts] //// + +//// [app.ts] +interface A { + x: $ +} +//// [index.d.ts] +interface $ { x } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +interface A { + x: $; +} + +/// [Errors] //// + +/app.ts(2,8): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + + +==== /app.ts (1 errors) ==== + interface A { + x: $ + ~ +!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + } +==== /types/lib/index.d.ts (0 errors) ==== + interface $ { x } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts new file mode 100644 index 0000000000000..8327d7446dfde --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/typeReferenceDirectives5.ts] //// + +//// [app.ts] +/// +import {$} from "./ref"; +export interface A { + x: typeof $; +} +//// [ref.d.ts] +export interface $ { x } + +//// [index.d.ts] +declare let $: { x: number } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +export interface A { + x: typeof $; +} + +/// [Errors] //// + +/app.ts(1,23): error TS9025: Reference directives are not supported with --isolatedDeclarations. + + +==== /app.ts (1 errors) ==== + /// + ~~~ +!!! error TS9025: Reference directives are not supported with --isolatedDeclarations. + import {$} from "./ref"; + export interface A { + x: typeof $; + } +==== /ref.d.ts (0 errors) ==== + export interface $ { x } + +==== /types/lib/index.d.ts (0 errors) ==== + declare let $: { x: number } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts new file mode 100644 index 0000000000000..b6c7fde8bb3f7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/typeReferenceDirectives8.ts] //// + +//// [mod2.ts] +import {foo} from "./mod1"; +export const bar = foo(); +//// [index.d.ts] +interface Lib { x } + +//// [mod1.ts] +export function foo(): Lib { return {x: 1} } + + +/// [Declarations] //// + + + +//// [/mod1.d.ts] +export declare function foo(): Lib; + +//// [/mod2.d.ts] +export declare const bar: invalid; + +/// [Errors] //// + +/mod1.ts(1,24): error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations +/mod2.ts(2,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== /mod2.ts (1 errors) ==== + import {foo} from "./mod1"; + export const bar = foo(); + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /mod2.ts:2:14: Add a type annotation to the variable bar. +==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } + +==== /mod1.ts (1 errors) ==== + export function foo(): Lib { return {x: 1} } + ~~~ +!!! error TS9024: Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations + \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.js b/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.js new file mode 100644 index 0000000000000..4ecfd0a93df50 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.js @@ -0,0 +1,85 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderConditionalTypes.ts] //// + +//// [isolatedDeclarationBinderConditionalTypes.ts] +type TA = string; +type UA = string; +export type Conditional = UA extends infer TA ? TA: never; + + +type TF = string; +type UF = string; +export function test(o: UF extends infer TF ? TF: never): UF extends infer TF ? TF: never { + return null! +} + +type TC = string; +type UC = string; +export class C { + member!: UC extends infer TC ? TC: never + get accessor(): UC extends infer TC ? TC: never { + return null! + } + set accessor(value: UC extends infer TC ? TC: never) { + + } + constructor(p: UC extends infer TC ? TC: never) { + return null!; + } + method(p: UC extends infer TC ? TC: never): UC extends infer TC ? TC: never { + return null!; + } +} + +type TI = string; +type UI = string; +export interface I { + member: UI extends infer TI ? TI: never + method(p: UI extends infer TI ? TI: never): UI extends infer TI ? TI: never; + new (p: UI extends infer TI ? TI: never): UI extends infer TI ? TI: never; +} + + + +type T2 = {} +export type Prepend = + T extends unknown ? + ((arg: Elm, ...rest: T) => void) extends ((...args: infer T2) => void) ? T2 : + never : + never; + +//// [isolatedDeclarationBinderConditionalTypes.js] +export function test(o) { + return null; +} +export class C { + member; + get accessor() { + return null; + } + set accessor(value) { + } + constructor(p) { + return null; + } + method(p) { + return null; + } +} + + +//// [isolatedDeclarationBinderConditionalTypes.d.ts] +export type Conditional = UA extends infer TA ? TA : never; +export declare function test(o: UF extends infer TF ? TF : never): UF extends infer TF ? TF : never; +export declare class C { + member: UC extends infer TC ? TC : never; + get accessor(): UC extends infer TC ? TC : never; + set accessor(value: UC extends infer TC ? TC : never); + constructor(p: UC extends infer TC ? TC : never); + method(p: UC extends infer TC ? TC : never): UC extends infer TC ? TC : never; +} +export interface I { + member: UI extends infer TI ? TI : never; + method(p: UI extends infer TI ? TI : never): UI extends infer TI ? TI : never; + new (p: UI extends infer TI ? TI : never): UI extends infer TI ? TI : never; +} +export type Prepend = T extends unknown ? ((arg: Elm, ...rest: T) => void) extends ((...args: infer T2) => void) ? T2 : never : never; diff --git a/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.symbols b/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.symbols new file mode 100644 index 0000000000000..13b7b7f3678bd --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.symbols @@ -0,0 +1,151 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderConditionalTypes.ts] //// + +=== isolatedDeclarationBinderConditionalTypes.ts === +type TA = string; +>TA : Symbol(TA, Decl(isolatedDeclarationBinderConditionalTypes.ts, 0, 0)) + +type UA = string; +>UA : Symbol(UA, Decl(isolatedDeclarationBinderConditionalTypes.ts, 0, 17)) + +export type Conditional = UA extends infer TA ? TA: never; +>Conditional : Symbol(Conditional, Decl(isolatedDeclarationBinderConditionalTypes.ts, 1, 17)) +>UA : Symbol(UA, Decl(isolatedDeclarationBinderConditionalTypes.ts, 2, 24)) +>UA : Symbol(UA, Decl(isolatedDeclarationBinderConditionalTypes.ts, 2, 24)) +>TA : Symbol(TA, Decl(isolatedDeclarationBinderConditionalTypes.ts, 2, 46)) +>TA : Symbol(TA, Decl(isolatedDeclarationBinderConditionalTypes.ts, 2, 46)) + + +type TF = string; +>TF : Symbol(TF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 2, 62)) + +type UF = string; +>UF : Symbol(UF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 5, 17)) + +export function test(o: UF extends infer TF ? TF: never): UF extends infer TF ? TF: never { +>test : Symbol(test, Decl(isolatedDeclarationBinderConditionalTypes.ts, 6, 17)) +>UF : Symbol(UF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 7, 21)) +>o : Symbol(o, Decl(isolatedDeclarationBinderConditionalTypes.ts, 7, 25)) +>UF : Symbol(UF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 7, 21)) +>TF : Symbol(TF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 7, 44)) +>TF : Symbol(TF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 7, 44)) +>UF : Symbol(UF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 7, 21)) +>TF : Symbol(TF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 7, 78)) +>TF : Symbol(TF, Decl(isolatedDeclarationBinderConditionalTypes.ts, 7, 78)) + + return null! +} + +type TC = string; +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 9, 1)) + +type UC = string; +>UC : Symbol(UC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 11, 17)) + +export class C { +>C : Symbol(C, Decl(isolatedDeclarationBinderConditionalTypes.ts, 12, 17)) +>UC : Symbol(UC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 13, 15)) + + member!: UC extends infer TC ? TC: never +>member : Symbol(C.member, Decl(isolatedDeclarationBinderConditionalTypes.ts, 13, 20)) +>UC : Symbol(UC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 13, 15)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 14, 29)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 14, 29)) + + get accessor(): UC extends infer TC ? TC: never { +>accessor : Symbol(C.accessor, Decl(isolatedDeclarationBinderConditionalTypes.ts, 14, 44), Decl(isolatedDeclarationBinderConditionalTypes.ts, 17, 5)) +>UC : Symbol(UC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 13, 15)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 15, 36)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 15, 36)) + + return null! + } + set accessor(value: UC extends infer TC ? TC: never) { +>accessor : Symbol(C.accessor, Decl(isolatedDeclarationBinderConditionalTypes.ts, 14, 44), Decl(isolatedDeclarationBinderConditionalTypes.ts, 17, 5)) +>value : Symbol(value, Decl(isolatedDeclarationBinderConditionalTypes.ts, 18, 17)) +>UC : Symbol(UC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 13, 15)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 18, 40)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 18, 40)) + + } + constructor(p: UC extends infer TC ? TC: never) { +>p : Symbol(p, Decl(isolatedDeclarationBinderConditionalTypes.ts, 21, 16)) +>UC : Symbol(UC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 13, 15)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 21, 35)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 21, 35)) + + return null!; + } + method(p: UC extends infer TC ? TC: never): UC extends infer TC ? TC: never { +>method : Symbol(C.method, Decl(isolatedDeclarationBinderConditionalTypes.ts, 23, 5)) +>p : Symbol(p, Decl(isolatedDeclarationBinderConditionalTypes.ts, 24, 11)) +>UC : Symbol(UC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 13, 15)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 24, 30)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 24, 30)) +>UC : Symbol(UC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 13, 15)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 24, 64)) +>TC : Symbol(TC, Decl(isolatedDeclarationBinderConditionalTypes.ts, 24, 64)) + + return null!; + } +} + +type TI = string; +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 27, 1)) + +type UI = string; +>UI : Symbol(UI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 29, 17)) + +export interface I { +>I : Symbol(I, Decl(isolatedDeclarationBinderConditionalTypes.ts, 30, 17)) +>UI : Symbol(UI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 31, 19)) + + member: UI extends infer TI ? TI: never +>member : Symbol(I.member, Decl(isolatedDeclarationBinderConditionalTypes.ts, 31, 24)) +>UI : Symbol(UI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 31, 19)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 32, 28)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 32, 28)) + + method(p: UI extends infer TI ? TI: never): UI extends infer TI ? TI: never; +>method : Symbol(I.method, Decl(isolatedDeclarationBinderConditionalTypes.ts, 32, 43)) +>p : Symbol(p, Decl(isolatedDeclarationBinderConditionalTypes.ts, 33, 11)) +>UI : Symbol(UI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 31, 19)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 33, 30)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 33, 30)) +>UI : Symbol(UI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 31, 19)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 33, 64)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 33, 64)) + + new (p: UI extends infer TI ? TI: never): UI extends infer TI ? TI: never; +>p : Symbol(p, Decl(isolatedDeclarationBinderConditionalTypes.ts, 34, 9)) +>UI : Symbol(UI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 31, 19)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 34, 28)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 34, 28)) +>UI : Symbol(UI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 31, 19)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 34, 62)) +>TI : Symbol(TI, Decl(isolatedDeclarationBinderConditionalTypes.ts, 34, 62)) +} + + + +type T2 = {} +>T2 : Symbol(T2, Decl(isolatedDeclarationBinderConditionalTypes.ts, 35, 1)) + +export type Prepend = +>Prepend : Symbol(Prepend, Decl(isolatedDeclarationBinderConditionalTypes.ts, 39, 12)) +>Elm : Symbol(Elm, Decl(isolatedDeclarationBinderConditionalTypes.ts, 40, 20)) +>T : Symbol(T, Decl(isolatedDeclarationBinderConditionalTypes.ts, 40, 24)) + + T extends unknown ? +>T : Symbol(T, Decl(isolatedDeclarationBinderConditionalTypes.ts, 40, 24)) + + ((arg: Elm, ...rest: T) => void) extends ((...args: infer T2) => void) ? T2 : +>arg : Symbol(arg, Decl(isolatedDeclarationBinderConditionalTypes.ts, 42, 4)) +>Elm : Symbol(Elm, Decl(isolatedDeclarationBinderConditionalTypes.ts, 40, 20)) +>rest : Symbol(rest, Decl(isolatedDeclarationBinderConditionalTypes.ts, 42, 13)) +>T : Symbol(T, Decl(isolatedDeclarationBinderConditionalTypes.ts, 40, 24)) +>args : Symbol(args, Decl(isolatedDeclarationBinderConditionalTypes.ts, 42, 45)) +>T2 : Symbol(T2, Decl(isolatedDeclarationBinderConditionalTypes.ts, 42, 59)) +>T2 : Symbol(T2, Decl(isolatedDeclarationBinderConditionalTypes.ts, 42, 59)) + + never : + never; diff --git a/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.types b/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.types new file mode 100644 index 0000000000000..1caedfb969b19 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.types @@ -0,0 +1,99 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderConditionalTypes.ts] //// + +=== isolatedDeclarationBinderConditionalTypes.ts === +type TA = string; +>TA : string + +type UA = string; +>UA : string + +export type Conditional = UA extends infer TA ? TA: never; +>Conditional : Conditional + + +type TF = string; +>TF : string + +type UF = string; +>UF : string + +export function test(o: UF extends infer TF ? TF: never): UF extends infer TF ? TF: never { +>test : (o: UF extends infer TF ? TF : never) => UF extends infer TF_1 ? TF_1 : never +>o : UF extends infer TF ? TF : never + + return null! +>null! : null +} + +type TC = string; +>TC : string + +type UC = string; +>UC : string + +export class C { +>C : C + + member!: UC extends infer TC ? TC: never +>member : UC extends infer TC ? TC : never + + get accessor(): UC extends infer TC ? TC: never { +>accessor : UC extends infer TC ? TC : never + + return null! +>null! : null + } + set accessor(value: UC extends infer TC ? TC: never) { +>accessor : UC extends infer TC ? TC : never +>value : UC extends infer TC ? TC : never + + } + constructor(p: UC extends infer TC ? TC: never) { +>p : UC extends infer TC ? TC : never + + return null!; +>null! : null + } + method(p: UC extends infer TC ? TC: never): UC extends infer TC ? TC: never { +>method : (p: UC extends infer TC ? TC : never) => UC extends infer TC_1 ? TC_1 : never +>p : UC extends infer TC ? TC : never + + return null!; +>null! : null + } +} + +type TI = string; +>TI : string + +type UI = string; +>UI : string + +export interface I { + member: UI extends infer TI ? TI: never +>member : UI extends infer TI ? TI : never + + method(p: UI extends infer TI ? TI: never): UI extends infer TI ? TI: never; +>method : (p: UI extends infer TI ? TI : never) => UI extends infer TI_1 ? TI_1 : never +>p : UI extends infer TI ? TI : never + + new (p: UI extends infer TI ? TI: never): UI extends infer TI ? TI: never; +>p : UI extends infer TI ? TI : never +} + + + +type T2 = {} +>T2 : {} + +export type Prepend = +>Prepend : Prepend + + T extends unknown ? + ((arg: Elm, ...rest: T) => void) extends ((...args: infer T2) => void) ? T2 : +>arg : Elm +>rest : T +>args : T2 + + never : + never; diff --git a/tests/baselines/reference/isolatedDeclarationBinderSignatures.js b/tests/baselines/reference/isolatedDeclarationBinderSignatures.js new file mode 100644 index 0000000000000..0bf506e66b20c --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationBinderSignatures.js @@ -0,0 +1,221 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderSignatures.ts] //// + +//// [isolatedDeclarationBinderSignatures.ts] +type N = "not used"; +const N = "not used" +export type F = () => N; + +export const fn = (): N => { + return null!; +} +export const fn2 = (p: N): void => { + return null! +} + + +export module M1 { + export type N = T extends T? N : never; + export function N(): typeof N { + return N + } +} + +export module M2 { + export interface N { + child: N + m(): N; + get X(): N + set X(value: N); + } +} + +export module M3 { + export interface N { + [n: string]: N + } +} +export module M3 { + export class N { child: N } + export function fn(): N { + return new N(); + } +} +export module M4 { + export module N { + export function fn(): typeof N { + return N; + } + } +} + + +export const fn3 = function (p: N): void { + +} + +export const fn4 = function (): { name: N } { + return null!; +} + +export interface I { + (): N; + new (): N + m(): N; +} + +export interface I2 { + [n: string]: N +} + +export interface I1 { + (): N; + new (): N + m(): N; +} + + +export interface I { + (): N; + new (): N + m(): N; +} + +export class C { + constructor(n: N) { + + } + m(): N { + return null!; + } + get N(): N { return null! } + set N(value) { } +} + +export class C2 { + m(): N { + return null!; + } +} + + + +//// [isolatedDeclarationBinderSignatures.js] +const N = "not used"; +export const fn = () => { + return null; +}; +export const fn2 = (p) => { + return null; +}; +export var M1; +(function (M1) { + function N() { + return N; + } + M1.N = N; +})(M1 || (M1 = {})); +export var M3; +(function (M3) { + class N { + child; + } + M3.N = N; + function fn() { + return new N(); + } + M3.fn = fn; +})(M3 || (M3 = {})); +export var M4; +(function (M4) { + let N; + (function (N) { + function fn() { + return N; + } + N.fn = fn; + })(N = M4.N || (M4.N = {})); +})(M4 || (M4 = {})); +export const fn3 = function (p) { +}; +export const fn4 = function () { + return null; +}; +export class C { + constructor(n) { + } + m() { + return null; + } + get N() { return null; } + set N(value) { } +} +export class C2 { + m() { + return null; + } +} + + +//// [isolatedDeclarationBinderSignatures.d.ts] +export type F = () => N; +export declare const fn: () => N; +export declare const fn2: (p: N) => void; +export declare namespace M1 { + type N = T extends T ? N : never; + function N(): typeof N; +} +export declare namespace M2 { + interface N { + child: N; + m(): N; + get X(): N; + set X(value: N); + } +} +export declare namespace M3 { + interface N { + [n: string]: N; + } +} +export declare namespace M3 { + class N { + child: N; + } + function fn(): N; +} +export declare namespace M4 { + namespace N { + function fn(): typeof N; + } +} +export declare const fn3: (p: N) => void; +export declare const fn4: () => { + name: N; +}; +export interface I { + (): N; + new (): N; + m(): N; +} +export interface I2 { + [n: string]: N; +} +export interface I1 { + (): N; + new (): N; + m(): N; +} +export interface I { + (): N; + new (): N; + m(): N; +} +export declare class C { + constructor(n: N); + m(): N; + get N(): N; + set N(value: N); +} +export declare class C2 { + m(): N; +} diff --git a/tests/baselines/reference/isolatedDeclarationBinderSignatures.symbols b/tests/baselines/reference/isolatedDeclarationBinderSignatures.symbols new file mode 100644 index 0000000000000..471a6fae4168f --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationBinderSignatures.symbols @@ -0,0 +1,231 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderSignatures.ts] //// + +=== isolatedDeclarationBinderSignatures.ts === +type N = "not used"; +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 0, 0), Decl(isolatedDeclarationBinderSignatures.ts, 1, 5)) + +const N = "not used" +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 0, 0), Decl(isolatedDeclarationBinderSignatures.ts, 1, 5)) + +export type F = () => N; +>F : Symbol(F, Decl(isolatedDeclarationBinderSignatures.ts, 1, 20)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 2, 17)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 2, 17)) + +export const fn = (): N => { +>fn : Symbol(fn, Decl(isolatedDeclarationBinderSignatures.ts, 4, 12)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 4, 19)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 4, 19)) + + return null!; +} +export const fn2 = (p: N): void => { +>fn2 : Symbol(fn2, Decl(isolatedDeclarationBinderSignatures.ts, 7, 12)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 7, 20)) +>p : Symbol(p, Decl(isolatedDeclarationBinderSignatures.ts, 7, 23)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 7, 20)) + + return null! +} + + +export module M1 { +>M1 : Symbol(M1, Decl(isolatedDeclarationBinderSignatures.ts, 9, 1)) + + export type N = T extends T? N : never; +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 13, 50), Decl(isolatedDeclarationBinderSignatures.ts, 12, 18)) +>T : Symbol(T, Decl(isolatedDeclarationBinderSignatures.ts, 13, 18)) +>T : Symbol(T, Decl(isolatedDeclarationBinderSignatures.ts, 13, 18)) +>T : Symbol(T, Decl(isolatedDeclarationBinderSignatures.ts, 13, 18)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 13, 50), Decl(isolatedDeclarationBinderSignatures.ts, 12, 18)) +>T : Symbol(T, Decl(isolatedDeclarationBinderSignatures.ts, 13, 18)) + + export function N(): typeof N { +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 13, 50), Decl(isolatedDeclarationBinderSignatures.ts, 12, 18)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 13, 50), Decl(isolatedDeclarationBinderSignatures.ts, 12, 18)) + + return N +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 13, 50), Decl(isolatedDeclarationBinderSignatures.ts, 12, 18)) + } +} + +export module M2 { +>M2 : Symbol(M2, Decl(isolatedDeclarationBinderSignatures.ts, 17, 1)) + + export interface N { +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 19, 18)) + + child: N +>child : Symbol(N.child, Decl(isolatedDeclarationBinderSignatures.ts, 20, 24)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 19, 18)) + + m(): N; +>m : Symbol(N.m, Decl(isolatedDeclarationBinderSignatures.ts, 21, 16)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 19, 18)) + + get X(): N +>X : Symbol(N.X, Decl(isolatedDeclarationBinderSignatures.ts, 22, 15), Decl(isolatedDeclarationBinderSignatures.ts, 23, 18)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 19, 18)) + + set X(value: N); +>X : Symbol(N.X, Decl(isolatedDeclarationBinderSignatures.ts, 22, 15), Decl(isolatedDeclarationBinderSignatures.ts, 23, 18)) +>value : Symbol(value, Decl(isolatedDeclarationBinderSignatures.ts, 24, 14)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 19, 18)) + } +} + +export module M3 { +>M3 : Symbol(M3, Decl(isolatedDeclarationBinderSignatures.ts, 26, 1), Decl(isolatedDeclarationBinderSignatures.ts, 32, 1)) + + export interface N { +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 28, 18), Decl(isolatedDeclarationBinderSignatures.ts, 33, 18)) + + [n: string]: N +>n : Symbol(n, Decl(isolatedDeclarationBinderSignatures.ts, 30, 9)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 28, 18), Decl(isolatedDeclarationBinderSignatures.ts, 33, 18)) + } +} +export module M3 { +>M3 : Symbol(M3, Decl(isolatedDeclarationBinderSignatures.ts, 26, 1), Decl(isolatedDeclarationBinderSignatures.ts, 32, 1)) + + export class N { child: N } +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 28, 18), Decl(isolatedDeclarationBinderSignatures.ts, 33, 18)) +>child : Symbol(N.child, Decl(isolatedDeclarationBinderSignatures.ts, 34, 20)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 28, 18), Decl(isolatedDeclarationBinderSignatures.ts, 33, 18)) + + export function fn(): N { +>fn : Symbol(fn, Decl(isolatedDeclarationBinderSignatures.ts, 34, 31)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 28, 18), Decl(isolatedDeclarationBinderSignatures.ts, 33, 18)) + + return new N(); +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 28, 18), Decl(isolatedDeclarationBinderSignatures.ts, 33, 18)) + } +} +export module M4 { +>M4 : Symbol(M4, Decl(isolatedDeclarationBinderSignatures.ts, 38, 1)) + + export module N { +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 39, 18)) + + export function fn(): typeof N { +>fn : Symbol(fn, Decl(isolatedDeclarationBinderSignatures.ts, 40, 21)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 39, 18)) + + return N; +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 39, 18)) + } + } +} + + +export const fn3 = function (p: N): void { +>fn3 : Symbol(fn3, Decl(isolatedDeclarationBinderSignatures.ts, 48, 12)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 48, 29)) +>p : Symbol(p, Decl(isolatedDeclarationBinderSignatures.ts, 48, 32)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 48, 29)) + +} + +export const fn4 = function (): { name: N } { +>fn4 : Symbol(fn4, Decl(isolatedDeclarationBinderSignatures.ts, 52, 12)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 52, 29)) +>name : Symbol(name, Decl(isolatedDeclarationBinderSignatures.ts, 52, 36)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 52, 29)) + + return null!; +} + +export interface I { +>I : Symbol(I, Decl(isolatedDeclarationBinderSignatures.ts, 54, 1), Decl(isolatedDeclarationBinderSignatures.ts, 70, 1)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 56, 19), Decl(isolatedDeclarationBinderSignatures.ts, 73, 19)) + + (): N; +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 56, 19), Decl(isolatedDeclarationBinderSignatures.ts, 73, 19)) + + new (): N +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 56, 19), Decl(isolatedDeclarationBinderSignatures.ts, 73, 19)) + + m(): N; +>m : Symbol(I.m, Decl(isolatedDeclarationBinderSignatures.ts, 58, 13), Decl(isolatedDeclarationBinderSignatures.ts, 75, 13)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 56, 19), Decl(isolatedDeclarationBinderSignatures.ts, 73, 19)) +} + +export interface I2 { +>I2 : Symbol(I2, Decl(isolatedDeclarationBinderSignatures.ts, 60, 1)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 62, 20)) + + [n: string]: N +>n : Symbol(n, Decl(isolatedDeclarationBinderSignatures.ts, 63, 5)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 62, 20)) +} + +export interface I1 { +>I1 : Symbol(I1, Decl(isolatedDeclarationBinderSignatures.ts, 64, 1)) + + (): N; +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 67, 5)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 67, 5)) + + new (): N +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 68, 9)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 68, 9)) + + m(): N; +>m : Symbol(I1.m, Decl(isolatedDeclarationBinderSignatures.ts, 68, 16)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 69, 6)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 69, 6)) +} + + +export interface I { +>I : Symbol(I, Decl(isolatedDeclarationBinderSignatures.ts, 54, 1), Decl(isolatedDeclarationBinderSignatures.ts, 70, 1)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 56, 19), Decl(isolatedDeclarationBinderSignatures.ts, 73, 19)) + + (): N; +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 56, 19), Decl(isolatedDeclarationBinderSignatures.ts, 73, 19)) + + new (): N +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 56, 19), Decl(isolatedDeclarationBinderSignatures.ts, 73, 19)) + + m(): N; +>m : Symbol(I.m, Decl(isolatedDeclarationBinderSignatures.ts, 58, 13), Decl(isolatedDeclarationBinderSignatures.ts, 75, 13)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 56, 19), Decl(isolatedDeclarationBinderSignatures.ts, 73, 19)) +} + +export class C { +>C : Symbol(C, Decl(isolatedDeclarationBinderSignatures.ts, 77, 1)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 79, 15), Decl(isolatedDeclarationBinderSignatures.ts, 85, 5), Decl(isolatedDeclarationBinderSignatures.ts, 86, 31)) + + constructor(n: N) { +>n : Symbol(n, Decl(isolatedDeclarationBinderSignatures.ts, 80, 16)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 79, 15), Decl(isolatedDeclarationBinderSignatures.ts, 85, 5), Decl(isolatedDeclarationBinderSignatures.ts, 86, 31)) + + } + m(): N { +>m : Symbol(C.m, Decl(isolatedDeclarationBinderSignatures.ts, 82, 5)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 79, 15), Decl(isolatedDeclarationBinderSignatures.ts, 85, 5), Decl(isolatedDeclarationBinderSignatures.ts, 86, 31)) + + return null!; + } + get N(): N { return null! } +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 79, 15), Decl(isolatedDeclarationBinderSignatures.ts, 85, 5), Decl(isolatedDeclarationBinderSignatures.ts, 86, 31)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 79, 15), Decl(isolatedDeclarationBinderSignatures.ts, 85, 5), Decl(isolatedDeclarationBinderSignatures.ts, 86, 31)) + + set N(value) { } +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 79, 15), Decl(isolatedDeclarationBinderSignatures.ts, 85, 5), Decl(isolatedDeclarationBinderSignatures.ts, 86, 31)) +>value : Symbol(value, Decl(isolatedDeclarationBinderSignatures.ts, 87, 10)) +} + +export class C2 { +>C2 : Symbol(C2, Decl(isolatedDeclarationBinderSignatures.ts, 88, 1)) + + m(): N { +>m : Symbol(C2.m, Decl(isolatedDeclarationBinderSignatures.ts, 90, 17)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 91, 6)) +>N : Symbol(N, Decl(isolatedDeclarationBinderSignatures.ts, 91, 6)) + + return null!; + } +} + + diff --git a/tests/baselines/reference/isolatedDeclarationBinderSignatures.types b/tests/baselines/reference/isolatedDeclarationBinderSignatures.types new file mode 100644 index 0000000000000..9ea205526b346 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationBinderSignatures.types @@ -0,0 +1,177 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderSignatures.ts] //// + +=== isolatedDeclarationBinderSignatures.ts === +type N = "not used"; +>N : "not used" + +const N = "not used" +>N : "not used" +>"not used" : "not used" + +export type F = () => N; +>F : () => N + +export const fn = (): N => { +>fn : () => N +>(): N => { return null!;} : () => N + + return null!; +>null! : null +} +export const fn2 = (p: N): void => { +>fn2 : (p: N) => void +>(p: N): void => { return null!} : (p: N) => void +>p : N + + return null! +>null! : null +} + + +export module M1 { +>M1 : typeof M1 + + export type N = T extends T? N : never; +>N : N + + export function N(): typeof N { +>N : () => typeof N +>N : () => typeof N + + return N +>N : () => typeof N + } +} + +export module M2 { + export interface N { + child: N +>child : N + + m(): N; +>m : () => N + + get X(): N +>X : N + + set X(value: N); +>X : N +>value : N + } +} + +export module M3 { + export interface N { + [n: string]: N +>n : string + } +} +export module M3 { +>M3 : typeof M3 + + export class N { child: N } +>N : N +>child : N + + export function fn(): N { +>fn : () => N + + return new N(); +>new N() : N +>N : typeof N + } +} +export module M4 { +>M4 : typeof M4 + + export module N { +>N : typeof N + + export function fn(): typeof N { +>fn : () => typeof N +>N : typeof N + + return N; +>N : typeof N + } + } +} + + +export const fn3 = function (p: N): void { +>fn3 : (p: N) => void +>function (p: N): void { } : (p: N) => void +>p : N + +} + +export const fn4 = function (): { name: N } { +>fn4 : () => { name: N;} +>function (): { name: N } { return null!;} : () => { name: N;} +>name : N + + return null!; +>null! : null +} + +export interface I { + (): N; + new (): N + m(): N; +>m : { (): N; (): N; } +} + +export interface I2 { + [n: string]: N +>n : string +} + +export interface I1 { + (): N; + new (): N + m(): N; +>m : () => N +} + + +export interface I { + (): N; + new (): N + m(): N; +>m : { (): N; (): N; } +} + +export class C { +>C : C + + constructor(n: N) { +>n : N + + } + m(): N { +>m : () => N + + return null!; +>null! : null + } + get N(): N { return null! } +>N : N +>null! : null + + set N(value) { } +>N : N +>value : N +} + +export class C2 { +>C2 : C2 + + m(): N { +>m : () => N + + return null!; +>null! : null + } +} + + diff --git a/tests/baselines/reference/isolatedDeclarationErrors.errors.txt b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt new file mode 100644 index 0000000000000..2bc5caf198c2e --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt @@ -0,0 +1,26 @@ +isolatedDeclarationErrors.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrors.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrors.ts(7,30): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrors.ts(8,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== isolatedDeclarationErrors.ts (4 errors) ==== + function errorOnAssignmentBelowDecl(): void {} + errorOnAssignmentBelowDecl.a = ""; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + const errorOnAssignmentBelow = (): void => {} + errorOnAssignmentBelow.a = ""; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + const errorOnMissingReturn = () => {} + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrors.ts:7:7: Add a type annotation to the variable errorOnMissingReturn. +!!! related TS9030 isolatedDeclarationErrors.ts:7:30: Add a return type to the function expression. + errorOnMissingReturn.a = ""; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrors.js b/tests/baselines/reference/isolatedDeclarationErrors.js new file mode 100644 index 0000000000000..237991f636aae --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrors.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +//// [isolatedDeclarationErrors.ts] +function errorOnAssignmentBelowDecl(): void {} +errorOnAssignmentBelowDecl.a = ""; + +const errorOnAssignmentBelow = (): void => {} +errorOnAssignmentBelow.a = ""; + +const errorOnMissingReturn = () => {} +errorOnMissingReturn.a = ""; + + +//// [isolatedDeclarationErrors.js] +function errorOnAssignmentBelowDecl() { } +errorOnAssignmentBelowDecl.a = ""; +const errorOnAssignmentBelow = () => { }; +errorOnAssignmentBelow.a = ""; +const errorOnMissingReturn = () => { }; +errorOnMissingReturn.a = ""; diff --git a/tests/baselines/reference/isolatedDeclarationErrors.symbols b/tests/baselines/reference/isolatedDeclarationErrors.symbols new file mode 100644 index 0000000000000..3bb2b757c3a56 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrors.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +=== isolatedDeclarationErrors.ts === +function errorOnAssignmentBelowDecl(): void {} +>errorOnAssignmentBelowDecl : Symbol(errorOnAssignmentBelowDecl, Decl(isolatedDeclarationErrors.ts, 0, 0), Decl(isolatedDeclarationErrors.ts, 0, 46)) + +errorOnAssignmentBelowDecl.a = ""; +>errorOnAssignmentBelowDecl.a : Symbol(errorOnAssignmentBelowDecl.a, Decl(isolatedDeclarationErrors.ts, 0, 46)) +>errorOnAssignmentBelowDecl : Symbol(errorOnAssignmentBelowDecl, Decl(isolatedDeclarationErrors.ts, 0, 0), Decl(isolatedDeclarationErrors.ts, 0, 46)) +>a : Symbol(errorOnAssignmentBelowDecl.a, Decl(isolatedDeclarationErrors.ts, 0, 46)) + +const errorOnAssignmentBelow = (): void => {} +>errorOnAssignmentBelow : Symbol(errorOnAssignmentBelow, Decl(isolatedDeclarationErrors.ts, 3, 5), Decl(isolatedDeclarationErrors.ts, 3, 45)) + +errorOnAssignmentBelow.a = ""; +>errorOnAssignmentBelow.a : Symbol(errorOnAssignmentBelow.a, Decl(isolatedDeclarationErrors.ts, 3, 45)) +>errorOnAssignmentBelow : Symbol(errorOnAssignmentBelow, Decl(isolatedDeclarationErrors.ts, 3, 5), Decl(isolatedDeclarationErrors.ts, 3, 45)) +>a : Symbol(errorOnAssignmentBelow.a, Decl(isolatedDeclarationErrors.ts, 3, 45)) + +const errorOnMissingReturn = () => {} +>errorOnMissingReturn : Symbol(errorOnMissingReturn, Decl(isolatedDeclarationErrors.ts, 6, 5), Decl(isolatedDeclarationErrors.ts, 6, 37)) + +errorOnMissingReturn.a = ""; +>errorOnMissingReturn.a : Symbol(errorOnMissingReturn.a, Decl(isolatedDeclarationErrors.ts, 6, 37)) +>errorOnMissingReturn : Symbol(errorOnMissingReturn, Decl(isolatedDeclarationErrors.ts, 6, 5), Decl(isolatedDeclarationErrors.ts, 6, 37)) +>a : Symbol(errorOnMissingReturn.a, Decl(isolatedDeclarationErrors.ts, 6, 37)) + diff --git a/tests/baselines/reference/isolatedDeclarationErrors.types b/tests/baselines/reference/isolatedDeclarationErrors.types new file mode 100644 index 0000000000000..58d38d331fcdc --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrors.types @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +=== isolatedDeclarationErrors.ts === +function errorOnAssignmentBelowDecl(): void {} +>errorOnAssignmentBelowDecl : typeof errorOnAssignmentBelowDecl + +errorOnAssignmentBelowDecl.a = ""; +>errorOnAssignmentBelowDecl.a = "" : "" +>errorOnAssignmentBelowDecl.a : string +>errorOnAssignmentBelowDecl : typeof errorOnAssignmentBelowDecl +>a : string +>"" : "" + +const errorOnAssignmentBelow = (): void => {} +>errorOnAssignmentBelow : { (): void; a: string; } +>(): void => {} : { (): void; a: string; } + +errorOnAssignmentBelow.a = ""; +>errorOnAssignmentBelow.a = "" : "" +>errorOnAssignmentBelow.a : string +>errorOnAssignmentBelow : { (): void; a: string; } +>a : string +>"" : "" + +const errorOnMissingReturn = () => {} +>errorOnMissingReturn : { (): void; a: string; } +>() => {} : { (): void; a: string; } + +errorOnMissingReturn.a = ""; +>errorOnMissingReturn.a = "" : "" +>errorOnMissingReturn.a : string +>errorOnMissingReturn : { (): void; a: string; } +>a : string +>"" : "" + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt new file mode 100644 index 0000000000000..32bdf1fd8a67f --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt @@ -0,0 +1,134 @@ +isolatedDeclarationErrorsClasses.ts(3,13): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(8,18): error TS7006: Parameter 'p' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(8,18): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(9,23): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(12,9): error TS7032: Property 'setOnly' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(12,17): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(12,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(14,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(36,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. +isolatedDeclarationErrorsClasses.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(44,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(46,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(48,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + + +==== isolatedDeclarationErrorsClasses.ts (22 errors) ==== + export class Cls { + + field = 1 + 1; + ~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsClasses.ts:3:5: Add a type annotation to the property field. + method() {} + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 isolatedDeclarationErrorsClasses.ts:4:5: Add a return type to the method + + methodOk(): void {} + + methodParams(p): void {} + ~ +!!! error TS7006: Parameter 'p' implicitly has an 'any' type. + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:8:18: Add a type annotation to the parameter p. + methodParams2(p = 1 + 1): void {} + ~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:9:19: Add a type annotation to the parameter p. + + get getOnly() { return 0 } + ~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:11:9: Add a return type to the get accessor declaration. + set setOnly(value) { } + ~~~~~~~ +!!! error TS7032: Property 'setOnly' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:12:9: Add a type to parameter of the set accessor declaration. + + get getSetBad() { return 0 } + ~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:15:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:14:9: Add a return type to the get accessor declaration. + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } + } + + let noAnnotationStringName: string = "noAnnotationStringName"; + let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + + const noAnnotationLiteralName = "noAnnotationLiteralName"; + const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + + export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~ +!!! error TS2304: Cannot find name 'missing'. + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + [noParamAnnotationStringName](v): void { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + ~ +!!! error TS7006: Parameter 'v' implicitly has an 'any' type. + + get [noAnnotationStringName]() { return 0;} + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + set [noParamAnnotationStringName](value) { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + + [("A" + "B") as "AB"] = 1; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + } + + export interface I { + [noAnnotationStringName]: 10; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + [noAnnotationLiteralName](); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.js b/tests/baselines/reference/isolatedDeclarationErrorsClasses.js new file mode 100644 index 0000000000000..ed0968f566093 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.js @@ -0,0 +1,94 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +//// [isolatedDeclarationErrorsClasses.ts] +export class Cls { + + field = 1 + 1; + method() {} + + methodOk(): void {} + + methodParams(p): void {} + methodParams2(p = 1 + 1): void {} + + get getOnly() { return 0 } + set setOnly(value) { } + + get getSetBad() { return 0 } + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } +} + +let noAnnotationStringName: string = "noAnnotationStringName"; +let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + +const noAnnotationLiteralName = "noAnnotationLiteralName"; +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + +export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName]() { return 0;} + + set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + +} + +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} + +//// [isolatedDeclarationErrorsClasses.js] +export class Cls { + field = 1 + 1; + method() { } + methodOk() { } + methodParams(p) { } + methodParams2(p = 1 + 1) { } + get getOnly() { return 0; } + set setOnly(value) { } + get getSetBad() { return 0; } + set getSetBad(value) { } + get getSetOk() { return 0; } + set getSetOk(value) { } + get getSetOk2() { return 0; } + set getSetOk2(value) { } + get getSetOk3() { return 0; } + set getSetOk3(value) { } +} +let noAnnotationStringName = "noAnnotationStringName"; +let noParamAnnotationStringName = "noParamAnnotationStringName"; +const noAnnotationLiteralName = "noAnnotationLiteralName"; +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; +export class C { + // Should not be reported as an isolated declaration error + [missing] = 1; + [noAnnotationLiteralName]() { } + [noParamAnnotationLiteralName](v) { } + [noAnnotationStringName]() { } + [noParamAnnotationStringName](v) { } + get [noAnnotationStringName]() { return 0; } + set [noParamAnnotationStringName](value) { } + [("A" + "B")] = 1; +} diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols b/tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols new file mode 100644 index 0000000000000..b6c6ab48a20bf --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols @@ -0,0 +1,121 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +=== isolatedDeclarationErrorsClasses.ts === +export class Cls { +>Cls : Symbol(Cls, Decl(isolatedDeclarationErrorsClasses.ts, 0, 0)) + + field = 1 + 1; +>field : Symbol(Cls.field, Decl(isolatedDeclarationErrorsClasses.ts, 0, 18)) + + method() {} +>method : Symbol(Cls.method, Decl(isolatedDeclarationErrorsClasses.ts, 2, 18)) + + methodOk(): void {} +>methodOk : Symbol(Cls.methodOk, Decl(isolatedDeclarationErrorsClasses.ts, 3, 15)) + + methodParams(p): void {} +>methodParams : Symbol(Cls.methodParams, Decl(isolatedDeclarationErrorsClasses.ts, 5, 23)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsClasses.ts, 7, 17)) + + methodParams2(p = 1 + 1): void {} +>methodParams2 : Symbol(Cls.methodParams2, Decl(isolatedDeclarationErrorsClasses.ts, 7, 28)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsClasses.ts, 8, 18)) + + get getOnly() { return 0 } +>getOnly : Symbol(Cls.getOnly, Decl(isolatedDeclarationErrorsClasses.ts, 8, 37)) + + set setOnly(value) { } +>setOnly : Symbol(Cls.setOnly, Decl(isolatedDeclarationErrorsClasses.ts, 10, 30)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsClasses.ts, 11, 16)) + + get getSetBad() { return 0 } +>getSetBad : Symbol(Cls.getSetBad, Decl(isolatedDeclarationErrorsClasses.ts, 11, 26), Decl(isolatedDeclarationErrorsClasses.ts, 13, 32)) + + set getSetBad(value) { } +>getSetBad : Symbol(Cls.getSetBad, Decl(isolatedDeclarationErrorsClasses.ts, 11, 26), Decl(isolatedDeclarationErrorsClasses.ts, 13, 32)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsClasses.ts, 14, 18)) + + get getSetOk(): number { return 0 } +>getSetOk : Symbol(Cls.getSetOk, Decl(isolatedDeclarationErrorsClasses.ts, 14, 28), Decl(isolatedDeclarationErrorsClasses.ts, 16, 39)) + + set getSetOk(value) { } +>getSetOk : Symbol(Cls.getSetOk, Decl(isolatedDeclarationErrorsClasses.ts, 14, 28), Decl(isolatedDeclarationErrorsClasses.ts, 16, 39)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsClasses.ts, 17, 17)) + + get getSetOk2() { return 0 } +>getSetOk2 : Symbol(Cls.getSetOk2, Decl(isolatedDeclarationErrorsClasses.ts, 17, 27), Decl(isolatedDeclarationErrorsClasses.ts, 19, 32)) + + set getSetOk2(value: number) { } +>getSetOk2 : Symbol(Cls.getSetOk2, Decl(isolatedDeclarationErrorsClasses.ts, 17, 27), Decl(isolatedDeclarationErrorsClasses.ts, 19, 32)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsClasses.ts, 20, 18)) + + get getSetOk3(): number { return 0 } +>getSetOk3 : Symbol(Cls.getSetOk3, Decl(isolatedDeclarationErrorsClasses.ts, 20, 36), Decl(isolatedDeclarationErrorsClasses.ts, 22, 40)) + + set getSetOk3(value: number) { } +>getSetOk3 : Symbol(Cls.getSetOk3, Decl(isolatedDeclarationErrorsClasses.ts, 20, 36), Decl(isolatedDeclarationErrorsClasses.ts, 22, 40)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsClasses.ts, 23, 18)) +} + +let noAnnotationStringName: string = "noAnnotationStringName"; +>noAnnotationStringName : Symbol(noAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 26, 3)) + +let noParamAnnotationStringName: string = "noParamAnnotationStringName"; +>noParamAnnotationStringName : Symbol(noParamAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 27, 3)) + +const noAnnotationLiteralName = "noAnnotationLiteralName"; +>noAnnotationLiteralName : Symbol(noAnnotationLiteralName, Decl(isolatedDeclarationErrorsClasses.ts, 29, 5)) + +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; +>noParamAnnotationLiteralName : Symbol(noParamAnnotationLiteralName, Decl(isolatedDeclarationErrorsClasses.ts, 30, 5)) + +export class C { +>C : Symbol(C, Decl(isolatedDeclarationErrorsClasses.ts, 30, 68)) + + // Should not be reported as an isolated declaration error + [missing] = 1; +>[missing] : Symbol(C[missing], Decl(isolatedDeclarationErrorsClasses.ts, 32, 16)) + + [noAnnotationLiteralName](): void { } +>[noAnnotationLiteralName] : Symbol(C[noAnnotationLiteralName], Decl(isolatedDeclarationErrorsClasses.ts, 35, 18)) +>noAnnotationLiteralName : Symbol(noAnnotationLiteralName, Decl(isolatedDeclarationErrorsClasses.ts, 29, 5)) + + [noParamAnnotationLiteralName](v: string): void { } +>[noParamAnnotationLiteralName] : Symbol(C[noParamAnnotationLiteralName], Decl(isolatedDeclarationErrorsClasses.ts, 37, 41)) +>noParamAnnotationLiteralName : Symbol(noParamAnnotationLiteralName, Decl(isolatedDeclarationErrorsClasses.ts, 30, 5)) +>v : Symbol(v, Decl(isolatedDeclarationErrorsClasses.ts, 39, 35)) + + [noAnnotationStringName]() { } +>[noAnnotationStringName] : Symbol(C[noAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 39, 55)) +>noAnnotationStringName : Symbol(noAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 26, 3)) + + [noParamAnnotationStringName](v): void { } +>[noParamAnnotationStringName] : Symbol(C[noParamAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 41, 34)) +>noParamAnnotationStringName : Symbol(noParamAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 27, 3)) +>v : Symbol(v, Decl(isolatedDeclarationErrorsClasses.ts, 43, 34)) + + get [noAnnotationStringName]() { return 0;} +>[noAnnotationStringName] : Symbol(C[noAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 43, 46)) +>noAnnotationStringName : Symbol(noAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 26, 3)) + + set [noParamAnnotationStringName](value) { } +>[noParamAnnotationStringName] : Symbol(C[noParamAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 45, 47)) +>noParamAnnotationStringName : Symbol(noParamAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 27, 3)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsClasses.ts, 47, 38)) + + [("A" + "B") as "AB"] = 1; +>[("A" + "B") as "AB"] : Symbol(C[("A" + "B") as "AB"], Decl(isolatedDeclarationErrorsClasses.ts, 47, 48)) + +} + +export interface I { +>I : Symbol(I, Decl(isolatedDeclarationErrorsClasses.ts, 51, 1)) + + [noAnnotationStringName]: 10; +>[noAnnotationStringName] : Symbol(I[noAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 53, 20)) +>noAnnotationStringName : Symbol(noAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 26, 3)) + + [noAnnotationLiteralName](); +>[noAnnotationLiteralName] : Symbol(I[noAnnotationLiteralName], Decl(isolatedDeclarationErrorsClasses.ts, 54, 33)) +>noAnnotationLiteralName : Symbol(noAnnotationLiteralName, Decl(isolatedDeclarationErrorsClasses.ts, 29, 5)) +} diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.types b/tests/baselines/reference/isolatedDeclarationErrorsClasses.types new file mode 100644 index 0000000000000..5c010607a2fdd --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.types @@ -0,0 +1,143 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +=== isolatedDeclarationErrorsClasses.ts === +export class Cls { +>Cls : Cls + + field = 1 + 1; +>field : number +>1 + 1 : number +>1 : 1 +>1 : 1 + + method() {} +>method : () => void + + methodOk(): void {} +>methodOk : () => void + + methodParams(p): void {} +>methodParams : (p: any) => void +>p : any + + methodParams2(p = 1 + 1): void {} +>methodParams2 : (p?: number) => void +>p : number +>1 + 1 : number +>1 : 1 +>1 : 1 + + get getOnly() { return 0 } +>getOnly : number +>0 : 0 + + set setOnly(value) { } +>setOnly : any +>value : any + + get getSetBad() { return 0 } +>getSetBad : number +>0 : 0 + + set getSetBad(value) { } +>getSetBad : number +>value : number + + get getSetOk(): number { return 0 } +>getSetOk : number +>0 : 0 + + set getSetOk(value) { } +>getSetOk : number +>value : number + + get getSetOk2() { return 0 } +>getSetOk2 : number +>0 : 0 + + set getSetOk2(value: number) { } +>getSetOk2 : number +>value : number + + get getSetOk3(): number { return 0 } +>getSetOk3 : number +>0 : 0 + + set getSetOk3(value: number) { } +>getSetOk3 : number +>value : number +} + +let noAnnotationStringName: string = "noAnnotationStringName"; +>noAnnotationStringName : string +>"noAnnotationStringName" : "noAnnotationStringName" + +let noParamAnnotationStringName: string = "noParamAnnotationStringName"; +>noParamAnnotationStringName : string +>"noParamAnnotationStringName" : "noParamAnnotationStringName" + +const noAnnotationLiteralName = "noAnnotationLiteralName"; +>noAnnotationLiteralName : "noAnnotationLiteralName" +>"noAnnotationLiteralName" : "noAnnotationLiteralName" + +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; +>noParamAnnotationLiteralName : "noParamAnnotationLiteralName" +>"noParamAnnotationLiteralName" : "noParamAnnotationLiteralName" + +export class C { +>C : C + + // Should not be reported as an isolated declaration error + [missing] = 1; +>[missing] : number +>missing : any +>1 : 1 + + [noAnnotationLiteralName](): void { } +>[noAnnotationLiteralName] : () => void +>noAnnotationLiteralName : "noAnnotationLiteralName" + + [noParamAnnotationLiteralName](v: string): void { } +>[noParamAnnotationLiteralName] : (v: string) => void +>noParamAnnotationLiteralName : "noParamAnnotationLiteralName" +>v : string + + [noAnnotationStringName]() { } +>[noAnnotationStringName] : () => void +>noAnnotationStringName : string + + [noParamAnnotationStringName](v): void { } +>[noParamAnnotationStringName] : (v: any) => void +>noParamAnnotationStringName : string +>v : any + + get [noAnnotationStringName]() { return 0;} +>[noAnnotationStringName] : number +>noAnnotationStringName : string +>0 : 0 + + set [noParamAnnotationStringName](value) { } +>[noParamAnnotationStringName] : any +>noParamAnnotationStringName : string +>value : any + + [("A" + "B") as "AB"] = 1; +>[("A" + "B") as "AB"] : number +>("A" + "B") as "AB" : "AB" +>("A" + "B") : string +>"A" + "B" : string +>"A" : "A" +>"B" : "B" +>1 : 1 + +} + +export interface I { + [noAnnotationStringName]: 10; +>[noAnnotationStringName] : 10 +>noAnnotationStringName : string + + [noAnnotationLiteralName](); +>[noAnnotationLiteralName] : () => any +>noAnnotationLiteralName : "noAnnotationLiteralName" +} diff --git a/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt new file mode 100644 index 0000000000000..4169640f60a21 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt @@ -0,0 +1,44 @@ +a.ts(1,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. +b.ts(1,23): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +c.ts(1,16): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +d.ts(1,24): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +e.ts(1,24): error TS9013: Expression type can't be inferred with --isolatedDeclarations. + + +==== a.ts (1 errors) ==== + export default 1 + 1; + ~~~~~ +!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. +!!! related TS9036 a.ts:1:1: Move the expression in default export to a variable and add a type annotation to it. + + +==== b.ts (1 errors) ==== + export default { foo: 1 + 1 }; + ~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9036 b.ts:1:1: Move the expression in default export to a variable and add a type annotation to it. +!!! related TS9035 b.ts:1:23: Add a type assertion to this expression to make type type explicit. + +==== c.ts (1 errors) ==== + export default [{ foo: 1 + 1 }]; + ~~~~~~~~~~~~~~~~ +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9036 c.ts:1:1: Move the expression in default export to a variable and add a type annotation to it. + +==== d.ts (1 errors) ==== + export default [{ foo: 1 + 1 }] as const; + ~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9036 d.ts:1:1: Move the expression in default export to a variable and add a type annotation to it. +!!! related TS9035 d.ts:1:24: Add a type assertion to this expression to make type type explicit. + +==== e.ts (1 errors) ==== + export default [{ foo: 1 + 1 }] as const; + ~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9036 e.ts:1:1: Move the expression in default export to a variable and add a type annotation to it. +!!! related TS9035 e.ts:1:24: Add a type assertion to this expression to make type type explicit. + +==== f.ts (0 errors) ==== + const a = { foo: 1 }; + export default a; \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsDefault.js b/tests/baselines/reference/isolatedDeclarationErrorsDefault.js new file mode 100644 index 0000000000000..60fc563b49d03 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsDefault.js @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsDefault.ts] //// + +//// [a.ts] +export default 1 + 1; + + +//// [b.ts] +export default { foo: 1 + 1 }; + +//// [c.ts] +export default [{ foo: 1 + 1 }]; + +//// [d.ts] +export default [{ foo: 1 + 1 }] as const; + +//// [e.ts] +export default [{ foo: 1 + 1 }] as const; + +//// [f.ts] +const a = { foo: 1 }; +export default a; + +//// [a.js] +export default 1 + 1; +//// [b.js] +export default { foo: 1 + 1 }; +//// [c.js] +export default [{ foo: 1 + 1 }]; +//// [d.js] +export default [{ foo: 1 + 1 }]; +//// [e.js] +export default [{ foo: 1 + 1 }]; +//// [f.js] +const a = { foo: 1 }; +export default a; + + +//// [f.d.ts] +declare const a: { + foo: number; +}; +export default a; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsDefault.symbols b/tests/baselines/reference/isolatedDeclarationErrorsDefault.symbols new file mode 100644 index 0000000000000..bdfcbadcff4b4 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsDefault.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsDefault.ts] //// + +=== a.ts === + +export default 1 + 1; + + +=== b.ts === +export default { foo: 1 + 1 }; +>foo : Symbol(foo, Decl(b.ts, 0, 16)) + +=== c.ts === +export default [{ foo: 1 + 1 }]; +>foo : Symbol(foo, Decl(c.ts, 0, 17)) + +=== d.ts === +export default [{ foo: 1 + 1 }] as const; +>foo : Symbol(foo, Decl(d.ts, 0, 17)) +>const : Symbol(const) + +=== e.ts === +export default [{ foo: 1 + 1 }] as const; +>foo : Symbol(foo, Decl(e.ts, 0, 17)) +>const : Symbol(const) + +=== f.ts === +const a = { foo: 1 }; +>a : Symbol(a, Decl(f.ts, 0, 5)) +>foo : Symbol(foo, Decl(f.ts, 0, 11)) + +export default a; +>a : Symbol(a, Decl(f.ts, 0, 5)) + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsDefault.types b/tests/baselines/reference/isolatedDeclarationErrorsDefault.types new file mode 100644 index 0000000000000..ab8e5b45bb7b1 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsDefault.types @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsDefault.ts] //// + +=== a.ts === +export default 1 + 1; +>1 + 1 : number +>1 : 1 +>1 : 1 + + +=== b.ts === +export default { foo: 1 + 1 }; +>{ foo: 1 + 1 } : { foo: number; } +>foo : number +>1 + 1 : number +>1 : 1 +>1 : 1 + +=== c.ts === +export default [{ foo: 1 + 1 }]; +>[{ foo: 1 + 1 }] : { foo: number; }[] +>{ foo: 1 + 1 } : { foo: number; } +>foo : number +>1 + 1 : number +>1 : 1 +>1 : 1 + +=== d.ts === +export default [{ foo: 1 + 1 }] as const; +>[{ foo: 1 + 1 }] as const : readonly [{ readonly foo: number; }] +>[{ foo: 1 + 1 }] : readonly [{ readonly foo: number; }] +>{ foo: 1 + 1 } : { readonly foo: number; } +>foo : number +>1 + 1 : number +>1 : 1 +>1 : 1 + +=== e.ts === +export default [{ foo: 1 + 1 }] as const; +>[{ foo: 1 + 1 }] as const : readonly [{ readonly foo: number; }] +>[{ foo: 1 + 1 }] : readonly [{ readonly foo: number; }] +>{ foo: 1 + 1 } : { readonly foo: number; } +>foo : number +>1 + 1 : number +>1 : 1 +>1 : 1 + +=== f.ts === +const a = { foo: 1 }; +>a : { foo: number; } +>{ foo: 1 } : { foo: number; } +>foo : number +>1 : 1 + +export default a; +>a : { foo: number; } + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.errors.txt new file mode 100644 index 0000000000000..adc2ffbf0df9a --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.errors.txt @@ -0,0 +1,35 @@ +isolatedDeclarationErrorsExpandoFunctions.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpandoFunctions.ts(3,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(6,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(7,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(8,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== isolatedDeclarationErrorsExpandoFunctions.ts (7 errors) ==== + export function foo() {} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 isolatedDeclarationErrorsExpandoFunctions.ts:1:17: Add a return type to the function declaration. + + foo.apply = () => {} + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.call = ()=> {} + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.bind = ()=> {} + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.caller = ()=> {} + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.toString = ()=> {} + ~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.length = 10 + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.length = 10 + \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.js b/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.js new file mode 100644 index 0000000000000..f62409ac37f85 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts] //// + +//// [isolatedDeclarationErrorsExpandoFunctions.ts] +export function foo() {} + +foo.apply = () => {} +foo.call = ()=> {} +foo.bind = ()=> {} +foo.caller = ()=> {} +foo.toString = ()=> {} +foo.length = 10 +foo.length = 10 + + +//// [isolatedDeclarationErrorsExpandoFunctions.js] +export function foo() { } +foo.apply = () => { }; +foo.call = () => { }; +foo.bind = () => { }; +foo.caller = () => { }; +foo.toString = () => { }; +foo.length = 10; +foo.length = 10; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.symbols b/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.symbols new file mode 100644 index 0000000000000..bb2acb5f3865e --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.symbols @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts] //// + +=== isolatedDeclarationErrorsExpandoFunctions.ts === +export function foo() {} +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 0), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18) ... and 3 more) + +foo.apply = () => {} +>foo.apply : Symbol(foo.apply, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 0), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18) ... and 3 more) +>apply : Symbol(foo.apply, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24)) + +foo.call = ()=> {} +>foo.call : Symbol(foo.call, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 0), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18) ... and 3 more) +>call : Symbol(foo.call, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20)) + +foo.bind = ()=> {} +>foo.bind : Symbol(foo.bind, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 0), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18) ... and 3 more) +>bind : Symbol(foo.bind, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18)) + +foo.caller = ()=> {} +>foo.caller : Symbol(foo.caller, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 0), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18) ... and 3 more) +>caller : Symbol(foo.caller, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18)) + +foo.toString = ()=> {} +>foo.toString : Symbol(foo.toString, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 5, 20)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 0), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18) ... and 3 more) +>toString : Symbol(foo.toString, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 5, 20)) + +foo.length = 10 +>foo.length : Symbol(foo.length, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 6, 22), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 7, 15)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 0), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18) ... and 3 more) +>length : Symbol(foo.length, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 6, 22), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 7, 15)) + +foo.length = 10 +>foo.length : Symbol(foo.length, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 6, 22), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 7, 15)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 0), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 0, 24), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 2, 20), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 3, 18), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 4, 18) ... and 3 more) +>length : Symbol(foo.length, Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 6, 22), Decl(isolatedDeclarationErrorsExpandoFunctions.ts, 7, 15)) + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.types b/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.types new file mode 100644 index 0000000000000..163b703b40c69 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.types @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts] //// + +=== isolatedDeclarationErrorsExpandoFunctions.ts === +export function foo() {} +>foo : typeof foo + +foo.apply = () => {} +>foo.apply = () => {} : () => void +>foo.apply : () => void +>foo : typeof foo +>apply : () => void +>() => {} : () => void + +foo.call = ()=> {} +>foo.call = ()=> {} : () => void +>foo.call : () => void +>foo : typeof foo +>call : () => void +>()=> {} : () => void + +foo.bind = ()=> {} +>foo.bind = ()=> {} : () => void +>foo.bind : () => void +>foo : typeof foo +>bind : () => void +>()=> {} : () => void + +foo.caller = ()=> {} +>foo.caller = ()=> {} : () => void +>foo.caller : () => void +>foo : typeof foo +>caller : () => void +>()=> {} : () => void + +foo.toString = ()=> {} +>foo.toString = ()=> {} : () => void +>foo.toString : () => void +>foo : typeof foo +>toString : () => void +>()=> {} : () => void + +foo.length = 10 +>foo.length = 10 : 10 +>foo.length : number +>foo : typeof foo +>length : number +>10 : 10 + +foo.length = 10 +>foo.length = 10 : 10 +>foo.length : number +>foo : typeof foo +>length : number +>10 : 10 + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt new file mode 100644 index 0000000000000..29b5c17bbe289 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt @@ -0,0 +1,317 @@ +isolatedDeclarationErrorsExpressions.ts(3,32): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(4,32): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(5,32): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(8,32): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(9,32): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(10,32): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(13,31): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(23,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(24,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(25,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(28,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(29,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(30,28): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(33,27): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(49,36): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(50,36): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(51,36): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(53,18): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(55,38): error TS9018: Arrays with spread elements can't inferred with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(59,28): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(60,28): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(61,28): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(64,28): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(65,28): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(66,28): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(69,27): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(78,32): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(79,32): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(80,32): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(83,32): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(84,32): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(85,32): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(88,31): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(102,29): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(103,29): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(104,29): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(109,37): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(110,37): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(111,37): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(114,37): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(115,37): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(116,37): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(119,36): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(127,16): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. +isolatedDeclarationErrorsExpressions.ts(128,19): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. + + +==== isolatedDeclarationErrorsExpressions.ts (45 errors) ==== + declare function time(): bigint + export const numberConst = 1; + export const numberConstBad1 = 1 + 1; + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:3:14: Add a type annotation to the variable numberConstBad1. + export const numberConstBad2 = Math.random(); + ~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:4:14: Add a type annotation to the variable numberConstBad2. + export const numberConstBad3 = numberConst; + ~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:5:14: Add a type annotation to the variable numberConstBad3. + + export const bigIntConst = 1n; + export const bigIntConstBad1 = 1n + 1n; + ~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:8:14: Add a type annotation to the variable bigIntConstBad1. + export const bigIntConstBad2 = time(); + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:9:14: Add a type annotation to the variable bigIntConstBad2. + export const bigIntConstBad3 = bigIntConst; + ~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:10:14: Add a type annotation to the variable bigIntConstBad3. + + export const stringConst = "s"; + export const stringConstBad = "s" + "s"; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:13:14: Add a type annotation to the variable stringConstBad. + + // These are just strings + export const templateConstOk1 = `s`; + export const templateConstOk2 = `s${1n}`; + export const templateConstOk3 = `s${1} - ${"S"}`; + export const templateConstOk4 = `s${1} - ${"S"} - ${false}`; + export const templateConstOk5 = `s${1 + 1} - ${"S"} - ${!false}`; + + export let numberLet = 1; + export let numberLetBad1 = 1 + 1; + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:23:12: Add a type annotation to the variable numberLetBad1. + export let numberLetBad2 = Math.random(); + ~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:24:12: Add a type annotation to the variable numberLetBad2. + export let numberLetBad3 = numberLet; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:25:12: Add a type annotation to the variable numberLetBad3. + + export let bigIntLet = 1n; + export let bigIntLetBad1 = 1n + 1n; + ~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:28:12: Add a type annotation to the variable bigIntLetBad1. + export let bigIntLetBad2 = time(); + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:29:12: Add a type annotation to the variable bigIntLetBad2. + export let bigIntLetBad3 = bigIntLet; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:30:12: Add a type annotation to the variable bigIntLetBad3. + + export let stringLet = "s"; + export let stringLetBad = "s" + "s"; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:33:12: Add a type annotation to the variable stringLetBad. + + export let templateLetOk1 = `s`; + export let templateLetOk2 = `s${1} - ${"S"}`; + export let templateLetOk3 = `s${1} - ${"S"} - ${false}`; + export let templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + + // As const + + export let numberLetAsConst = 1 as const; + + export let bigIntLetAsConst = 1n as const; + + export let stringLetAsConst = "s" as const; + + export let templateLetOk1AsConst = `s` as const; + export let templateLetOk2AsConst = `s${1} - ${"S"}` as const; + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:49:12: Add a type annotation to the variable templateLetOk2AsConst. + export let templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:50:12: Add a type annotation to the variable templateLetOk3AsConst. + export let templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:51:12: Add a type annotation to the variable templateLetOk4AsConst. + + export let arr = [1, 2, 3]; + ~~~~~~~~~ +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:53:12: Add a type annotation to the variable arr. + export let arrConst = [1, 2, 3] as const; + export let arrWithSpread = [1, 2, 3, ...arr] as const; + ~~~~~~ +!!! error TS9018: Arrays with spread elements can't inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsExpressions.ts:55:12: Add a type annotation to the variable arrWithSpread. + + export class Exported { + public numberLet = 1; + public numberLetBad1 = 1 + 1; + ~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:59:12: Add a type annotation to the property numberLetBad1. + public numberLetBad2 = Math.random(); + ~~~~~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:60:12: Add a type annotation to the property numberLetBad2. + public numberLetBad3 = numberLet; + ~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:61:12: Add a type annotation to the property numberLetBad3. + + public bigIntLet = 1n; + public bigIntLetBad1 = 1n + 1n; + ~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:64:12: Add a type annotation to the property bigIntLetBad1. + public bigIntLetBad2 = time(); + ~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:65:12: Add a type annotation to the property bigIntLetBad2. + public bigIntLetBad3 = bigIntLet; + ~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:66:12: Add a type annotation to the property bigIntLetBad3. + + public stringLet = "s"; + public stringLetBad = "s" + "s"; + ~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:69:12: Add a type annotation to the property stringLetBad. + + public templateLetOk1 = `s`; + public templateLetOk2 = `s${1} - ${"S"}`; + public templateLetOk3 = `s${1} - ${"S"} - ${false}`; + public templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + + + readonly numberConst = 1; + readonly numberConstBad1 = 1 + 1; + ~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:78:14: Add a type annotation to the property numberConstBad1. + readonly numberConstBad2 = Math.random(); + ~~~~~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:79:14: Add a type annotation to the property numberConstBad2. + readonly numberConstBad3 = numberConst; + ~~~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:80:14: Add a type annotation to the property numberConstBad3. + + readonly bigIntConst = 1n; + readonly bigIntConstBad1 = 1n + 1n; + ~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:83:14: Add a type annotation to the property bigIntConstBad1. + readonly bigIntConstBad2 = time(); + ~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:84:14: Add a type annotation to the property bigIntConstBad2. + readonly bigIntConstBad3 = bigIntConst; + ~~~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:85:14: Add a type annotation to the property bigIntConstBad3. + + readonly stringConst = "s"; + readonly stringConstBad = "s" + "s"; + ~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:88:14: Add a type annotation to the property stringConstBad. + + readonly templateConstOk1 = `s`; + readonly templateConstOk2 = `s${1} - ${"S"}`; + readonly templateConstOk3 = `s${1} - ${"S"} - ${false}`; + readonly templateConstOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + + numberLetAsConst = 1 as const; + + bigIntLetAsConst = 1n as const; + + stringLetAsConst = "s" as const; + + templateLetOk1AsConst = `s` as const; + templateLetOk2AsConst = `s${1} - ${"S"}` as const; + ~~~~~~~~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:102:5: Add a type annotation to the property templateLetOk2AsConst. + templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:103:5: Add a type annotation to the property templateLetOk3AsConst. + templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsExpressions.ts:104:5: Add a type annotation to the property templateLetOk4AsConst. + + } + + export function numberParam(p = 1): void { }; + export function numberParamBad1(p = 1 + 1): void { }; + ~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsExpressions.ts:109:33: Add a type annotation to the parameter p. + export function numberParamBad2(p = Math.random()): void { }; + ~~~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsExpressions.ts:110:33: Add a type annotation to the parameter p. + export function numberParamBad3(p = numberParam): void { }; + ~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsExpressions.ts:111:33: Add a type annotation to the parameter p. + + export function bigIntParam(p = 1n): void { }; + export function bigIntParamBad1(p = 1n + 1n): void { }; + ~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsExpressions.ts:114:33: Add a type annotation to the parameter p. + export function bigIntParamBad2(p = time()): void { }; + ~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsExpressions.ts:115:33: Add a type annotation to the parameter p. + export function bigIntParamBad3(p = bigIntParam): void { }; + ~~~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsExpressions.ts:116:33: Add a type annotation to the parameter p. + + export function stringParam(p = "s"): void { }; + export function stringParamBad(p = "s" + "s"): void { }; + ~~~~~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsExpressions.ts:119:32: Add a type annotation to the parameter p. + + export function templateParamOk1(p = `s`): void { }; + export function templateParamOk2(p = `s${1} - ${"S"}`): void { }; + export function templateParamOk3(p = `s${1} - ${"S"} - ${false}`): void { }; + export function templateParamOk4(p = `s${1 + 1} - ${"S"} - ${!false}`): void { }; + + + export const { a } = { a: 1 }; + ~ +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. + export const [, , b = 1]: [number, number, number | undefined] = [0, 1, 2]; + ~ +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. + + export function foo([, , b]: [ + number, + number, + number + ] = [0, 1, 2]): void { + + } \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpressions.js b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.js new file mode 100644 index 0000000000000..9367cec903e37 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.js @@ -0,0 +1,251 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsExpressions.ts] //// + +//// [isolatedDeclarationErrorsExpressions.ts] +declare function time(): bigint +export const numberConst = 1; +export const numberConstBad1 = 1 + 1; +export const numberConstBad2 = Math.random(); +export const numberConstBad3 = numberConst; + +export const bigIntConst = 1n; +export const bigIntConstBad1 = 1n + 1n; +export const bigIntConstBad2 = time(); +export const bigIntConstBad3 = bigIntConst; + +export const stringConst = "s"; +export const stringConstBad = "s" + "s"; + +// These are just strings +export const templateConstOk1 = `s`; +export const templateConstOk2 = `s${1n}`; +export const templateConstOk3 = `s${1} - ${"S"}`; +export const templateConstOk4 = `s${1} - ${"S"} - ${false}`; +export const templateConstOk5 = `s${1 + 1} - ${"S"} - ${!false}`; + +export let numberLet = 1; +export let numberLetBad1 = 1 + 1; +export let numberLetBad2 = Math.random(); +export let numberLetBad3 = numberLet; + +export let bigIntLet = 1n; +export let bigIntLetBad1 = 1n + 1n; +export let bigIntLetBad2 = time(); +export let bigIntLetBad3 = bigIntLet; + +export let stringLet = "s"; +export let stringLetBad = "s" + "s"; + +export let templateLetOk1 = `s`; +export let templateLetOk2 = `s${1} - ${"S"}`; +export let templateLetOk3 = `s${1} - ${"S"} - ${false}`; +export let templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + +// As const + +export let numberLetAsConst = 1 as const; + +export let bigIntLetAsConst = 1n as const; + +export let stringLetAsConst = "s" as const; + +export let templateLetOk1AsConst = `s` as const; +export let templateLetOk2AsConst = `s${1} - ${"S"}` as const; +export let templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; +export let templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; + +export let arr = [1, 2, 3]; +export let arrConst = [1, 2, 3] as const; +export let arrWithSpread = [1, 2, 3, ...arr] as const; + +export class Exported { + public numberLet = 1; + public numberLetBad1 = 1 + 1; + public numberLetBad2 = Math.random(); + public numberLetBad3 = numberLet; + + public bigIntLet = 1n; + public bigIntLetBad1 = 1n + 1n; + public bigIntLetBad2 = time(); + public bigIntLetBad3 = bigIntLet; + + public stringLet = "s"; + public stringLetBad = "s" + "s"; + + public templateLetOk1 = `s`; + public templateLetOk2 = `s${1} - ${"S"}`; + public templateLetOk3 = `s${1} - ${"S"} - ${false}`; + public templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + + + readonly numberConst = 1; + readonly numberConstBad1 = 1 + 1; + readonly numberConstBad2 = Math.random(); + readonly numberConstBad3 = numberConst; + + readonly bigIntConst = 1n; + readonly bigIntConstBad1 = 1n + 1n; + readonly bigIntConstBad2 = time(); + readonly bigIntConstBad3 = bigIntConst; + + readonly stringConst = "s"; + readonly stringConstBad = "s" + "s"; + + readonly templateConstOk1 = `s`; + readonly templateConstOk2 = `s${1} - ${"S"}`; + readonly templateConstOk3 = `s${1} - ${"S"} - ${false}`; + readonly templateConstOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + + numberLetAsConst = 1 as const; + + bigIntLetAsConst = 1n as const; + + stringLetAsConst = "s" as const; + + templateLetOk1AsConst = `s` as const; + templateLetOk2AsConst = `s${1} - ${"S"}` as const; + templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; + templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; + +} + +export function numberParam(p = 1): void { }; +export function numberParamBad1(p = 1 + 1): void { }; +export function numberParamBad2(p = Math.random()): void { }; +export function numberParamBad3(p = numberParam): void { }; + +export function bigIntParam(p = 1n): void { }; +export function bigIntParamBad1(p = 1n + 1n): void { }; +export function bigIntParamBad2(p = time()): void { }; +export function bigIntParamBad3(p = bigIntParam): void { }; + +export function stringParam(p = "s"): void { }; +export function stringParamBad(p = "s" + "s"): void { }; + +export function templateParamOk1(p = `s`): void { }; +export function templateParamOk2(p = `s${1} - ${"S"}`): void { }; +export function templateParamOk3(p = `s${1} - ${"S"} - ${false}`): void { }; +export function templateParamOk4(p = `s${1 + 1} - ${"S"} - ${!false}`): void { }; + + +export const { a } = { a: 1 }; +export const [, , b = 1]: [number, number, number | undefined] = [0, 1, 2]; + +export function foo([, , b]: [ + number, + number, + number +] = [0, 1, 2]): void { + +} + +//// [isolatedDeclarationErrorsExpressions.js] +export const numberConst = 1; +export const numberConstBad1 = 1 + 1; +export const numberConstBad2 = Math.random(); +export const numberConstBad3 = numberConst; +export const bigIntConst = 1n; +export const bigIntConstBad1 = 1n + 1n; +export const bigIntConstBad2 = time(); +export const bigIntConstBad3 = bigIntConst; +export const stringConst = "s"; +export const stringConstBad = "s" + "s"; +// These are just strings +export const templateConstOk1 = `s`; +export const templateConstOk2 = `s${1n}`; +export const templateConstOk3 = `s${1} - ${"S"}`; +export const templateConstOk4 = `s${1} - ${"S"} - ${false}`; +export const templateConstOk5 = `s${1 + 1} - ${"S"} - ${!false}`; +export let numberLet = 1; +export let numberLetBad1 = 1 + 1; +export let numberLetBad2 = Math.random(); +export let numberLetBad3 = numberLet; +export let bigIntLet = 1n; +export let bigIntLetBad1 = 1n + 1n; +export let bigIntLetBad2 = time(); +export let bigIntLetBad3 = bigIntLet; +export let stringLet = "s"; +export let stringLetBad = "s" + "s"; +export let templateLetOk1 = `s`; +export let templateLetOk2 = `s${1} - ${"S"}`; +export let templateLetOk3 = `s${1} - ${"S"} - ${false}`; +export let templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; +// As const +export let numberLetAsConst = 1; +export let bigIntLetAsConst = 1n; +export let stringLetAsConst = "s"; +export let templateLetOk1AsConst = `s`; +export let templateLetOk2AsConst = `s${1} - ${"S"}`; +export let templateLetOk3AsConst = `s${1} - ${"S"} - ${false}`; +export let templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}`; +export let arr = [1, 2, 3]; +export let arrConst = [1, 2, 3]; +export let arrWithSpread = [1, 2, 3, ...arr]; +export class Exported { + numberLet = 1; + numberLetBad1 = 1 + 1; + numberLetBad2 = Math.random(); + numberLetBad3 = numberLet; + bigIntLet = 1n; + bigIntLetBad1 = 1n + 1n; + bigIntLetBad2 = time(); + bigIntLetBad3 = bigIntLet; + stringLet = "s"; + stringLetBad = "s" + "s"; + templateLetOk1 = `s`; + templateLetOk2 = `s${1} - ${"S"}`; + templateLetOk3 = `s${1} - ${"S"} - ${false}`; + templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + numberConst = 1; + numberConstBad1 = 1 + 1; + numberConstBad2 = Math.random(); + numberConstBad3 = numberConst; + bigIntConst = 1n; + bigIntConstBad1 = 1n + 1n; + bigIntConstBad2 = time(); + bigIntConstBad3 = bigIntConst; + stringConst = "s"; + stringConstBad = "s" + "s"; + templateConstOk1 = `s`; + templateConstOk2 = `s${1} - ${"S"}`; + templateConstOk3 = `s${1} - ${"S"} - ${false}`; + templateConstOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + numberLetAsConst = 1; + bigIntLetAsConst = 1n; + stringLetAsConst = "s"; + templateLetOk1AsConst = `s`; + templateLetOk2AsConst = `s${1} - ${"S"}`; + templateLetOk3AsConst = `s${1} - ${"S"} - ${false}`; + templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}`; +} +export function numberParam(p = 1) { } +; +export function numberParamBad1(p = 1 + 1) { } +; +export function numberParamBad2(p = Math.random()) { } +; +export function numberParamBad3(p = numberParam) { } +; +export function bigIntParam(p = 1n) { } +; +export function bigIntParamBad1(p = 1n + 1n) { } +; +export function bigIntParamBad2(p = time()) { } +; +export function bigIntParamBad3(p = bigIntParam) { } +; +export function stringParam(p = "s") { } +; +export function stringParamBad(p = "s" + "s") { } +; +export function templateParamOk1(p = `s`) { } +; +export function templateParamOk2(p = `s${1} - ${"S"}`) { } +; +export function templateParamOk3(p = `s${1} - ${"S"} - ${false}`) { } +; +export function templateParamOk4(p = `s${1 + 1} - ${"S"} - ${!false}`) { } +; +export const { a } = { a: 1 }; +export const [, , b = 1] = [0, 1, 2]; +export function foo([, , b] = [0, 1, 2]) { +} diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpressions.symbols b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.symbols new file mode 100644 index 0000000000000..37981249d3dd5 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.symbols @@ -0,0 +1,358 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsExpressions.ts] //// + +=== isolatedDeclarationErrorsExpressions.ts === +declare function time(): bigint +>time : Symbol(time, Decl(isolatedDeclarationErrorsExpressions.ts, 0, 0)) + +export const numberConst = 1; +>numberConst : Symbol(numberConst, Decl(isolatedDeclarationErrorsExpressions.ts, 1, 12)) + +export const numberConstBad1 = 1 + 1; +>numberConstBad1 : Symbol(numberConstBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 2, 12)) + +export const numberConstBad2 = Math.random(); +>numberConstBad2 : Symbol(numberConstBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 3, 12)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + +export const numberConstBad3 = numberConst; +>numberConstBad3 : Symbol(numberConstBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 4, 12)) +>numberConst : Symbol(numberConst, Decl(isolatedDeclarationErrorsExpressions.ts, 1, 12)) + +export const bigIntConst = 1n; +>bigIntConst : Symbol(bigIntConst, Decl(isolatedDeclarationErrorsExpressions.ts, 6, 12)) + +export const bigIntConstBad1 = 1n + 1n; +>bigIntConstBad1 : Symbol(bigIntConstBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 7, 12)) + +export const bigIntConstBad2 = time(); +>bigIntConstBad2 : Symbol(bigIntConstBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 8, 12)) +>time : Symbol(time, Decl(isolatedDeclarationErrorsExpressions.ts, 0, 0)) + +export const bigIntConstBad3 = bigIntConst; +>bigIntConstBad3 : Symbol(bigIntConstBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 9, 12)) +>bigIntConst : Symbol(bigIntConst, Decl(isolatedDeclarationErrorsExpressions.ts, 6, 12)) + +export const stringConst = "s"; +>stringConst : Symbol(stringConst, Decl(isolatedDeclarationErrorsExpressions.ts, 11, 12)) + +export const stringConstBad = "s" + "s"; +>stringConstBad : Symbol(stringConstBad, Decl(isolatedDeclarationErrorsExpressions.ts, 12, 12)) + +// These are just strings +export const templateConstOk1 = `s`; +>templateConstOk1 : Symbol(templateConstOk1, Decl(isolatedDeclarationErrorsExpressions.ts, 15, 12)) + +export const templateConstOk2 = `s${1n}`; +>templateConstOk2 : Symbol(templateConstOk2, Decl(isolatedDeclarationErrorsExpressions.ts, 16, 12)) + +export const templateConstOk3 = `s${1} - ${"S"}`; +>templateConstOk3 : Symbol(templateConstOk3, Decl(isolatedDeclarationErrorsExpressions.ts, 17, 12)) + +export const templateConstOk4 = `s${1} - ${"S"} - ${false}`; +>templateConstOk4 : Symbol(templateConstOk4, Decl(isolatedDeclarationErrorsExpressions.ts, 18, 12)) + +export const templateConstOk5 = `s${1 + 1} - ${"S"} - ${!false}`; +>templateConstOk5 : Symbol(templateConstOk5, Decl(isolatedDeclarationErrorsExpressions.ts, 19, 12)) + +export let numberLet = 1; +>numberLet : Symbol(numberLet, Decl(isolatedDeclarationErrorsExpressions.ts, 21, 10)) + +export let numberLetBad1 = 1 + 1; +>numberLetBad1 : Symbol(numberLetBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 22, 10)) + +export let numberLetBad2 = Math.random(); +>numberLetBad2 : Symbol(numberLetBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 23, 10)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + +export let numberLetBad3 = numberLet; +>numberLetBad3 : Symbol(numberLetBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 24, 10)) +>numberLet : Symbol(numberLet, Decl(isolatedDeclarationErrorsExpressions.ts, 21, 10)) + +export let bigIntLet = 1n; +>bigIntLet : Symbol(bigIntLet, Decl(isolatedDeclarationErrorsExpressions.ts, 26, 10)) + +export let bigIntLetBad1 = 1n + 1n; +>bigIntLetBad1 : Symbol(bigIntLetBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 27, 10)) + +export let bigIntLetBad2 = time(); +>bigIntLetBad2 : Symbol(bigIntLetBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 28, 10)) +>time : Symbol(time, Decl(isolatedDeclarationErrorsExpressions.ts, 0, 0)) + +export let bigIntLetBad3 = bigIntLet; +>bigIntLetBad3 : Symbol(bigIntLetBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 29, 10)) +>bigIntLet : Symbol(bigIntLet, Decl(isolatedDeclarationErrorsExpressions.ts, 26, 10)) + +export let stringLet = "s"; +>stringLet : Symbol(stringLet, Decl(isolatedDeclarationErrorsExpressions.ts, 31, 10)) + +export let stringLetBad = "s" + "s"; +>stringLetBad : Symbol(stringLetBad, Decl(isolatedDeclarationErrorsExpressions.ts, 32, 10)) + +export let templateLetOk1 = `s`; +>templateLetOk1 : Symbol(templateLetOk1, Decl(isolatedDeclarationErrorsExpressions.ts, 34, 10)) + +export let templateLetOk2 = `s${1} - ${"S"}`; +>templateLetOk2 : Symbol(templateLetOk2, Decl(isolatedDeclarationErrorsExpressions.ts, 35, 10)) + +export let templateLetOk3 = `s${1} - ${"S"} - ${false}`; +>templateLetOk3 : Symbol(templateLetOk3, Decl(isolatedDeclarationErrorsExpressions.ts, 36, 10)) + +export let templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; +>templateLetOk4 : Symbol(templateLetOk4, Decl(isolatedDeclarationErrorsExpressions.ts, 37, 10)) + +// As const + +export let numberLetAsConst = 1 as const; +>numberLetAsConst : Symbol(numberLetAsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 41, 10)) +>const : Symbol(const) + +export let bigIntLetAsConst = 1n as const; +>bigIntLetAsConst : Symbol(bigIntLetAsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 43, 10)) +>const : Symbol(const) + +export let stringLetAsConst = "s" as const; +>stringLetAsConst : Symbol(stringLetAsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 45, 10)) +>const : Symbol(const) + +export let templateLetOk1AsConst = `s` as const; +>templateLetOk1AsConst : Symbol(templateLetOk1AsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 47, 10)) +>const : Symbol(const) + +export let templateLetOk2AsConst = `s${1} - ${"S"}` as const; +>templateLetOk2AsConst : Symbol(templateLetOk2AsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 48, 10)) +>const : Symbol(const) + +export let templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; +>templateLetOk3AsConst : Symbol(templateLetOk3AsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 49, 10)) +>const : Symbol(const) + +export let templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; +>templateLetOk4AsConst : Symbol(templateLetOk4AsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 50, 10)) +>const : Symbol(const) + +export let arr = [1, 2, 3]; +>arr : Symbol(arr, Decl(isolatedDeclarationErrorsExpressions.ts, 52, 10)) + +export let arrConst = [1, 2, 3] as const; +>arrConst : Symbol(arrConst, Decl(isolatedDeclarationErrorsExpressions.ts, 53, 10)) +>const : Symbol(const) + +export let arrWithSpread = [1, 2, 3, ...arr] as const; +>arrWithSpread : Symbol(arrWithSpread, Decl(isolatedDeclarationErrorsExpressions.ts, 54, 10)) +>arr : Symbol(arr, Decl(isolatedDeclarationErrorsExpressions.ts, 52, 10)) +>const : Symbol(const) + +export class Exported { +>Exported : Symbol(Exported, Decl(isolatedDeclarationErrorsExpressions.ts, 54, 54)) + + public numberLet = 1; +>numberLet : Symbol(Exported.numberLet, Decl(isolatedDeclarationErrorsExpressions.ts, 56, 23)) + + public numberLetBad1 = 1 + 1; +>numberLetBad1 : Symbol(Exported.numberLetBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 57, 25)) + + public numberLetBad2 = Math.random(); +>numberLetBad2 : Symbol(Exported.numberLetBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 58, 33)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + public numberLetBad3 = numberLet; +>numberLetBad3 : Symbol(Exported.numberLetBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 59, 41)) +>numberLet : Symbol(numberLet, Decl(isolatedDeclarationErrorsExpressions.ts, 21, 10)) + + public bigIntLet = 1n; +>bigIntLet : Symbol(Exported.bigIntLet, Decl(isolatedDeclarationErrorsExpressions.ts, 60, 37)) + + public bigIntLetBad1 = 1n + 1n; +>bigIntLetBad1 : Symbol(Exported.bigIntLetBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 62, 26)) + + public bigIntLetBad2 = time(); +>bigIntLetBad2 : Symbol(Exported.bigIntLetBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 63, 35)) +>time : Symbol(time, Decl(isolatedDeclarationErrorsExpressions.ts, 0, 0)) + + public bigIntLetBad3 = bigIntLet; +>bigIntLetBad3 : Symbol(Exported.bigIntLetBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 64, 34)) +>bigIntLet : Symbol(bigIntLet, Decl(isolatedDeclarationErrorsExpressions.ts, 26, 10)) + + public stringLet = "s"; +>stringLet : Symbol(Exported.stringLet, Decl(isolatedDeclarationErrorsExpressions.ts, 65, 37)) + + public stringLetBad = "s" + "s"; +>stringLetBad : Symbol(Exported.stringLetBad, Decl(isolatedDeclarationErrorsExpressions.ts, 67, 27)) + + public templateLetOk1 = `s`; +>templateLetOk1 : Symbol(Exported.templateLetOk1, Decl(isolatedDeclarationErrorsExpressions.ts, 68, 36)) + + public templateLetOk2 = `s${1} - ${"S"}`; +>templateLetOk2 : Symbol(Exported.templateLetOk2, Decl(isolatedDeclarationErrorsExpressions.ts, 70, 32)) + + public templateLetOk3 = `s${1} - ${"S"} - ${false}`; +>templateLetOk3 : Symbol(Exported.templateLetOk3, Decl(isolatedDeclarationErrorsExpressions.ts, 71, 45)) + + public templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; +>templateLetOk4 : Symbol(Exported.templateLetOk4, Decl(isolatedDeclarationErrorsExpressions.ts, 72, 56)) + + + readonly numberConst = 1; +>numberConst : Symbol(Exported.numberConst, Decl(isolatedDeclarationErrorsExpressions.ts, 73, 61)) + + readonly numberConstBad1 = 1 + 1; +>numberConstBad1 : Symbol(Exported.numberConstBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 76, 29)) + + readonly numberConstBad2 = Math.random(); +>numberConstBad2 : Symbol(Exported.numberConstBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 77, 37)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + readonly numberConstBad3 = numberConst; +>numberConstBad3 : Symbol(Exported.numberConstBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 78, 45)) +>numberConst : Symbol(numberConst, Decl(isolatedDeclarationErrorsExpressions.ts, 1, 12)) + + readonly bigIntConst = 1n; +>bigIntConst : Symbol(Exported.bigIntConst, Decl(isolatedDeclarationErrorsExpressions.ts, 79, 43)) + + readonly bigIntConstBad1 = 1n + 1n; +>bigIntConstBad1 : Symbol(Exported.bigIntConstBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 81, 30)) + + readonly bigIntConstBad2 = time(); +>bigIntConstBad2 : Symbol(Exported.bigIntConstBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 82, 39)) +>time : Symbol(time, Decl(isolatedDeclarationErrorsExpressions.ts, 0, 0)) + + readonly bigIntConstBad3 = bigIntConst; +>bigIntConstBad3 : Symbol(Exported.bigIntConstBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 83, 38)) +>bigIntConst : Symbol(bigIntConst, Decl(isolatedDeclarationErrorsExpressions.ts, 6, 12)) + + readonly stringConst = "s"; +>stringConst : Symbol(Exported.stringConst, Decl(isolatedDeclarationErrorsExpressions.ts, 84, 43)) + + readonly stringConstBad = "s" + "s"; +>stringConstBad : Symbol(Exported.stringConstBad, Decl(isolatedDeclarationErrorsExpressions.ts, 86, 31)) + + readonly templateConstOk1 = `s`; +>templateConstOk1 : Symbol(Exported.templateConstOk1, Decl(isolatedDeclarationErrorsExpressions.ts, 87, 40)) + + readonly templateConstOk2 = `s${1} - ${"S"}`; +>templateConstOk2 : Symbol(Exported.templateConstOk2, Decl(isolatedDeclarationErrorsExpressions.ts, 89, 36)) + + readonly templateConstOk3 = `s${1} - ${"S"} - ${false}`; +>templateConstOk3 : Symbol(Exported.templateConstOk3, Decl(isolatedDeclarationErrorsExpressions.ts, 90, 49)) + + readonly templateConstOk4 = `s${1 + 1} - ${"S"} - ${!false}`; +>templateConstOk4 : Symbol(Exported.templateConstOk4, Decl(isolatedDeclarationErrorsExpressions.ts, 91, 60)) + + numberLetAsConst = 1 as const; +>numberLetAsConst : Symbol(Exported.numberLetAsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 92, 65)) +>const : Symbol(const) + + bigIntLetAsConst = 1n as const; +>bigIntLetAsConst : Symbol(Exported.bigIntLetAsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 94, 34)) +>const : Symbol(const) + + stringLetAsConst = "s" as const; +>stringLetAsConst : Symbol(Exported.stringLetAsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 96, 35)) +>const : Symbol(const) + + templateLetOk1AsConst = `s` as const; +>templateLetOk1AsConst : Symbol(Exported.templateLetOk1AsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 98, 36)) +>const : Symbol(const) + + templateLetOk2AsConst = `s${1} - ${"S"}` as const; +>templateLetOk2AsConst : Symbol(Exported.templateLetOk2AsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 100, 41)) +>const : Symbol(const) + + templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; +>templateLetOk3AsConst : Symbol(Exported.templateLetOk3AsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 101, 54)) +>const : Symbol(const) + + templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; +>templateLetOk4AsConst : Symbol(Exported.templateLetOk4AsConst, Decl(isolatedDeclarationErrorsExpressions.ts, 102, 65)) +>const : Symbol(const) + +} + +export function numberParam(p = 1): void { }; +>numberParam : Symbol(numberParam, Decl(isolatedDeclarationErrorsExpressions.ts, 105, 1)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 107, 28)) + +export function numberParamBad1(p = 1 + 1): void { }; +>numberParamBad1 : Symbol(numberParamBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 107, 45)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 108, 32)) + +export function numberParamBad2(p = Math.random()): void { }; +>numberParamBad2 : Symbol(numberParamBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 108, 53)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 109, 32)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + +export function numberParamBad3(p = numberParam): void { }; +>numberParamBad3 : Symbol(numberParamBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 109, 61)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 110, 32)) +>numberParam : Symbol(numberParam, Decl(isolatedDeclarationErrorsExpressions.ts, 105, 1)) + +export function bigIntParam(p = 1n): void { }; +>bigIntParam : Symbol(bigIntParam, Decl(isolatedDeclarationErrorsExpressions.ts, 110, 59)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 112, 28)) + +export function bigIntParamBad1(p = 1n + 1n): void { }; +>bigIntParamBad1 : Symbol(bigIntParamBad1, Decl(isolatedDeclarationErrorsExpressions.ts, 112, 46)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 113, 32)) + +export function bigIntParamBad2(p = time()): void { }; +>bigIntParamBad2 : Symbol(bigIntParamBad2, Decl(isolatedDeclarationErrorsExpressions.ts, 113, 55)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 114, 32)) +>time : Symbol(time, Decl(isolatedDeclarationErrorsExpressions.ts, 0, 0)) + +export function bigIntParamBad3(p = bigIntParam): void { }; +>bigIntParamBad3 : Symbol(bigIntParamBad3, Decl(isolatedDeclarationErrorsExpressions.ts, 114, 54)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 115, 32)) +>bigIntParam : Symbol(bigIntParam, Decl(isolatedDeclarationErrorsExpressions.ts, 110, 59)) + +export function stringParam(p = "s"): void { }; +>stringParam : Symbol(stringParam, Decl(isolatedDeclarationErrorsExpressions.ts, 115, 59)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 117, 28)) + +export function stringParamBad(p = "s" + "s"): void { }; +>stringParamBad : Symbol(stringParamBad, Decl(isolatedDeclarationErrorsExpressions.ts, 117, 47)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 118, 31)) + +export function templateParamOk1(p = `s`): void { }; +>templateParamOk1 : Symbol(templateParamOk1, Decl(isolatedDeclarationErrorsExpressions.ts, 118, 56)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 120, 33)) + +export function templateParamOk2(p = `s${1} - ${"S"}`): void { }; +>templateParamOk2 : Symbol(templateParamOk2, Decl(isolatedDeclarationErrorsExpressions.ts, 120, 52)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 121, 33)) + +export function templateParamOk3(p = `s${1} - ${"S"} - ${false}`): void { }; +>templateParamOk3 : Symbol(templateParamOk3, Decl(isolatedDeclarationErrorsExpressions.ts, 121, 65)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 122, 33)) + +export function templateParamOk4(p = `s${1 + 1} - ${"S"} - ${!false}`): void { }; +>templateParamOk4 : Symbol(templateParamOk4, Decl(isolatedDeclarationErrorsExpressions.ts, 122, 76)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsExpressions.ts, 123, 33)) + + +export const { a } = { a: 1 }; +>a : Symbol(a, Decl(isolatedDeclarationErrorsExpressions.ts, 126, 14)) +>a : Symbol(a, Decl(isolatedDeclarationErrorsExpressions.ts, 126, 22)) + +export const [, , b = 1]: [number, number, number | undefined] = [0, 1, 2]; +>b : Symbol(b, Decl(isolatedDeclarationErrorsExpressions.ts, 127, 17)) + +export function foo([, , b]: [ +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsExpressions.ts, 127, 75)) +>b : Symbol(b, Decl(isolatedDeclarationErrorsExpressions.ts, 129, 24)) + + number, + number, + number +] = [0, 1, 2]): void { + +} diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpressions.types b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.types new file mode 100644 index 0000000000000..70d3266b03fd3 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.types @@ -0,0 +1,569 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsExpressions.ts] //// + +=== isolatedDeclarationErrorsExpressions.ts === +declare function time(): bigint +>time : () => bigint + +export const numberConst = 1; +>numberConst : 1 +>1 : 1 + +export const numberConstBad1 = 1 + 1; +>numberConstBad1 : number +>1 + 1 : number +>1 : 1 +>1 : 1 + +export const numberConstBad2 = Math.random(); +>numberConstBad2 : number +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + +export const numberConstBad3 = numberConst; +>numberConstBad3 : 1 +>numberConst : 1 + +export const bigIntConst = 1n; +>bigIntConst : 1n +>1n : 1n + +export const bigIntConstBad1 = 1n + 1n; +>bigIntConstBad1 : bigint +>1n + 1n : bigint +>1n : 1n +>1n : 1n + +export const bigIntConstBad2 = time(); +>bigIntConstBad2 : bigint +>time() : bigint +>time : () => bigint + +export const bigIntConstBad3 = bigIntConst; +>bigIntConstBad3 : 1n +>bigIntConst : 1n + +export const stringConst = "s"; +>stringConst : "s" +>"s" : "s" + +export const stringConstBad = "s" + "s"; +>stringConstBad : string +>"s" + "s" : string +>"s" : "s" +>"s" : "s" + +// These are just strings +export const templateConstOk1 = `s`; +>templateConstOk1 : "s" +>`s` : "s" + +export const templateConstOk2 = `s${1n}`; +>templateConstOk2 : string +>`s${1n}` : string +>1n : 1n + +export const templateConstOk3 = `s${1} - ${"S"}`; +>templateConstOk3 : "s1 - S" +>`s${1} - ${"S"}` : "s1 - S" +>1 : 1 +>"S" : "S" + +export const templateConstOk4 = `s${1} - ${"S"} - ${false}`; +>templateConstOk4 : string +>`s${1} - ${"S"} - ${false}` : string +>1 : 1 +>"S" : "S" +>false : false + +export const templateConstOk5 = `s${1 + 1} - ${"S"} - ${!false}`; +>templateConstOk5 : string +>`s${1 + 1} - ${"S"} - ${!false}` : string +>1 + 1 : number +>1 : 1 +>1 : 1 +>"S" : "S" +>!false : true +>false : false + +export let numberLet = 1; +>numberLet : number +>1 : 1 + +export let numberLetBad1 = 1 + 1; +>numberLetBad1 : number +>1 + 1 : number +>1 : 1 +>1 : 1 + +export let numberLetBad2 = Math.random(); +>numberLetBad2 : number +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + +export let numberLetBad3 = numberLet; +>numberLetBad3 : number +>numberLet : number + +export let bigIntLet = 1n; +>bigIntLet : bigint +>1n : 1n + +export let bigIntLetBad1 = 1n + 1n; +>bigIntLetBad1 : bigint +>1n + 1n : bigint +>1n : 1n +>1n : 1n + +export let bigIntLetBad2 = time(); +>bigIntLetBad2 : bigint +>time() : bigint +>time : () => bigint + +export let bigIntLetBad3 = bigIntLet; +>bigIntLetBad3 : bigint +>bigIntLet : bigint + +export let stringLet = "s"; +>stringLet : string +>"s" : "s" + +export let stringLetBad = "s" + "s"; +>stringLetBad : string +>"s" + "s" : string +>"s" : "s" +>"s" : "s" + +export let templateLetOk1 = `s`; +>templateLetOk1 : string +>`s` : "s" + +export let templateLetOk2 = `s${1} - ${"S"}`; +>templateLetOk2 : string +>`s${1} - ${"S"}` : "s1 - S" +>1 : 1 +>"S" : "S" + +export let templateLetOk3 = `s${1} - ${"S"} - ${false}`; +>templateLetOk3 : string +>`s${1} - ${"S"} - ${false}` : string +>1 : 1 +>"S" : "S" +>false : false + +export let templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; +>templateLetOk4 : string +>`s${1 + 1} - ${"S"} - ${!false}` : string +>1 + 1 : number +>1 : 1 +>1 : 1 +>"S" : "S" +>!false : true +>false : false + +// As const + +export let numberLetAsConst = 1 as const; +>numberLetAsConst : 1 +>1 as const : 1 +>1 : 1 + +export let bigIntLetAsConst = 1n as const; +>bigIntLetAsConst : 1n +>1n as const : 1n +>1n : 1n + +export let stringLetAsConst = "s" as const; +>stringLetAsConst : "s" +>"s" as const : "s" +>"s" : "s" + +export let templateLetOk1AsConst = `s` as const; +>templateLetOk1AsConst : "s" +>`s` as const : "s" +>`s` : "s" + +export let templateLetOk2AsConst = `s${1} - ${"S"}` as const; +>templateLetOk2AsConst : "s1 - S" +>`s${1} - ${"S"}` as const : "s1 - S" +>`s${1} - ${"S"}` : "s1 - S" +>1 : 1 +>"S" : "S" + +export let templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; +>templateLetOk3AsConst : "s1 - S - false" +>`s${1} - ${"S"} - ${false}` as const : "s1 - S - false" +>`s${1} - ${"S"} - ${false}` : "s1 - S - false" +>1 : 1 +>"S" : "S" +>false : false + +export let templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; +>templateLetOk4AsConst : `s${number} - S - true` +>`s${1 + 1} - ${"S"} - ${!false}` as const : `s${number} - S - true` +>`s${1 + 1} - ${"S"} - ${!false}` : `s${number} - S - true` +>1 + 1 : number +>1 : 1 +>1 : 1 +>"S" : "S" +>!false : true +>false : false + +export let arr = [1, 2, 3]; +>arr : number[] +>[1, 2, 3] : number[] +>1 : 1 +>2 : 2 +>3 : 3 + +export let arrConst = [1, 2, 3] as const; +>arrConst : readonly [1, 2, 3] +>[1, 2, 3] as const : readonly [1, 2, 3] +>[1, 2, 3] : readonly [1, 2, 3] +>1 : 1 +>2 : 2 +>3 : 3 + +export let arrWithSpread = [1, 2, 3, ...arr] as const; +>arrWithSpread : readonly [1, 2, 3, ...number[]] +>[1, 2, 3, ...arr] as const : readonly [1, 2, 3, ...number[]] +>[1, 2, 3, ...arr] : readonly [1, 2, 3, ...number[]] +>1 : 1 +>2 : 2 +>3 : 3 +>...arr : number +>arr : number[] + +export class Exported { +>Exported : Exported + + public numberLet = 1; +>numberLet : number +>1 : 1 + + public numberLetBad1 = 1 + 1; +>numberLetBad1 : number +>1 + 1 : number +>1 : 1 +>1 : 1 + + public numberLetBad2 = Math.random(); +>numberLetBad2 : number +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + + public numberLetBad3 = numberLet; +>numberLetBad3 : number +>numberLet : number + + public bigIntLet = 1n; +>bigIntLet : bigint +>1n : 1n + + public bigIntLetBad1 = 1n + 1n; +>bigIntLetBad1 : bigint +>1n + 1n : bigint +>1n : 1n +>1n : 1n + + public bigIntLetBad2 = time(); +>bigIntLetBad2 : bigint +>time() : bigint +>time : () => bigint + + public bigIntLetBad3 = bigIntLet; +>bigIntLetBad3 : bigint +>bigIntLet : bigint + + public stringLet = "s"; +>stringLet : string +>"s" : "s" + + public stringLetBad = "s" + "s"; +>stringLetBad : string +>"s" + "s" : string +>"s" : "s" +>"s" : "s" + + public templateLetOk1 = `s`; +>templateLetOk1 : string +>`s` : "s" + + public templateLetOk2 = `s${1} - ${"S"}`; +>templateLetOk2 : string +>`s${1} - ${"S"}` : "s1 - S" +>1 : 1 +>"S" : "S" + + public templateLetOk3 = `s${1} - ${"S"} - ${false}`; +>templateLetOk3 : string +>`s${1} - ${"S"} - ${false}` : string +>1 : 1 +>"S" : "S" +>false : false + + public templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; +>templateLetOk4 : string +>`s${1 + 1} - ${"S"} - ${!false}` : string +>1 + 1 : number +>1 : 1 +>1 : 1 +>"S" : "S" +>!false : true +>false : false + + + readonly numberConst = 1; +>numberConst : 1 +>1 : 1 + + readonly numberConstBad1 = 1 + 1; +>numberConstBad1 : number +>1 + 1 : number +>1 : 1 +>1 : 1 + + readonly numberConstBad2 = Math.random(); +>numberConstBad2 : number +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + + readonly numberConstBad3 = numberConst; +>numberConstBad3 : 1 +>numberConst : 1 + + readonly bigIntConst = 1n; +>bigIntConst : 1n +>1n : 1n + + readonly bigIntConstBad1 = 1n + 1n; +>bigIntConstBad1 : bigint +>1n + 1n : bigint +>1n : 1n +>1n : 1n + + readonly bigIntConstBad2 = time(); +>bigIntConstBad2 : bigint +>time() : bigint +>time : () => bigint + + readonly bigIntConstBad3 = bigIntConst; +>bigIntConstBad3 : 1n +>bigIntConst : 1n + + readonly stringConst = "s"; +>stringConst : "s" +>"s" : "s" + + readonly stringConstBad = "s" + "s"; +>stringConstBad : string +>"s" + "s" : string +>"s" : "s" +>"s" : "s" + + readonly templateConstOk1 = `s`; +>templateConstOk1 : "s" +>`s` : "s" + + readonly templateConstOk2 = `s${1} - ${"S"}`; +>templateConstOk2 : "s1 - S" +>`s${1} - ${"S"}` : "s1 - S" +>1 : 1 +>"S" : "S" + + readonly templateConstOk3 = `s${1} - ${"S"} - ${false}`; +>templateConstOk3 : string +>`s${1} - ${"S"} - ${false}` : string +>1 : 1 +>"S" : "S" +>false : false + + readonly templateConstOk4 = `s${1 + 1} - ${"S"} - ${!false}`; +>templateConstOk4 : string +>`s${1 + 1} - ${"S"} - ${!false}` : string +>1 + 1 : number +>1 : 1 +>1 : 1 +>"S" : "S" +>!false : true +>false : false + + numberLetAsConst = 1 as const; +>numberLetAsConst : 1 +>1 as const : 1 +>1 : 1 + + bigIntLetAsConst = 1n as const; +>bigIntLetAsConst : 1n +>1n as const : 1n +>1n : 1n + + stringLetAsConst = "s" as const; +>stringLetAsConst : "s" +>"s" as const : "s" +>"s" : "s" + + templateLetOk1AsConst = `s` as const; +>templateLetOk1AsConst : "s" +>`s` as const : "s" +>`s` : "s" + + templateLetOk2AsConst = `s${1} - ${"S"}` as const; +>templateLetOk2AsConst : "s1 - S" +>`s${1} - ${"S"}` as const : "s1 - S" +>`s${1} - ${"S"}` : "s1 - S" +>1 : 1 +>"S" : "S" + + templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; +>templateLetOk3AsConst : "s1 - S - false" +>`s${1} - ${"S"} - ${false}` as const : "s1 - S - false" +>`s${1} - ${"S"} - ${false}` : "s1 - S - false" +>1 : 1 +>"S" : "S" +>false : false + + templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; +>templateLetOk4AsConst : `s${number} - S - true` +>`s${1 + 1} - ${"S"} - ${!false}` as const : `s${number} - S - true` +>`s${1 + 1} - ${"S"} - ${!false}` : `s${number} - S - true` +>1 + 1 : number +>1 : 1 +>1 : 1 +>"S" : "S" +>!false : true +>false : false + +} + +export function numberParam(p = 1): void { }; +>numberParam : (p?: number) => void +>p : number +>1 : 1 + +export function numberParamBad1(p = 1 + 1): void { }; +>numberParamBad1 : (p?: number) => void +>p : number +>1 + 1 : number +>1 : 1 +>1 : 1 + +export function numberParamBad2(p = Math.random()): void { }; +>numberParamBad2 : (p?: number) => void +>p : number +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + +export function numberParamBad3(p = numberParam): void { }; +>numberParamBad3 : (p?: (p?: number) => void) => void +>p : (p?: number) => void +>numberParam : (p?: number) => void + +export function bigIntParam(p = 1n): void { }; +>bigIntParam : (p?: bigint) => void +>p : bigint +>1n : 1n + +export function bigIntParamBad1(p = 1n + 1n): void { }; +>bigIntParamBad1 : (p?: bigint) => void +>p : bigint +>1n + 1n : bigint +>1n : 1n +>1n : 1n + +export function bigIntParamBad2(p = time()): void { }; +>bigIntParamBad2 : (p?: bigint) => void +>p : bigint +>time() : bigint +>time : () => bigint + +export function bigIntParamBad3(p = bigIntParam): void { }; +>bigIntParamBad3 : (p?: (p?: bigint) => void) => void +>p : (p?: bigint) => void +>bigIntParam : (p?: bigint) => void + +export function stringParam(p = "s"): void { }; +>stringParam : (p?: string) => void +>p : string +>"s" : "s" + +export function stringParamBad(p = "s" + "s"): void { }; +>stringParamBad : (p?: string) => void +>p : string +>"s" + "s" : string +>"s" : "s" +>"s" : "s" + +export function templateParamOk1(p = `s`): void { }; +>templateParamOk1 : (p?: string) => void +>p : string +>`s` : "s" + +export function templateParamOk2(p = `s${1} - ${"S"}`): void { }; +>templateParamOk2 : (p?: string) => void +>p : string +>`s${1} - ${"S"}` : "s1 - S" +>1 : 1 +>"S" : "S" + +export function templateParamOk3(p = `s${1} - ${"S"} - ${false}`): void { }; +>templateParamOk3 : (p?: string) => void +>p : string +>`s${1} - ${"S"} - ${false}` : string +>1 : 1 +>"S" : "S" +>false : false + +export function templateParamOk4(p = `s${1 + 1} - ${"S"} - ${!false}`): void { }; +>templateParamOk4 : (p?: string) => void +>p : string +>`s${1 + 1} - ${"S"} - ${!false}` : string +>1 + 1 : number +>1 : 1 +>1 : 1 +>"S" : "S" +>!false : true +>false : false + + +export const { a } = { a: 1 }; +>a : number +>{ a: 1 } : { a: number; } +>a : number +>1 : 1 + +export const [, , b = 1]: [number, number, number | undefined] = [0, 1, 2]; +> : undefined +> : undefined +>b : number +>1 : 1 +>[0, 1, 2] : [number, number, number] +>0 : 0 +>1 : 1 +>2 : 2 + +export function foo([, , b]: [ +>foo : ([, , b]?: [ number, number, number]) => void +> : undefined +> : undefined +>b : number + + number, + number, + number +] = [0, 1, 2]): void { +>[0, 1, 2] : [number, number, number] +>0 : 0 +>1 : 1 +>2 : 2 + +} diff --git a/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.errors.txt new file mode 100644 index 0000000000000..833cae006ab9d --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.errors.txt @@ -0,0 +1,40 @@ +isolatedDeclarationErrorsFunctionDeclarations.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsFunctionDeclarations.ts(3,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsFunctionDeclarations.ts(7,49): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsFunctionDeclarations.ts(7,66): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsFunctionDeclarations.ts(7,81): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsFunctionDeclarations.ts(9,55): error TS9013: Expression type can't be inferred with --isolatedDeclarations. + + +==== isolatedDeclarationErrorsFunctionDeclarations.ts (6 errors) ==== + export function noReturn() {} + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 isolatedDeclarationErrorsFunctionDeclarations.ts:1:17: Add a return type to the function declaration. + + export function noParamAnnotation(p): void {} + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsFunctionDeclarations.ts:3:35: Add a type annotation to the parameter p. + + export function noParamAnnotationDefault(p = 1): void {} + + export function noParamAnnotationBadDefault(p = 1 + 1, p2 = { a: 1 + 1 }, p3 = [1 + 1] as const): void {} + ~~~~~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsFunctionDeclarations.ts:7:45: Add a type annotation to the parameter p. + ~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsFunctionDeclarations.ts:7:56: Add a type annotation to the parameter p2. +!!! related TS9035 isolatedDeclarationErrorsFunctionDeclarations.ts:7:66: Add a type assertion to this expression to make type type explicit. + ~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsFunctionDeclarations.ts:7:75: Add a type annotation to the parameter p3. +!!! related TS9035 isolatedDeclarationErrorsFunctionDeclarations.ts:7:81: Add a type assertion to this expression to make type type explicit. + + export function noParamAnnotationBadDefault2(p = { a: 1 + 1 }): void {} + ~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsFunctionDeclarations.ts:9:46: Add a type annotation to the parameter p. +!!! related TS9035 isolatedDeclarationErrorsFunctionDeclarations.ts:9:55: Add a type assertion to this expression to make type type explicit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.js b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.js new file mode 100644 index 0000000000000..35ef26bccea66 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsFunctionDeclarations.ts] //// + +//// [isolatedDeclarationErrorsFunctionDeclarations.ts] +export function noReturn() {} + +export function noParamAnnotation(p): void {} + +export function noParamAnnotationDefault(p = 1): void {} + +export function noParamAnnotationBadDefault(p = 1 + 1, p2 = { a: 1 + 1 }, p3 = [1 + 1] as const): void {} + +export function noParamAnnotationBadDefault2(p = { a: 1 + 1 }): void {} + + +//// [isolatedDeclarationErrorsFunctionDeclarations.js] +export function noReturn() { } +export function noParamAnnotation(p) { } +export function noParamAnnotationDefault(p = 1) { } +export function noParamAnnotationBadDefault(p = 1 + 1, p2 = { a: 1 + 1 }, p3 = [1 + 1]) { } +export function noParamAnnotationBadDefault2(p = { a: 1 + 1 }) { } diff --git a/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.symbols b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.symbols new file mode 100644 index 0000000000000..8f8babc67e77e --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsFunctionDeclarations.ts] //// + +=== isolatedDeclarationErrorsFunctionDeclarations.ts === +export function noReturn() {} +>noReturn : Symbol(noReturn, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 0, 0)) + +export function noParamAnnotation(p): void {} +>noParamAnnotation : Symbol(noParamAnnotation, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 0, 29)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 2, 34)) + +export function noParamAnnotationDefault(p = 1): void {} +>noParamAnnotationDefault : Symbol(noParamAnnotationDefault, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 2, 45)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 4, 41)) + +export function noParamAnnotationBadDefault(p = 1 + 1, p2 = { a: 1 + 1 }, p3 = [1 + 1] as const): void {} +>noParamAnnotationBadDefault : Symbol(noParamAnnotationBadDefault, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 4, 56)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 6, 44)) +>p2 : Symbol(p2, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 6, 54)) +>a : Symbol(a, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 6, 61)) +>p3 : Symbol(p3, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 6, 73)) +>const : Symbol(const) + +export function noParamAnnotationBadDefault2(p = { a: 1 + 1 }): void {} +>noParamAnnotationBadDefault2 : Symbol(noParamAnnotationBadDefault2, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 6, 105)) +>p : Symbol(p, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 8, 45)) +>a : Symbol(a, Decl(isolatedDeclarationErrorsFunctionDeclarations.ts, 8, 50)) + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.types b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.types new file mode 100644 index 0000000000000..c91c664114cc9 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.types @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsFunctionDeclarations.ts] //// + +=== isolatedDeclarationErrorsFunctionDeclarations.ts === +export function noReturn() {} +>noReturn : () => void + +export function noParamAnnotation(p): void {} +>noParamAnnotation : (p: any) => void +>p : any + +export function noParamAnnotationDefault(p = 1): void {} +>noParamAnnotationDefault : (p?: number) => void +>p : number +>1 : 1 + +export function noParamAnnotationBadDefault(p = 1 + 1, p2 = { a: 1 + 1 }, p3 = [1 + 1] as const): void {} +>noParamAnnotationBadDefault : (p?: number, p2?: { a: number; }, p3?: readonly [number]) => void +>p : number +>1 + 1 : number +>1 : 1 +>1 : 1 +>p2 : { a: number; } +>{ a: 1 + 1 } : { a: number; } +>a : number +>1 + 1 : number +>1 : 1 +>1 : 1 +>p3 : readonly [number] +>[1 + 1] as const : readonly [number] +>[1 + 1] : readonly [number] +>1 + 1 : number +>1 : 1 +>1 : 1 + +export function noParamAnnotationBadDefault2(p = { a: 1 + 1 }): void {} +>noParamAnnotationBadDefault2 : (p?: { a: number; }) => void +>p : { a: number; } +>{ a: 1 + 1 } : { a: number; } +>a : number +>1 + 1 : number +>1 : 1 +>1 : 1 + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt new file mode 100644 index 0000000000000..1ecfe2ba28a1e --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt @@ -0,0 +1,190 @@ +isolatedDeclarationErrorsObjects.ts(7,8): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(12,12): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(16,12): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(21,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(24,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(25,8): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(29,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(32,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(39,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(40,9): error TS7032: Property 'singleSetterBad' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsObjects.ts(40,25): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsObjects.ts(40,25): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(42,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(64,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(65,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(68,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(73,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(75,5): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(77,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(81,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(84,9): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + +==== isolatedDeclarationErrorsObjects.ts (23 errors) ==== + export let o = { + a: 1, + b: "" + } + + export let oBad = { + a: Math.random(), + ~~~~~~~~~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:6:12: Add a type annotation to the variable oBad. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:7:8: Add a type assertion to this expression to make type type explicit. + } + export const V = 1; + export let oBad2 = { + a: { + b: Math.random(), + ~~~~~~~~~~~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:10:12: Add a type annotation to the variable oBad2. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:12:12: Add a type assertion to this expression to make type type explicit. + }, + c: { + d: 1, + e: V, + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:10:12: Add a type annotation to the variable oBad2. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:16:12: Add a type assertion to this expression to make type type explicit. + } + } + + export let oWithMethods = { + method() { }, + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:21:5: Add a return type to the method + okMethod(): void { }, + a: 1, + bad() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:24:5: Add a return type to the method + e: V, + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:20:12: Add a type annotation to the variable oWithMethods. +!!! related TS9035 isolatedDeclarationErrorsObjects.ts:25:8: Add a type assertion to this expression to make type type explicit. + } + export let oWithMethodsNested = { + foo: { + method() { }, + ~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:27:12: Add a type annotation to the variable oWithMethodsNested. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:29:9: Add a return type to the method + a: 1, + okMethod(): void { }, + bad() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:27:12: Add a type annotation to the variable oWithMethodsNested. +!!! related TS9034 isolatedDeclarationErrorsObjects.ts:32:9: Add a return type to the method + } + } + + + + export let oWithAccessor = { + get singleGetterBad() { return 0 }, + ~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 isolatedDeclarationErrorsObjects.ts:39:9: Add a return type to the get accessor declaration. + set singleSetterBad(value) { }, + ~~~~~~~~~~~~~~~ +!!! error TS7032: Property 'singleSetterBad' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsObjects.ts:40:9: Add a type to parameter of the set accessor declaration. + + get getSetBad() { return 0 }, + ~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsObjects.ts:43:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 isolatedDeclarationErrorsObjects.ts:42:9: Add a return type to the get accessor declaration. + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, + } + + function prop(v: T): T { return v } + + const s: unique symbol = Symbol(); + const str: string = ""; + enum E { + V = 10, + } + export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + [prop(2)]: 2, + ~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + [s]: 1, + [E.V]: 1, + [str]: 0, + ~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties. + } + + const part = { a: 1 }; + + export const oWithSpread = { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + b: 1, + ...part, + ~~~~~~~ +!!! error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:73:14: Add a type annotation to the variable oWithSpread. + c: 1, + part, + ~~~~ +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:73:14: Add a type annotation to the variable oWithSpread. + } + + + export const oWithSpread = { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + b: 1, + nested: { + ...part, + ~~~~~~~ +!!! error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + }, + c: 1, + part, + ~~~~ +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + [str]: 0, + ~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:81:14: Add a type annotation to the variable oWithSpread. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsObjects.js b/tests/baselines/reference/isolatedDeclarationErrorsObjects.js new file mode 100644 index 0000000000000..875acd986fea8 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.js @@ -0,0 +1,170 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +//// [isolatedDeclarationErrorsObjects.ts] +export let o = { + a: 1, + b: "" +} + +export let oBad = { + a: Math.random(), +} +export const V = 1; +export let oBad2 = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } +} + +export let oWithMethods = { + method() { }, + okMethod(): void { }, + a: 1, + bad() { }, + e: V, +} +export let oWithMethodsNested = { + foo: { + method() { }, + a: 1, + okMethod(): void { }, + bad() { } + } +} + + + +export let oWithAccessor = { + get singleGetterBad() { return 0 }, + set singleSetterBad(value) { }, + + get getSetBad() { return 0 }, + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, +} + +function prop(v: T): T { return v } + +const s: unique symbol = Symbol(); +const str: string = ""; +enum E { + V = 10, +} +export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, +} + +const part = { a: 1 }; + +export const oWithSpread = { + b: 1, + ...part, + c: 1, + part, +} + + +export const oWithSpread = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, +} + + +//// [isolatedDeclarationErrorsObjects.js] +export let o = { + a: 1, + b: "" +}; +export let oBad = { + a: Math.random(), +}; +export const V = 1; +export let oBad2 = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } +}; +export let oWithMethods = { + method() { }, + okMethod() { }, + a: 1, + bad() { }, + e: V, +}; +export let oWithMethodsNested = { + foo: { + method() { }, + a: 1, + okMethod() { }, + bad() { } + } +}; +export let oWithAccessor = { + get singleGetterBad() { return 0; }, + set singleSetterBad(value) { }, + get getSetBad() { return 0; }, + set getSetBad(value) { }, + get getSetOk() { return 0; }, + set getSetOk(value) { }, + get getSetOk2() { return 0; }, + set getSetOk2(value) { }, + get getSetOk3() { return 0; }, + set getSetOk3(value) { }, +}; +function prop(v) { return v; } +const s = Symbol(); +const str = ""; +var E; +(function (E) { + E[E["V"] = 10] = "V"; +})(E || (E = {})); +export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, +}; +const part = { a: 1 }; +export const oWithSpread = { + b: 1, + ...part, + c: 1, + part, +}; +export const oWithSpread = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, +}; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols b/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols new file mode 100644 index 0000000000000..b115c16fb45dc --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols @@ -0,0 +1,225 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +=== isolatedDeclarationErrorsObjects.ts === +export let o = { +>o : Symbol(o, Decl(isolatedDeclarationErrorsObjects.ts, 0, 10)) + + a: 1, +>a : Symbol(a, Decl(isolatedDeclarationErrorsObjects.ts, 0, 16)) + + b: "" +>b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 1, 9)) +} + +export let oBad = { +>oBad : Symbol(oBad, Decl(isolatedDeclarationErrorsObjects.ts, 5, 10)) + + a: Math.random(), +>a : Symbol(a, Decl(isolatedDeclarationErrorsObjects.ts, 5, 19)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +} +export const V = 1; +>V : Symbol(V, Decl(isolatedDeclarationErrorsObjects.ts, 8, 12)) + +export let oBad2 = { +>oBad2 : Symbol(oBad2, Decl(isolatedDeclarationErrorsObjects.ts, 9, 10)) + + a: { +>a : Symbol(a, Decl(isolatedDeclarationErrorsObjects.ts, 9, 20)) + + b: Math.random(), +>b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 10, 8)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + }, + c: { +>c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 12, 6)) + + d: 1, +>d : Symbol(d, Decl(isolatedDeclarationErrorsObjects.ts, 13, 8)) + + e: V, +>e : Symbol(e, Decl(isolatedDeclarationErrorsObjects.ts, 14, 13)) +>V : Symbol(V, Decl(isolatedDeclarationErrorsObjects.ts, 8, 12)) + } +} + +export let oWithMethods = { +>oWithMethods : Symbol(oWithMethods, Decl(isolatedDeclarationErrorsObjects.ts, 19, 10)) + + method() { }, +>method : Symbol(method, Decl(isolatedDeclarationErrorsObjects.ts, 19, 27)) + + okMethod(): void { }, +>okMethod : Symbol(okMethod, Decl(isolatedDeclarationErrorsObjects.ts, 20, 17)) + + a: 1, +>a : Symbol(a, Decl(isolatedDeclarationErrorsObjects.ts, 21, 25)) + + bad() { }, +>bad : Symbol(bad, Decl(isolatedDeclarationErrorsObjects.ts, 22, 9)) + + e: V, +>e : Symbol(e, Decl(isolatedDeclarationErrorsObjects.ts, 23, 14)) +>V : Symbol(V, Decl(isolatedDeclarationErrorsObjects.ts, 8, 12)) +} +export let oWithMethodsNested = { +>oWithMethodsNested : Symbol(oWithMethodsNested, Decl(isolatedDeclarationErrorsObjects.ts, 26, 10)) + + foo: { +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsObjects.ts, 26, 33)) + + method() { }, +>method : Symbol(method, Decl(isolatedDeclarationErrorsObjects.ts, 27, 10)) + + a: 1, +>a : Symbol(a, Decl(isolatedDeclarationErrorsObjects.ts, 28, 21)) + + okMethod(): void { }, +>okMethod : Symbol(okMethod, Decl(isolatedDeclarationErrorsObjects.ts, 29, 13)) + + bad() { } +>bad : Symbol(bad, Decl(isolatedDeclarationErrorsObjects.ts, 30, 29)) + } +} + + + +export let oWithAccessor = { +>oWithAccessor : Symbol(oWithAccessor, Decl(isolatedDeclarationErrorsObjects.ts, 37, 10)) + + get singleGetterBad() { return 0 }, +>singleGetterBad : Symbol(singleGetterBad, Decl(isolatedDeclarationErrorsObjects.ts, 37, 28)) + + set singleSetterBad(value) { }, +>singleSetterBad : Symbol(singleSetterBad, Decl(isolatedDeclarationErrorsObjects.ts, 38, 39)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsObjects.ts, 39, 24)) + + get getSetBad() { return 0 }, +>getSetBad : Symbol(getSetBad, Decl(isolatedDeclarationErrorsObjects.ts, 39, 35), Decl(isolatedDeclarationErrorsObjects.ts, 41, 33)) + + set getSetBad(value) { }, +>getSetBad : Symbol(getSetBad, Decl(isolatedDeclarationErrorsObjects.ts, 39, 35), Decl(isolatedDeclarationErrorsObjects.ts, 41, 33)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsObjects.ts, 42, 18)) + + get getSetOk(): number { return 0 }, +>getSetOk : Symbol(getSetOk, Decl(isolatedDeclarationErrorsObjects.ts, 42, 29), Decl(isolatedDeclarationErrorsObjects.ts, 44, 40)) + + set getSetOk(value) { }, +>getSetOk : Symbol(getSetOk, Decl(isolatedDeclarationErrorsObjects.ts, 42, 29), Decl(isolatedDeclarationErrorsObjects.ts, 44, 40)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsObjects.ts, 45, 17)) + + get getSetOk2() { return 0 }, +>getSetOk2 : Symbol(getSetOk2, Decl(isolatedDeclarationErrorsObjects.ts, 45, 28), Decl(isolatedDeclarationErrorsObjects.ts, 47, 33)) + + set getSetOk2(value: number) { }, +>getSetOk2 : Symbol(getSetOk2, Decl(isolatedDeclarationErrorsObjects.ts, 45, 28), Decl(isolatedDeclarationErrorsObjects.ts, 47, 33)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsObjects.ts, 48, 18)) + + get getSetOk3(): number { return 0 }, +>getSetOk3 : Symbol(getSetOk3, Decl(isolatedDeclarationErrorsObjects.ts, 48, 37), Decl(isolatedDeclarationErrorsObjects.ts, 50, 41)) + + set getSetOk3(value: number) { }, +>getSetOk3 : Symbol(getSetOk3, Decl(isolatedDeclarationErrorsObjects.ts, 48, 37), Decl(isolatedDeclarationErrorsObjects.ts, 50, 41)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsObjects.ts, 51, 18)) +} + +function prop(v: T): T { return v } +>prop : Symbol(prop, Decl(isolatedDeclarationErrorsObjects.ts, 52, 1)) +>T : Symbol(T, Decl(isolatedDeclarationErrorsObjects.ts, 54, 14)) +>v : Symbol(v, Decl(isolatedDeclarationErrorsObjects.ts, 54, 17)) +>T : Symbol(T, Decl(isolatedDeclarationErrorsObjects.ts, 54, 14)) +>T : Symbol(T, Decl(isolatedDeclarationErrorsObjects.ts, 54, 14)) +>v : Symbol(v, Decl(isolatedDeclarationErrorsObjects.ts, 54, 17)) + +const s: unique symbol = Symbol(); +>s : Symbol(s, Decl(isolatedDeclarationErrorsObjects.ts, 56, 5)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) + +const str: string = ""; +>str : Symbol(str, Decl(isolatedDeclarationErrorsObjects.ts, 57, 5)) + +enum E { +>E : Symbol(E, Decl(isolatedDeclarationErrorsObjects.ts, 57, 23)) + + V = 10, +>V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 58, 8)) +} +export const oWithComputedProperties = { +>oWithComputedProperties : Symbol(oWithComputedProperties, Decl(isolatedDeclarationErrorsObjects.ts, 61, 12)) + + [1]: 1, +>[1] : Symbol([1], Decl(isolatedDeclarationErrorsObjects.ts, 61, 40)) +>1 : Symbol([1], Decl(isolatedDeclarationErrorsObjects.ts, 61, 40)) + + [1 + 3]: 1, +>[1 + 3] : Symbol([1 + 3], Decl(isolatedDeclarationErrorsObjects.ts, 62, 11)) + + [prop(2)]: 2, +>[prop(2)] : Symbol([prop(2)], Decl(isolatedDeclarationErrorsObjects.ts, 63, 15)) +>prop : Symbol(prop, Decl(isolatedDeclarationErrorsObjects.ts, 52, 1)) + + [s]: 1, +>[s] : Symbol([s], Decl(isolatedDeclarationErrorsObjects.ts, 64, 17)) +>s : Symbol(s, Decl(isolatedDeclarationErrorsObjects.ts, 56, 5)) + + [E.V]: 1, +>[E.V] : Symbol([E.V], Decl(isolatedDeclarationErrorsObjects.ts, 65, 11)) +>E.V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 58, 8)) +>E : Symbol(E, Decl(isolatedDeclarationErrorsObjects.ts, 57, 23)) +>V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 58, 8)) + + [str]: 0, +>[str] : Symbol([str], Decl(isolatedDeclarationErrorsObjects.ts, 66, 13)) +>str : Symbol(str, Decl(isolatedDeclarationErrorsObjects.ts, 57, 5)) +} + +const part = { a: 1 }; +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 70, 5)) +>a : Symbol(a, Decl(isolatedDeclarationErrorsObjects.ts, 70, 14)) + +export const oWithSpread = { +>oWithSpread : Symbol(oWithSpread, Decl(isolatedDeclarationErrorsObjects.ts, 72, 12)) + + b: 1, +>b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 72, 28)) + + ...part, +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 70, 5)) + + c: 1, +>c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 74, 12)) + + part, +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 75, 9)) +} + + +export const oWithSpread = { +>oWithSpread : Symbol(oWithSpread, Decl(isolatedDeclarationErrorsObjects.ts, 80, 12)) + + b: 1, +>b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 80, 28)) + + nested: { +>nested : Symbol(nested, Decl(isolatedDeclarationErrorsObjects.ts, 81, 9)) + + ...part, +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 70, 5)) + + }, + c: 1, +>c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 84, 6)) + + part, +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 85, 9)) + + [str]: 0, +>[str] : Symbol([str], Decl(isolatedDeclarationErrorsObjects.ts, 86, 9)) +>str : Symbol(str, Decl(isolatedDeclarationErrorsObjects.ts, 57, 5)) +} + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsObjects.types b/tests/baselines/reference/isolatedDeclarationErrorsObjects.types new file mode 100644 index 0000000000000..f0a9f2a79299b --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.types @@ -0,0 +1,269 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +=== isolatedDeclarationErrorsObjects.ts === +export let o = { +>o : { a: number; b: string; } +>{ a: 1, b: ""} : { a: number; b: string; } + + a: 1, +>a : number +>1 : 1 + + b: "" +>b : string +>"" : "" +} + +export let oBad = { +>oBad : { a: number; } +>{ a: Math.random(),} : { a: number; } + + a: Math.random(), +>a : number +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +} +export const V = 1; +>V : 1 +>1 : 1 + +export let oBad2 = { +>oBad2 : { a: { b: number; }; c: { d: number; e: number; }; } +>{ a: { b: Math.random(), }, c: { d: 1, e: V, }} : { a: { b: number; }; c: { d: number; e: number; }; } + + a: { +>a : { b: number; } +>{ b: Math.random(), } : { b: number; } + + b: Math.random(), +>b : number +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + + }, + c: { +>c : { d: number; e: number; } +>{ d: 1, e: V, } : { d: number; e: number; } + + d: 1, +>d : number +>1 : 1 + + e: V, +>e : number +>V : 1 + } +} + +export let oWithMethods = { +>oWithMethods : { method(): void; okMethod(): void; a: number; bad(): void; e: number; } +>{ method() { }, okMethod(): void { }, a: 1, bad() { }, e: V,} : { method(): void; okMethod(): void; a: number; bad(): void; e: number; } + + method() { }, +>method : () => void + + okMethod(): void { }, +>okMethod : () => void + + a: 1, +>a : number +>1 : 1 + + bad() { }, +>bad : () => void + + e: V, +>e : number +>V : 1 +} +export let oWithMethodsNested = { +>oWithMethodsNested : { foo: { method(): void; a: number; okMethod(): void; bad(): void; }; } +>{ foo: { method() { }, a: 1, okMethod(): void { }, bad() { } }} : { foo: { method(): void; a: number; okMethod(): void; bad(): void; }; } + + foo: { +>foo : { method(): void; a: number; okMethod(): void; bad(): void; } +>{ method() { }, a: 1, okMethod(): void { }, bad() { } } : { method(): void; a: number; okMethod(): void; bad(): void; } + + method() { }, +>method : () => void + + a: 1, +>a : number +>1 : 1 + + okMethod(): void { }, +>okMethod : () => void + + bad() { } +>bad : () => void + } +} + + + +export let oWithAccessor = { +>oWithAccessor : { readonly singleGetterBad: number; singleSetterBad: any; getSetBad: number; getSetOk: number; getSetOk2: number; getSetOk3: number; } +>{ get singleGetterBad() { return 0 }, set singleSetterBad(value) { }, get getSetBad() { return 0 }, set getSetBad(value) { }, get getSetOk(): number { return 0 }, set getSetOk(value) { }, get getSetOk2() { return 0 }, set getSetOk2(value: number) { }, get getSetOk3(): number { return 0 }, set getSetOk3(value: number) { },} : { readonly singleGetterBad: number; singleSetterBad: any; getSetBad: number; getSetOk: number; getSetOk2: number; getSetOk3: number; } + + get singleGetterBad() { return 0 }, +>singleGetterBad : number +>0 : 0 + + set singleSetterBad(value) { }, +>singleSetterBad : any +>value : any + + get getSetBad() { return 0 }, +>getSetBad : number +>0 : 0 + + set getSetBad(value) { }, +>getSetBad : number +>value : number + + get getSetOk(): number { return 0 }, +>getSetOk : number +>0 : 0 + + set getSetOk(value) { }, +>getSetOk : number +>value : number + + get getSetOk2() { return 0 }, +>getSetOk2 : number +>0 : 0 + + set getSetOk2(value: number) { }, +>getSetOk2 : number +>value : number + + get getSetOk3(): number { return 0 }, +>getSetOk3 : number +>0 : 0 + + set getSetOk3(value: number) { }, +>getSetOk3 : number +>value : number +} + +function prop(v: T): T { return v } +>prop : (v: T) => T +>v : T +>v : T + +const s: unique symbol = Symbol(); +>s : unique symbol +>Symbol() : unique symbol +>Symbol : SymbolConstructor + +const str: string = ""; +>str : string +>"" : "" + +enum E { +>E : E + + V = 10, +>V : E.V +>10 : 10 +} +export const oWithComputedProperties = { +>oWithComputedProperties : { [x: string]: number; [x: number]: number; 1: number; 2: number; [s]: number; 10: number; } +>{ [1]: 1, [1 + 3]: 1, [prop(2)]: 2, [s]: 1, [E.V]: 1, [str]: 0,} : { [x: string]: number; [x: number]: number; 1: number; 2: number; [s]: number; 10: number; } + + [1]: 1, +>[1] : number +>1 : 1 +>1 : 1 + + [1 + 3]: 1, +>[1 + 3] : number +>1 + 3 : number +>1 : 1 +>3 : 3 +>1 : 1 + + [prop(2)]: 2, +>[prop(2)] : number +>prop(2) : 2 +>prop : (v: T) => T +>2 : 2 +>2 : 2 + + [s]: 1, +>[s] : number +>s : unique symbol +>1 : 1 + + [E.V]: 1, +>[E.V] : number +>E.V : E +>E : typeof E +>V : E +>1 : 1 + + [str]: 0, +>[str] : number +>str : string +>0 : 0 +} + +const part = { a: 1 }; +>part : { a: number; } +>{ a: 1 } : { a: number; } +>a : number +>1 : 1 + +export const oWithSpread = { +>oWithSpread : { c: number; part: { a: number; }; a: number; b: number; } +>{ b: 1, ...part, c: 1, part,} : { c: number; part: { a: number; }; a: number; b: number; } + + b: 1, +>b : number +>1 : 1 + + ...part, +>part : { a: number; } + + c: 1, +>c : number +>1 : 1 + + part, +>part : { a: number; } +} + + +export const oWithSpread = { +>oWithSpread : { [x: string]: number | { a: number; }; b: number; nested: { a: number; }; c: number; part: { a: number; }; } +>{ b: 1, nested: { ...part, }, c: 1, part, [str]: 0,} : { [x: string]: number | { a: number; }; b: number; nested: { a: number; }; c: number; part: { a: number; }; } + + b: 1, +>b : number +>1 : 1 + + nested: { +>nested : { a: number; } +>{ ...part, } : { a: number; } + + ...part, +>part : { a: number; } + + }, + c: 1, +>c : number +>1 : 1 + + part, +>part : { a: number; } + + [str]: 0, +>[str] : number +>str : string +>0 : 0 +} + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt new file mode 100644 index 0000000000000..91d5732f5600c --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt @@ -0,0 +1,631 @@ +isolatedDeclarationErrorsReturnTypes.ts(2,51): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(3,37): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(5,47): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(6,33): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(8,47): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(9,33): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(13,45): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(16,41): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(19,41): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(34,29): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(35,15): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(36,48): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(37,34): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(39,42): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(40,28): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(41,61): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(42,47): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(67,29): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(68,15): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(70,42): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(71,28): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(73,61): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(74,47): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(109,56): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(109,65): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(110,42): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(110,48): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(112,52): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(112,61): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(113,38): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(113,44): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(115,52): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(115,61): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(116,38): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(116,44): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(119,83): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(120,66): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(122,79): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(123,62): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(125,79): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(126,62): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(138,64): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(138,73): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(139,50): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(139,56): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(141,60): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(141,69): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(142,46): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(142,52): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(144,60): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(144,69): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(145,46): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(145,52): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(151,29): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(151,38): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(152,15): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(152,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(153,48): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(153,57): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(154,34): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(154,40): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(156,42): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(156,51): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(157,28): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(157,34): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(158,61): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(158,70): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(159,47): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(159,53): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(162,53): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(163,36): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(164,72): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(165,55): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(167,66): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(168,49): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(169,85): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(170,68): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(173,40): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(174,26): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(175,59): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(176,45): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(178,53): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(179,39): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(180,72): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + + +==== isolatedDeclarationErrorsReturnTypes.ts (85 errors) ==== + // Function Variables + export const fnExpressionConstVariable = function foo() { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:2:14: Add a type annotation to the variable fnExpressionConstVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:2:51: Add a return type to the function expression. + export const fnArrowConstVariable = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:3:14: Add a type annotation to the variable fnArrowConstVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:3:37: Add a return type to the function expression. + + export let fnExpressionLetVariable = function foo() { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:5:12: Add a type annotation to the variable fnExpressionLetVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:5:47: Add a return type to the function expression. + export let fnArrowLetVariable = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:6:12: Add a type annotation to the variable fnArrowLetVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:6:33: Add a return type to the function expression. + + export var fnExpressionVarVariable = function foo() { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:8:12: Add a type annotation to the variable fnExpressionVarVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:8:47: Add a return type to the function expression. + export var fnArrowVarVariable = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:9:12: Add a type annotation to the variable fnArrowVarVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:9:33: Add a return type to the function expression. + + // No Errors + export const fnExpressionConstVariableOk = function foo(): number { return 0;} + export const fnArrowConstVariableOk = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:13:40: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:13:45: Add a return type to the function expression. + + export let fnExpressionLetVariableOk = function foo(): number { return 0;} + export let fnArrowLetVariableOk = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:16:36: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:16:41: Add a return type to the function expression. + + export var fnExpressionVarVariableOk = function foo(): number { return 0;} + export var fnArrowVarVariableOk = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:19:36: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:19:41: Add a return type to the function expression. + + // Not exported + const fnExpressionConstVariableInternal = function foo() { return 0;} + const fnArrowConstVariableInternal = () => "S"; + + let fnExpressionLetVariableInternal = function foo() { return 0;} + let fnArrowLetVariableInternal = () => "S"; + + var fnExpressionVarVariableInternal = function foo() { return 0;} + var fnArrowVarVariableInternal = () => "S"; + + // Function Fields + export class ExportedClass { + // Should Error + fnExpression = function foo() { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:34:5: Add a type annotation to the property fnExpression. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:34:29: Add a return type to the function expression. + fnArrow = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:35:5: Add a type annotation to the property fnArrow. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:35:15: Add a return type to the function expression. + protected fnExpressionProtected = function foo() { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:36:15: Add a type annotation to the property fnExpressionProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:36:48: Add a return type to the function expression. + protected fnArrowProtected = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:37:15: Add a type annotation to the property fnArrowProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:37:34: Add a return type to the function expression. + + static fnStaticExpression = function foo() { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:39:12: Add a type annotation to the property fnStaticExpression. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:39:42: Add a return type to the function expression. + static fnStaticArrow = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:40:12: Add a type annotation to the property fnStaticArrow. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:40:28: Add a return type to the function expression. + protected static fnStaticExpressionProtected = function foo() { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:41:22: Add a type annotation to the property fnStaticExpressionProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:41:61: Add a return type to the function expression. + protected static fnStaticArrowProtected = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:42:22: Add a type annotation to the property fnStaticArrowProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:42:47: Add a return type to the function expression. + + // Have annotation, so ok + fnExpressionOk = function foo(): number { return 0; } + fnArrowOK = (): string => "S"; + protected fnExpressionProtectedOk = function foo(): number { return 0; } + protected fnArrowProtectedOK = (): string => "S"; + + static fnStaticExpressionOk = function foo(): number { return 0; } + static fnStaticArrowOk = (): string => "S"; + protected static fnStaticExpressionProtectedOk = function foo(): number { return 0; } + protected static fnStaticArrowProtectedOk = (): string => "S"; + + + // No Error not in declarations + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; + } + + // Should error + class IndirectlyExportedClass { + fnExpression = function foo() { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:67:5: Add a type annotation to the property fnExpression. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:67:29: Add a return type to the function expression. + fnArrow = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:68:5: Add a type annotation to the property fnArrow. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:68:15: Add a return type to the function expression. + + static fnStaticExpression = function foo() { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:70:12: Add a type annotation to the property fnStaticExpression. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:70:42: Add a return type to the function expression. + static fnStaticArrow = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:71:12: Add a type annotation to the property fnStaticArrow. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:71:28: Add a return type to the function expression. + + protected static fnStaticExpressionProtected = function foo() { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:73:22: Add a type annotation to the property fnStaticExpressionProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:73:61: Add a return type to the function expression. + protected static fnStaticArrowProtected = () => "S"; + ~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:74:22: Add a type annotation to the property fnStaticArrowProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:74:47: Add a return type to the function expression. + + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; + } + export const instance: IndirectlyExportedClass = new IndirectlyExportedClass(); + + // No Errors + class InternalClass { + fnExpression = function foo() { return 0; } + fnArrow = () => "S"; + + static fnStaticExpression = function foo() { return 0; } + static fnStaticArrow = () => "S"; + + protected static fnStaticExpressionProtected = function foo() { return 0; } + protected static fnStaticArrowProtected = () => "S"; + + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; + } + const internalInstance: InternalClass = new InternalClass(); + + + // Function parameters + + // In Function Variables - No annotations + export const fnParamExpressionConstVariable = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:109:14: Add a type annotation to the variable fnParamExpressionConstVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:109:56: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:109:60: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:109:65: Add a return type to the function expression. + export const fnParamArrowConstVariable = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:110:14: Add a type annotation to the variable fnParamArrowConstVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:110:42: Add a return type to the function expression. + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:110:43: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:110:48: Add a return type to the function expression. + + export let fnParamExpressionLetVariable = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:112:12: Add a type annotation to the variable fnParamExpressionLetVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:112:52: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:112:56: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:112:61: Add a return type to the function expression. + export let fnParamArrowLetVariable = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:113:12: Add a type annotation to the variable fnParamArrowLetVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:113:38: Add a return type to the function expression. + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:113:39: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:113:44: Add a return type to the function expression. + + export var fnParamExpressionVarVariable = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:115:12: Add a type annotation to the variable fnParamExpressionVarVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:115:52: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:115:56: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:115:61: Add a return type to the function expression. + export var fnParamArrowVarVariable = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:116:12: Add a type annotation to the variable fnParamArrowVarVariable. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:116:38: Add a return type to the function expression. + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:116:39: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:116:44: Add a return type to the function expression. + + // In Function Variables - No annotations on parameter + export const fnParamExpressionConstVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:119:78: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:119:83: Add a return type to the function expression. + export const fnParamArrowConstVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:120:61: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:120:66: Add a return type to the function expression. + + export let fnParamExpressionLetVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:122:74: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:122:79: Add a return type to the function expression. + export let fnParamArrowLetVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:123:57: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:123:62: Add a return type to the function expression. + + export var fnParamExpressionVarVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:125:74: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:125:79: Add a return type to the function expression. + export var fnParamArrowVarVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:126:57: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:126:62: Add a return type to the function expression. + + // No Errors + export const fnParamExpressionConstVariableOk = function foo(cb = function(): void{ }): number { return 0;} + export const fnParamArrowConstVariableOk = (cb = function(): void{ }): string => "S"; + + export let fnParamExpressionLetVariableOk = function foo(cb = function(): void{ }): number { return 0;} + export let fnParamArrowLetVariableOk = (cb = function(): void{ }): string => "S"; + + export var fnParamExpressionVarVariableOk = function foo(cb = function(): void{ }): number { return 0;} + export var fnParamArrowVarVariableOk = (cb = function(): void{ }): string => "S"; + + export const fnParamExpressionConstVariableInternal = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:138:14: Add a type annotation to the variable fnParamExpressionConstVariableInternal. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:138:64: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:138:68: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:138:73: Add a return type to the function expression. + export const fnParamArrowConstVariableInternal = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:139:14: Add a type annotation to the variable fnParamArrowConstVariableInternal. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:139:50: Add a return type to the function expression. + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:139:51: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:139:56: Add a return type to the function expression. + + export let fnParamExpressionLetVariableInternal = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:141:12: Add a type annotation to the variable fnParamExpressionLetVariableInternal. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:141:60: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:141:64: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:141:69: Add a return type to the function expression. + export let fnParamArrowLetVariableInternal = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:142:12: Add a type annotation to the variable fnParamArrowLetVariableInternal. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:142:46: Add a return type to the function expression. + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:142:47: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:142:52: Add a return type to the function expression. + + export var fnParamExpressionVarVariableInternal = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:144:12: Add a type annotation to the variable fnParamExpressionVarVariableInternal. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:144:60: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:144:64: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:144:69: Add a return type to the function expression. + export var fnParamArrowVarVariableInternal = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationErrorsReturnTypes.ts:145:12: Add a type annotation to the variable fnParamArrowVarVariableInternal. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:145:46: Add a return type to the function expression. + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:145:47: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:145:52: Add a return type to the function expression. + + + // In Function Fields + export class FnParamsExportedClass { + // Should Error + fnExpression = function foo(cb = function(){ }) { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:151:5: Add a type annotation to the property fnExpression. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:151:29: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:151:33: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:151:38: Add a return type to the function expression. + fnArrow = (cb = function(){ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:152:5: Add a type annotation to the property fnArrow. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:152:15: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:152:16: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:152:21: Add a return type to the function expression. + protected fnExpressionProtected = function foo(cb = function(){ }) { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:153:15: Add a type annotation to the property fnExpressionProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:153:48: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:153:52: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:153:57: Add a return type to the function expression. + protected fnArrowProtected = (cb = function(){ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:154:15: Add a type annotation to the property fnArrowProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:154:34: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:154:35: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:154:40: Add a return type to the function expression. + + static fnStaticExpression = function foo(cb = function(){ }) { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:156:12: Add a type annotation to the property fnStaticExpression. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:156:42: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:156:46: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:156:51: Add a return type to the function expression. + static fnStaticArrow = (cb = function(){ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:157:12: Add a type annotation to the property fnStaticArrow. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:157:28: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:157:29: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:157:34: Add a return type to the function expression. + protected static fnStaticExpressionProtected = function foo(cb = function(){ }) { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:158:22: Add a type annotation to the property fnStaticExpressionProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:158:61: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:158:65: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:158:70: Add a return type to the function expression. + protected static fnStaticArrowProtected = (cb = function(){ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:159:22: Add a type annotation to the property fnStaticArrowProtected. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:159:47: Add a return type to the function expression. + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:159:48: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:159:53: Add a return type to the function expression. + + // Have annotation on owner + fnExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:162:48: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:162:53: Add a return type to the function expression. + fnArrowMethodHasReturn = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:163:31: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:163:36: Add a return type to the function expression. + protected fnExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:164:67: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:164:72: Add a return type to the function expression. + protected fnArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:165:50: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:165:55: Add a return type to the function expression. + + static fnStaticExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:167:61: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:167:66: Add a return type to the function expression. + static fnStaticArrowMethodHasReturn = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:168:44: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:168:49: Add a return type to the function expression. + protected static fnStaticExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:169:80: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:169:85: Add a return type to the function expression. + protected static fnStaticArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsReturnTypes.ts:170:63: Add a type annotation to the parameter cb. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:170:68: Add a return type to the function expression. + + // Have annotation only on parameter + fnExpressionOnlyOnParam = function foo(cb = function(): void { }) { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:173:5: Add a type annotation to the property fnExpressionOnlyOnParam. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:173:40: Add a return type to the function expression. + fnArrowOnlyOnParam = (cb = function(): void { }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:174:5: Add a type annotation to the property fnArrowOnlyOnParam. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:174:26: Add a return type to the function expression. + protected fnExpressionProtectedOnlyOnParam = function foo(cb = function(): void { }) { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:175:15: Add a type annotation to the property fnExpressionProtectedOnlyOnParam. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:175:59: Add a return type to the function expression. + protected fnArrowProtectedOnlyOnParam = (cb = function(): void { }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:176:15: Add a type annotation to the property fnArrowProtectedOnlyOnParam. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:176:45: Add a return type to the function expression. + + static fnStaticExpressionOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:178:12: Add a type annotation to the property fnStaticExpressionOnlyOnParam. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:178:53: Add a return type to the function expression. + static fnStaticArrowOnlyOnParam = (cb = function(): void{ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:179:12: Add a type annotation to the property fnStaticArrowOnlyOnParam. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:179:39: Add a return type to the function expression. + protected static fnStaticExpressionProtectedOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:180:22: Add a type annotation to the property fnStaticExpressionProtectedOnlyOnParam. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:180:72: Add a return type to the function expression. + protected static fnStaticArrowProtectedOnlyOnParam = (cb = function(): void{ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9029 isolatedDeclarationErrorsReturnTypes.ts:181:22: Add a type annotation to the property fnStaticArrowProtectedOnlyOnParam. +!!! related TS9030 isolatedDeclarationErrorsReturnTypes.ts:181:58: Add a return type to the function expression. + + // Have annotation, so ok + fnExpressionOk = function foo(cb = function(): void { }): number { return 0; } + fnArrowOK = (cb = function(): void { }): string => "S"; + protected fnExpressionProtectedOk = function foo(cb = function(): void { }): number { return 0; } + protected fnArrowProtectedOK = (cb = function(): void { }): string => "S"; + + static fnStaticExpressionOk = function foo(cb = function(): void{ }): number { return 0; } + static fnStaticArrowOk = (cb = function(): void{ }): string => "S"; + protected static fnStaticExpressionProtectedOk = function foo(cb = function(): void{ }): number { return 0; } + protected static fnStaticArrowProtectedOk = (cb = function(): void{ }): string => "S"; + + + // No Error, not in declarations + private fnExpressionPrivate = function foo(cb = function(){ }) { return 0; } + private fnArrowPrivate = (cb = function(){ }) => "S"; + #fnArrow = (cb = function(){ }) => "S"; + #fnExpression = function foo(cb = function(){ }) { return 0;} + private static fnStaticExpressionPrivate = function foo(cb = function(){ }) { return 0; } + private static fnStaticArrowPrivate = (cb = function(){ }) => "S"; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.js b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.js new file mode 100644 index 0000000000000..8dd9ad0d8a0c6 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.js @@ -0,0 +1,363 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsReturnTypes.ts] //// + +//// [isolatedDeclarationErrorsReturnTypes.ts] +// Function Variables +export const fnExpressionConstVariable = function foo() { return 0;} +export const fnArrowConstVariable = () => "S"; + +export let fnExpressionLetVariable = function foo() { return 0;} +export let fnArrowLetVariable = () => "S"; + +export var fnExpressionVarVariable = function foo() { return 0;} +export var fnArrowVarVariable = () => "S"; + +// No Errors +export const fnExpressionConstVariableOk = function foo(): number { return 0;} +export const fnArrowConstVariableOk = (cb = function(){ }): string => "S"; + +export let fnExpressionLetVariableOk = function foo(): number { return 0;} +export let fnArrowLetVariableOk = (cb = function(){ }): string => "S"; + +export var fnExpressionVarVariableOk = function foo(): number { return 0;} +export var fnArrowVarVariableOk = (cb = function(){ }): string => "S"; + +// Not exported +const fnExpressionConstVariableInternal = function foo() { return 0;} +const fnArrowConstVariableInternal = () => "S"; + +let fnExpressionLetVariableInternal = function foo() { return 0;} +let fnArrowLetVariableInternal = () => "S"; + +var fnExpressionVarVariableInternal = function foo() { return 0;} +var fnArrowVarVariableInternal = () => "S"; + +// Function Fields +export class ExportedClass { + // Should Error + fnExpression = function foo() { return 0; } + fnArrow = () => "S"; + protected fnExpressionProtected = function foo() { return 0; } + protected fnArrowProtected = () => "S"; + + static fnStaticExpression = function foo() { return 0; } + static fnStaticArrow = () => "S"; + protected static fnStaticExpressionProtected = function foo() { return 0; } + protected static fnStaticArrowProtected = () => "S"; + + // Have annotation, so ok + fnExpressionOk = function foo(): number { return 0; } + fnArrowOK = (): string => "S"; + protected fnExpressionProtectedOk = function foo(): number { return 0; } + protected fnArrowProtectedOK = (): string => "S"; + + static fnStaticExpressionOk = function foo(): number { return 0; } + static fnStaticArrowOk = (): string => "S"; + protected static fnStaticExpressionProtectedOk = function foo(): number { return 0; } + protected static fnStaticArrowProtectedOk = (): string => "S"; + + + // No Error not in declarations + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; +} + +// Should error +class IndirectlyExportedClass { + fnExpression = function foo() { return 0; } + fnArrow = () => "S"; + + static fnStaticExpression = function foo() { return 0; } + static fnStaticArrow = () => "S"; + + protected static fnStaticExpressionProtected = function foo() { return 0; } + protected static fnStaticArrowProtected = () => "S"; + + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; +} +export const instance: IndirectlyExportedClass = new IndirectlyExportedClass(); + +// No Errors +class InternalClass { + fnExpression = function foo() { return 0; } + fnArrow = () => "S"; + + static fnStaticExpression = function foo() { return 0; } + static fnStaticArrow = () => "S"; + + protected static fnStaticExpressionProtected = function foo() { return 0; } + protected static fnStaticArrowProtected = () => "S"; + + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; +} +const internalInstance: InternalClass = new InternalClass(); + + +// Function parameters + +// In Function Variables - No annotations +export const fnParamExpressionConstVariable = function foo(cb = function(){ }) { return 0;} +export const fnParamArrowConstVariable = (cb = () => 1) => "S"; + +export let fnParamExpressionLetVariable = function foo(cb = function(){ }) { return 0;} +export let fnParamArrowLetVariable = (cb = () => 1) => "S"; + +export var fnParamExpressionVarVariable = function foo(cb = function(){ }) { return 0;} +export var fnParamArrowVarVariable = (cb = () => 1) => "S"; + +// In Function Variables - No annotations on parameter +export const fnParamExpressionConstVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +export const fnParamArrowConstVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + +export let fnParamExpressionLetVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +export let fnParamArrowLetVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + +export var fnParamExpressionVarVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +export var fnParamArrowVarVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + +// No Errors +export const fnParamExpressionConstVariableOk = function foo(cb = function(): void{ }): number { return 0;} +export const fnParamArrowConstVariableOk = (cb = function(): void{ }): string => "S"; + +export let fnParamExpressionLetVariableOk = function foo(cb = function(): void{ }): number { return 0;} +export let fnParamArrowLetVariableOk = (cb = function(): void{ }): string => "S"; + +export var fnParamExpressionVarVariableOk = function foo(cb = function(): void{ }): number { return 0;} +export var fnParamArrowVarVariableOk = (cb = function(): void{ }): string => "S"; + +export const fnParamExpressionConstVariableInternal = function foo(cb = function(){ }) { return 0;} +export const fnParamArrowConstVariableInternal = (cb = () => 1) => "S"; + +export let fnParamExpressionLetVariableInternal = function foo(cb = function(){ }) { return 0;} +export let fnParamArrowLetVariableInternal = (cb = () => 1) => "S"; + +export var fnParamExpressionVarVariableInternal = function foo(cb = function(){ }) { return 0;} +export var fnParamArrowVarVariableInternal = (cb = () => 1) => "S"; + + +// In Function Fields +export class FnParamsExportedClass { + // Should Error + fnExpression = function foo(cb = function(){ }) { return 0; } + fnArrow = (cb = function(){ }) => "S"; + protected fnExpressionProtected = function foo(cb = function(){ }) { return 0; } + protected fnArrowProtected = (cb = function(){ }) => "S"; + + static fnStaticExpression = function foo(cb = function(){ }) { return 0; } + static fnStaticArrow = (cb = function(){ }) => "S"; + protected static fnStaticExpressionProtected = function foo(cb = function(){ }) { return 0; } + protected static fnStaticArrowProtected = (cb = function(){ }) => "S"; + + // Have annotation on owner + fnExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + fnArrowMethodHasReturn = (cb = function(){ }): string => "S"; + protected fnExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + protected fnArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; + + static fnStaticExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + static fnStaticArrowMethodHasReturn = (cb = function(){ }): string => "S"; + protected static fnStaticExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + protected static fnStaticArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; + + // Have annotation only on parameter + fnExpressionOnlyOnParam = function foo(cb = function(): void { }) { return 0; } + fnArrowOnlyOnParam = (cb = function(): void { }) => "S"; + protected fnExpressionProtectedOnlyOnParam = function foo(cb = function(): void { }) { return 0; } + protected fnArrowProtectedOnlyOnParam = (cb = function(): void { }) => "S"; + + static fnStaticExpressionOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } + static fnStaticArrowOnlyOnParam = (cb = function(): void{ }) => "S"; + protected static fnStaticExpressionProtectedOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } + protected static fnStaticArrowProtectedOnlyOnParam = (cb = function(): void{ }) => "S"; + + // Have annotation, so ok + fnExpressionOk = function foo(cb = function(): void { }): number { return 0; } + fnArrowOK = (cb = function(): void { }): string => "S"; + protected fnExpressionProtectedOk = function foo(cb = function(): void { }): number { return 0; } + protected fnArrowProtectedOK = (cb = function(): void { }): string => "S"; + + static fnStaticExpressionOk = function foo(cb = function(): void{ }): number { return 0; } + static fnStaticArrowOk = (cb = function(): void{ }): string => "S"; + protected static fnStaticExpressionProtectedOk = function foo(cb = function(): void{ }): number { return 0; } + protected static fnStaticArrowProtectedOk = (cb = function(): void{ }): string => "S"; + + + // No Error, not in declarations + private fnExpressionPrivate = function foo(cb = function(){ }) { return 0; } + private fnArrowPrivate = (cb = function(){ }) => "S"; + #fnArrow = (cb = function(){ }) => "S"; + #fnExpression = function foo(cb = function(){ }) { return 0;} + private static fnStaticExpressionPrivate = function foo(cb = function(){ }) { return 0; } + private static fnStaticArrowPrivate = (cb = function(){ }) => "S"; +} + + +//// [isolatedDeclarationErrorsReturnTypes.js] +// Function Variables +export const fnExpressionConstVariable = function foo() { return 0; }; +export const fnArrowConstVariable = () => "S"; +export let fnExpressionLetVariable = function foo() { return 0; }; +export let fnArrowLetVariable = () => "S"; +export var fnExpressionVarVariable = function foo() { return 0; }; +export var fnArrowVarVariable = () => "S"; +// No Errors +export const fnExpressionConstVariableOk = function foo() { return 0; }; +export const fnArrowConstVariableOk = (cb = function () { }) => "S"; +export let fnExpressionLetVariableOk = function foo() { return 0; }; +export let fnArrowLetVariableOk = (cb = function () { }) => "S"; +export var fnExpressionVarVariableOk = function foo() { return 0; }; +export var fnArrowVarVariableOk = (cb = function () { }) => "S"; +// Not exported +const fnExpressionConstVariableInternal = function foo() { return 0; }; +const fnArrowConstVariableInternal = () => "S"; +let fnExpressionLetVariableInternal = function foo() { return 0; }; +let fnArrowLetVariableInternal = () => "S"; +var fnExpressionVarVariableInternal = function foo() { return 0; }; +var fnArrowVarVariableInternal = () => "S"; +// Function Fields +export class ExportedClass { + // Should Error + fnExpression = function foo() { return 0; }; + fnArrow = () => "S"; + fnExpressionProtected = function foo() { return 0; }; + fnArrowProtected = () => "S"; + static fnStaticExpression = function foo() { return 0; }; + static fnStaticArrow = () => "S"; + static fnStaticExpressionProtected = function foo() { return 0; }; + static fnStaticArrowProtected = () => "S"; + // Have annotation, so ok + fnExpressionOk = function foo() { return 0; }; + fnArrowOK = () => "S"; + fnExpressionProtectedOk = function foo() { return 0; }; + fnArrowProtectedOK = () => "S"; + static fnStaticExpressionOk = function foo() { return 0; }; + static fnStaticArrowOk = () => "S"; + static fnStaticExpressionProtectedOk = function foo() { return 0; }; + static fnStaticArrowProtectedOk = () => "S"; + // No Error not in declarations + fnExpressionPrivate = function foo() { return 0; }; + fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0; }; + static fnStaticExpressionPrivate = function foo() { return 0; }; + static fnStaticArrowPrivate = () => "S"; +} +// Should error +class IndirectlyExportedClass { + fnExpression = function foo() { return 0; }; + fnArrow = () => "S"; + static fnStaticExpression = function foo() { return 0; }; + static fnStaticArrow = () => "S"; + static fnStaticExpressionProtected = function foo() { return 0; }; + static fnStaticArrowProtected = () => "S"; + fnExpressionPrivate = function foo() { return 0; }; + fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0; }; + static fnStaticExpressionPrivate = function foo() { return 0; }; + static fnStaticArrowPrivate = () => "S"; +} +export const instance = new IndirectlyExportedClass(); +// No Errors +class InternalClass { + fnExpression = function foo() { return 0; }; + fnArrow = () => "S"; + static fnStaticExpression = function foo() { return 0; }; + static fnStaticArrow = () => "S"; + static fnStaticExpressionProtected = function foo() { return 0; }; + static fnStaticArrowProtected = () => "S"; + fnExpressionPrivate = function foo() { return 0; }; + fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0; }; + static fnStaticExpressionPrivate = function foo() { return 0; }; + static fnStaticArrowPrivate = () => "S"; +} +const internalInstance = new InternalClass(); +// Function parameters +// In Function Variables - No annotations +export const fnParamExpressionConstVariable = function foo(cb = function () { }) { return 0; }; +export const fnParamArrowConstVariable = (cb = () => 1) => "S"; +export let fnParamExpressionLetVariable = function foo(cb = function () { }) { return 0; }; +export let fnParamArrowLetVariable = (cb = () => 1) => "S"; +export var fnParamExpressionVarVariable = function foo(cb = function () { }) { return 0; }; +export var fnParamArrowVarVariable = (cb = () => 1) => "S"; +// In Function Variables - No annotations on parameter +export const fnParamExpressionConstVariableOwnerHasReturnType = function foo(cb = function () { }) { return 0; }; +export const fnParamArrowConstVariableOwnerHasReturnType = (cb = function () { }) => "S"; +export let fnParamExpressionLetVariableOwnerHasReturnType = function foo(cb = function () { }) { return 0; }; +export let fnParamArrowLetVariableOwnerHasReturnType = (cb = function () { }) => "S"; +export var fnParamExpressionVarVariableOwnerHasReturnType = function foo(cb = function () { }) { return 0; }; +export var fnParamArrowVarVariableOwnerHasReturnType = (cb = function () { }) => "S"; +// No Errors +export const fnParamExpressionConstVariableOk = function foo(cb = function () { }) { return 0; }; +export const fnParamArrowConstVariableOk = (cb = function () { }) => "S"; +export let fnParamExpressionLetVariableOk = function foo(cb = function () { }) { return 0; }; +export let fnParamArrowLetVariableOk = (cb = function () { }) => "S"; +export var fnParamExpressionVarVariableOk = function foo(cb = function () { }) { return 0; }; +export var fnParamArrowVarVariableOk = (cb = function () { }) => "S"; +export const fnParamExpressionConstVariableInternal = function foo(cb = function () { }) { return 0; }; +export const fnParamArrowConstVariableInternal = (cb = () => 1) => "S"; +export let fnParamExpressionLetVariableInternal = function foo(cb = function () { }) { return 0; }; +export let fnParamArrowLetVariableInternal = (cb = () => 1) => "S"; +export var fnParamExpressionVarVariableInternal = function foo(cb = function () { }) { return 0; }; +export var fnParamArrowVarVariableInternal = (cb = () => 1) => "S"; +// In Function Fields +export class FnParamsExportedClass { + // Should Error + fnExpression = function foo(cb = function () { }) { return 0; }; + fnArrow = (cb = function () { }) => "S"; + fnExpressionProtected = function foo(cb = function () { }) { return 0; }; + fnArrowProtected = (cb = function () { }) => "S"; + static fnStaticExpression = function foo(cb = function () { }) { return 0; }; + static fnStaticArrow = (cb = function () { }) => "S"; + static fnStaticExpressionProtected = function foo(cb = function () { }) { return 0; }; + static fnStaticArrowProtected = (cb = function () { }) => "S"; + // Have annotation on owner + fnExpressionMethodHasReturn = function foo(cb = function () { }) { return 0; }; + fnArrowMethodHasReturn = (cb = function () { }) => "S"; + fnExpressionProtectedMethodHasReturn = function foo(cb = function () { }) { return 0; }; + fnArrowProtectedMethodHasReturn = (cb = function () { }) => "S"; + static fnStaticExpressionMethodHasReturn = function foo(cb = function () { }) { return 0; }; + static fnStaticArrowMethodHasReturn = (cb = function () { }) => "S"; + static fnStaticExpressionProtectedMethodHasReturn = function foo(cb = function () { }) { return 0; }; + static fnStaticArrowProtectedMethodHasReturn = (cb = function () { }) => "S"; + // Have annotation only on parameter + fnExpressionOnlyOnParam = function foo(cb = function () { }) { return 0; }; + fnArrowOnlyOnParam = (cb = function () { }) => "S"; + fnExpressionProtectedOnlyOnParam = function foo(cb = function () { }) { return 0; }; + fnArrowProtectedOnlyOnParam = (cb = function () { }) => "S"; + static fnStaticExpressionOnlyOnParam = function foo(cb = function () { }) { return 0; }; + static fnStaticArrowOnlyOnParam = (cb = function () { }) => "S"; + static fnStaticExpressionProtectedOnlyOnParam = function foo(cb = function () { }) { return 0; }; + static fnStaticArrowProtectedOnlyOnParam = (cb = function () { }) => "S"; + // Have annotation, so ok + fnExpressionOk = function foo(cb = function () { }) { return 0; }; + fnArrowOK = (cb = function () { }) => "S"; + fnExpressionProtectedOk = function foo(cb = function () { }) { return 0; }; + fnArrowProtectedOK = (cb = function () { }) => "S"; + static fnStaticExpressionOk = function foo(cb = function () { }) { return 0; }; + static fnStaticArrowOk = (cb = function () { }) => "S"; + static fnStaticExpressionProtectedOk = function foo(cb = function () { }) { return 0; }; + static fnStaticArrowProtectedOk = (cb = function () { }) => "S"; + // No Error, not in declarations + fnExpressionPrivate = function foo(cb = function () { }) { return 0; }; + fnArrowPrivate = (cb = function () { }) => "S"; + #fnArrow = (cb = function () { }) => "S"; + #fnExpression = function foo(cb = function () { }) { return 0; }; + static fnStaticExpressionPrivate = function foo(cb = function () { }) { return 0; }; + static fnStaticArrowPrivate = (cb = function () { }) => "S"; +} diff --git a/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.symbols b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.symbols new file mode 100644 index 0000000000000..73fc1948025e5 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.symbols @@ -0,0 +1,557 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsReturnTypes.ts] //// + +=== isolatedDeclarationErrorsReturnTypes.ts === +// Function Variables +export const fnExpressionConstVariable = function foo() { return 0;} +>fnExpressionConstVariable : Symbol(fnExpressionConstVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 1, 12)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 1, 40)) + +export const fnArrowConstVariable = () => "S"; +>fnArrowConstVariable : Symbol(fnArrowConstVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 2, 12)) + +export let fnExpressionLetVariable = function foo() { return 0;} +>fnExpressionLetVariable : Symbol(fnExpressionLetVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 4, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 4, 36)) + +export let fnArrowLetVariable = () => "S"; +>fnArrowLetVariable : Symbol(fnArrowLetVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 5, 10)) + +export var fnExpressionVarVariable = function foo() { return 0;} +>fnExpressionVarVariable : Symbol(fnExpressionVarVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 7, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 7, 36)) + +export var fnArrowVarVariable = () => "S"; +>fnArrowVarVariable : Symbol(fnArrowVarVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 8, 10)) + +// No Errors +export const fnExpressionConstVariableOk = function foo(): number { return 0;} +>fnExpressionConstVariableOk : Symbol(fnExpressionConstVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 11, 12)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 11, 42)) + +export const fnArrowConstVariableOk = (cb = function(){ }): string => "S"; +>fnArrowConstVariableOk : Symbol(fnArrowConstVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 12, 12)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 12, 39)) + +export let fnExpressionLetVariableOk = function foo(): number { return 0;} +>fnExpressionLetVariableOk : Symbol(fnExpressionLetVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 14, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 14, 38)) + +export let fnArrowLetVariableOk = (cb = function(){ }): string => "S"; +>fnArrowLetVariableOk : Symbol(fnArrowLetVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 15, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 15, 35)) + +export var fnExpressionVarVariableOk = function foo(): number { return 0;} +>fnExpressionVarVariableOk : Symbol(fnExpressionVarVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 17, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 17, 38)) + +export var fnArrowVarVariableOk = (cb = function(){ }): string => "S"; +>fnArrowVarVariableOk : Symbol(fnArrowVarVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 18, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 18, 35)) + +// Not exported +const fnExpressionConstVariableInternal = function foo() { return 0;} +>fnExpressionConstVariableInternal : Symbol(fnExpressionConstVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 21, 5)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 21, 41)) + +const fnArrowConstVariableInternal = () => "S"; +>fnArrowConstVariableInternal : Symbol(fnArrowConstVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 22, 5)) + +let fnExpressionLetVariableInternal = function foo() { return 0;} +>fnExpressionLetVariableInternal : Symbol(fnExpressionLetVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 24, 3)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 24, 37)) + +let fnArrowLetVariableInternal = () => "S"; +>fnArrowLetVariableInternal : Symbol(fnArrowLetVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 25, 3)) + +var fnExpressionVarVariableInternal = function foo() { return 0;} +>fnExpressionVarVariableInternal : Symbol(fnExpressionVarVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 27, 3)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 27, 37)) + +var fnArrowVarVariableInternal = () => "S"; +>fnArrowVarVariableInternal : Symbol(fnArrowVarVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 28, 3)) + +// Function Fields +export class ExportedClass { +>ExportedClass : Symbol(ExportedClass, Decl(isolatedDeclarationErrorsReturnTypes.ts, 28, 43)) + + // Should Error + fnExpression = function foo() { return 0; } +>fnExpression : Symbol(ExportedClass.fnExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 31, 28)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 33, 18)) + + fnArrow = () => "S"; +>fnArrow : Symbol(ExportedClass.fnArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 33, 47)) + + protected fnExpressionProtected = function foo() { return 0; } +>fnExpressionProtected : Symbol(ExportedClass.fnExpressionProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 34, 24)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 35, 37)) + + protected fnArrowProtected = () => "S"; +>fnArrowProtected : Symbol(ExportedClass.fnArrowProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 35, 66)) + + static fnStaticExpression = function foo() { return 0; } +>fnStaticExpression : Symbol(ExportedClass.fnStaticExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 36, 43)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 38, 31)) + + static fnStaticArrow = () => "S"; +>fnStaticArrow : Symbol(ExportedClass.fnStaticArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 38, 60)) + + protected static fnStaticExpressionProtected = function foo() { return 0; } +>fnStaticExpressionProtected : Symbol(ExportedClass.fnStaticExpressionProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 39, 37)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 40, 50)) + + protected static fnStaticArrowProtected = () => "S"; +>fnStaticArrowProtected : Symbol(ExportedClass.fnStaticArrowProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 40, 79)) + + // Have annotation, so ok + fnExpressionOk = function foo(): number { return 0; } +>fnExpressionOk : Symbol(ExportedClass.fnExpressionOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 41, 56)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 44, 20)) + + fnArrowOK = (): string => "S"; +>fnArrowOK : Symbol(ExportedClass.fnArrowOK, Decl(isolatedDeclarationErrorsReturnTypes.ts, 44, 57)) + + protected fnExpressionProtectedOk = function foo(): number { return 0; } +>fnExpressionProtectedOk : Symbol(ExportedClass.fnExpressionProtectedOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 45, 34)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 46, 39)) + + protected fnArrowProtectedOK = (): string => "S"; +>fnArrowProtectedOK : Symbol(ExportedClass.fnArrowProtectedOK, Decl(isolatedDeclarationErrorsReturnTypes.ts, 46, 76)) + + static fnStaticExpressionOk = function foo(): number { return 0; } +>fnStaticExpressionOk : Symbol(ExportedClass.fnStaticExpressionOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 47, 53)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 49, 33)) + + static fnStaticArrowOk = (): string => "S"; +>fnStaticArrowOk : Symbol(ExportedClass.fnStaticArrowOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 49, 70)) + + protected static fnStaticExpressionProtectedOk = function foo(): number { return 0; } +>fnStaticExpressionProtectedOk : Symbol(ExportedClass.fnStaticExpressionProtectedOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 50, 47)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 51, 52)) + + protected static fnStaticArrowProtectedOk = (): string => "S"; +>fnStaticArrowProtectedOk : Symbol(ExportedClass.fnStaticArrowProtectedOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 51, 89)) + + + // No Error not in declarations + private fnExpressionPrivate = function foo() { return 0; } +>fnExpressionPrivate : Symbol(ExportedClass.fnExpressionPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 52, 66)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 56, 33)) + + private fnArrowPrivate = () => "S"; +>fnArrowPrivate : Symbol(ExportedClass.fnArrowPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 56, 62)) + + #fnArrow = () => "S"; +>#fnArrow : Symbol(ExportedClass.#fnArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 57, 39)) + + #fnExpression = function foo() { return 0;} +>#fnExpression : Symbol(ExportedClass.#fnExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 58, 25)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 59, 19)) + + private static fnStaticExpressionPrivate = function foo() { return 0; } +>fnStaticExpressionPrivate : Symbol(ExportedClass.fnStaticExpressionPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 59, 47)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 60, 46)) + + private static fnStaticArrowPrivate = () => "S"; +>fnStaticArrowPrivate : Symbol(ExportedClass.fnStaticArrowPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 60, 75)) +} + +// Should error +class IndirectlyExportedClass { +>IndirectlyExportedClass : Symbol(IndirectlyExportedClass, Decl(isolatedDeclarationErrorsReturnTypes.ts, 62, 1)) + + fnExpression = function foo() { return 0; } +>fnExpression : Symbol(IndirectlyExportedClass.fnExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 65, 31)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 66, 18)) + + fnArrow = () => "S"; +>fnArrow : Symbol(IndirectlyExportedClass.fnArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 66, 47)) + + static fnStaticExpression = function foo() { return 0; } +>fnStaticExpression : Symbol(IndirectlyExportedClass.fnStaticExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 67, 24)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 69, 31)) + + static fnStaticArrow = () => "S"; +>fnStaticArrow : Symbol(IndirectlyExportedClass.fnStaticArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 69, 60)) + + protected static fnStaticExpressionProtected = function foo() { return 0; } +>fnStaticExpressionProtected : Symbol(IndirectlyExportedClass.fnStaticExpressionProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 70, 37)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 72, 50)) + + protected static fnStaticArrowProtected = () => "S"; +>fnStaticArrowProtected : Symbol(IndirectlyExportedClass.fnStaticArrowProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 72, 79)) + + private fnExpressionPrivate = function foo() { return 0; } +>fnExpressionPrivate : Symbol(IndirectlyExportedClass.fnExpressionPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 73, 56)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 75, 33)) + + private fnArrowPrivate = () => "S"; +>fnArrowPrivate : Symbol(IndirectlyExportedClass.fnArrowPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 75, 62)) + + #fnArrow = () => "S"; +>#fnArrow : Symbol(IndirectlyExportedClass.#fnArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 76, 39)) + + #fnExpression = function foo() { return 0;} +>#fnExpression : Symbol(IndirectlyExportedClass.#fnExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 77, 25)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 78, 19)) + + private static fnStaticExpressionPrivate = function foo() { return 0; } +>fnStaticExpressionPrivate : Symbol(IndirectlyExportedClass.fnStaticExpressionPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 78, 47)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 79, 46)) + + private static fnStaticArrowPrivate = () => "S"; +>fnStaticArrowPrivate : Symbol(IndirectlyExportedClass.fnStaticArrowPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 79, 75)) +} +export const instance: IndirectlyExportedClass = new IndirectlyExportedClass(); +>instance : Symbol(instance, Decl(isolatedDeclarationErrorsReturnTypes.ts, 82, 12)) +>IndirectlyExportedClass : Symbol(IndirectlyExportedClass, Decl(isolatedDeclarationErrorsReturnTypes.ts, 62, 1)) +>IndirectlyExportedClass : Symbol(IndirectlyExportedClass, Decl(isolatedDeclarationErrorsReturnTypes.ts, 62, 1)) + +// No Errors +class InternalClass { +>InternalClass : Symbol(InternalClass, Decl(isolatedDeclarationErrorsReturnTypes.ts, 82, 79)) + + fnExpression = function foo() { return 0; } +>fnExpression : Symbol(InternalClass.fnExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 85, 21)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 86, 18)) + + fnArrow = () => "S"; +>fnArrow : Symbol(InternalClass.fnArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 86, 47)) + + static fnStaticExpression = function foo() { return 0; } +>fnStaticExpression : Symbol(InternalClass.fnStaticExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 87, 24)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 89, 31)) + + static fnStaticArrow = () => "S"; +>fnStaticArrow : Symbol(InternalClass.fnStaticArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 89, 60)) + + protected static fnStaticExpressionProtected = function foo() { return 0; } +>fnStaticExpressionProtected : Symbol(InternalClass.fnStaticExpressionProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 90, 37)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 92, 50)) + + protected static fnStaticArrowProtected = () => "S"; +>fnStaticArrowProtected : Symbol(InternalClass.fnStaticArrowProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 92, 79)) + + private fnExpressionPrivate = function foo() { return 0; } +>fnExpressionPrivate : Symbol(InternalClass.fnExpressionPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 93, 56)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 95, 33)) + + private fnArrowPrivate = () => "S"; +>fnArrowPrivate : Symbol(InternalClass.fnArrowPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 95, 62)) + + #fnArrow = () => "S"; +>#fnArrow : Symbol(InternalClass.#fnArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 96, 39)) + + #fnExpression = function foo() { return 0;} +>#fnExpression : Symbol(InternalClass.#fnExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 97, 25)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 98, 19)) + + private static fnStaticExpressionPrivate = function foo() { return 0; } +>fnStaticExpressionPrivate : Symbol(InternalClass.fnStaticExpressionPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 98, 47)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 99, 46)) + + private static fnStaticArrowPrivate = () => "S"; +>fnStaticArrowPrivate : Symbol(InternalClass.fnStaticArrowPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 99, 75)) +} +const internalInstance: InternalClass = new InternalClass(); +>internalInstance : Symbol(internalInstance, Decl(isolatedDeclarationErrorsReturnTypes.ts, 102, 5)) +>InternalClass : Symbol(InternalClass, Decl(isolatedDeclarationErrorsReturnTypes.ts, 82, 79)) +>InternalClass : Symbol(InternalClass, Decl(isolatedDeclarationErrorsReturnTypes.ts, 82, 79)) + + +// Function parameters + +// In Function Variables - No annotations +export const fnParamExpressionConstVariable = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionConstVariable : Symbol(fnParamExpressionConstVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 108, 12)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 108, 45)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 108, 59)) + +export const fnParamArrowConstVariable = (cb = () => 1) => "S"; +>fnParamArrowConstVariable : Symbol(fnParamArrowConstVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 109, 12)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 109, 42)) + +export let fnParamExpressionLetVariable = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionLetVariable : Symbol(fnParamExpressionLetVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 111, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 111, 41)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 111, 55)) + +export let fnParamArrowLetVariable = (cb = () => 1) => "S"; +>fnParamArrowLetVariable : Symbol(fnParamArrowLetVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 112, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 112, 38)) + +export var fnParamExpressionVarVariable = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionVarVariable : Symbol(fnParamExpressionVarVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 114, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 114, 41)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 114, 55)) + +export var fnParamArrowVarVariable = (cb = () => 1) => "S"; +>fnParamArrowVarVariable : Symbol(fnParamArrowVarVariable, Decl(isolatedDeclarationErrorsReturnTypes.ts, 115, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 115, 38)) + +// In Function Variables - No annotations on parameter +export const fnParamExpressionConstVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +>fnParamExpressionConstVariableOwnerHasReturnType : Symbol(fnParamExpressionConstVariableOwnerHasReturnType, Decl(isolatedDeclarationErrorsReturnTypes.ts, 118, 12)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 118, 63)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 118, 77)) + +export const fnParamArrowConstVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; +>fnParamArrowConstVariableOwnerHasReturnType : Symbol(fnParamArrowConstVariableOwnerHasReturnType, Decl(isolatedDeclarationErrorsReturnTypes.ts, 119, 12)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 119, 60)) + +export let fnParamExpressionLetVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +>fnParamExpressionLetVariableOwnerHasReturnType : Symbol(fnParamExpressionLetVariableOwnerHasReturnType, Decl(isolatedDeclarationErrorsReturnTypes.ts, 121, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 121, 59)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 121, 73)) + +export let fnParamArrowLetVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; +>fnParamArrowLetVariableOwnerHasReturnType : Symbol(fnParamArrowLetVariableOwnerHasReturnType, Decl(isolatedDeclarationErrorsReturnTypes.ts, 122, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 122, 56)) + +export var fnParamExpressionVarVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +>fnParamExpressionVarVariableOwnerHasReturnType : Symbol(fnParamExpressionVarVariableOwnerHasReturnType, Decl(isolatedDeclarationErrorsReturnTypes.ts, 124, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 124, 59)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 124, 73)) + +export var fnParamArrowVarVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; +>fnParamArrowVarVariableOwnerHasReturnType : Symbol(fnParamArrowVarVariableOwnerHasReturnType, Decl(isolatedDeclarationErrorsReturnTypes.ts, 125, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 125, 56)) + +// No Errors +export const fnParamExpressionConstVariableOk = function foo(cb = function(): void{ }): number { return 0;} +>fnParamExpressionConstVariableOk : Symbol(fnParamExpressionConstVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 128, 12)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 128, 47)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 128, 61)) + +export const fnParamArrowConstVariableOk = (cb = function(): void{ }): string => "S"; +>fnParamArrowConstVariableOk : Symbol(fnParamArrowConstVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 129, 12)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 129, 44)) + +export let fnParamExpressionLetVariableOk = function foo(cb = function(): void{ }): number { return 0;} +>fnParamExpressionLetVariableOk : Symbol(fnParamExpressionLetVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 131, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 131, 43)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 131, 57)) + +export let fnParamArrowLetVariableOk = (cb = function(): void{ }): string => "S"; +>fnParamArrowLetVariableOk : Symbol(fnParamArrowLetVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 132, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 132, 40)) + +export var fnParamExpressionVarVariableOk = function foo(cb = function(): void{ }): number { return 0;} +>fnParamExpressionVarVariableOk : Symbol(fnParamExpressionVarVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 134, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 134, 43)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 134, 57)) + +export var fnParamArrowVarVariableOk = (cb = function(): void{ }): string => "S"; +>fnParamArrowVarVariableOk : Symbol(fnParamArrowVarVariableOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 135, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 135, 40)) + +export const fnParamExpressionConstVariableInternal = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionConstVariableInternal : Symbol(fnParamExpressionConstVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 137, 12)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 137, 53)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 137, 67)) + +export const fnParamArrowConstVariableInternal = (cb = () => 1) => "S"; +>fnParamArrowConstVariableInternal : Symbol(fnParamArrowConstVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 138, 12)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 138, 50)) + +export let fnParamExpressionLetVariableInternal = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionLetVariableInternal : Symbol(fnParamExpressionLetVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 140, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 140, 49)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 140, 63)) + +export let fnParamArrowLetVariableInternal = (cb = () => 1) => "S"; +>fnParamArrowLetVariableInternal : Symbol(fnParamArrowLetVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 141, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 141, 46)) + +export var fnParamExpressionVarVariableInternal = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionVarVariableInternal : Symbol(fnParamExpressionVarVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 143, 10)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 143, 49)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 143, 63)) + +export var fnParamArrowVarVariableInternal = (cb = () => 1) => "S"; +>fnParamArrowVarVariableInternal : Symbol(fnParamArrowVarVariableInternal, Decl(isolatedDeclarationErrorsReturnTypes.ts, 144, 10)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 144, 46)) + + +// In Function Fields +export class FnParamsExportedClass { +>FnParamsExportedClass : Symbol(FnParamsExportedClass, Decl(isolatedDeclarationErrorsReturnTypes.ts, 144, 67)) + + // Should Error + fnExpression = function foo(cb = function(){ }) { return 0; } +>fnExpression : Symbol(FnParamsExportedClass.fnExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 148, 36)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 150, 18)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 150, 32)) + + fnArrow = (cb = function(){ }) => "S"; +>fnArrow : Symbol(FnParamsExportedClass.fnArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 150, 65)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 151, 15)) + + protected fnExpressionProtected = function foo(cb = function(){ }) { return 0; } +>fnExpressionProtected : Symbol(FnParamsExportedClass.fnExpressionProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 151, 42)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 152, 37)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 152, 51)) + + protected fnArrowProtected = (cb = function(){ }) => "S"; +>fnArrowProtected : Symbol(FnParamsExportedClass.fnArrowProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 152, 84)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 153, 34)) + + static fnStaticExpression = function foo(cb = function(){ }) { return 0; } +>fnStaticExpression : Symbol(FnParamsExportedClass.fnStaticExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 153, 61)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 155, 31)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 155, 45)) + + static fnStaticArrow = (cb = function(){ }) => "S"; +>fnStaticArrow : Symbol(FnParamsExportedClass.fnStaticArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 155, 78)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 156, 28)) + + protected static fnStaticExpressionProtected = function foo(cb = function(){ }) { return 0; } +>fnStaticExpressionProtected : Symbol(FnParamsExportedClass.fnStaticExpressionProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 156, 55)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 157, 50)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 157, 64)) + + protected static fnStaticArrowProtected = (cb = function(){ }) => "S"; +>fnStaticArrowProtected : Symbol(FnParamsExportedClass.fnStaticArrowProtected, Decl(isolatedDeclarationErrorsReturnTypes.ts, 157, 97)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 158, 47)) + + // Have annotation on owner + fnExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } +>fnExpressionMethodHasReturn : Symbol(FnParamsExportedClass.fnExpressionMethodHasReturn, Decl(isolatedDeclarationErrorsReturnTypes.ts, 158, 74)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 161, 33)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 161, 47)) + + fnArrowMethodHasReturn = (cb = function(){ }): string => "S"; +>fnArrowMethodHasReturn : Symbol(FnParamsExportedClass.fnArrowMethodHasReturn, Decl(isolatedDeclarationErrorsReturnTypes.ts, 161, 88)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 162, 30)) + + protected fnExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } +>fnExpressionProtectedMethodHasReturn : Symbol(FnParamsExportedClass.fnExpressionProtectedMethodHasReturn, Decl(isolatedDeclarationErrorsReturnTypes.ts, 162, 65)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 163, 52)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 163, 66)) + + protected fnArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; +>fnArrowProtectedMethodHasReturn : Symbol(FnParamsExportedClass.fnArrowProtectedMethodHasReturn, Decl(isolatedDeclarationErrorsReturnTypes.ts, 163, 107)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 164, 49)) + + static fnStaticExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } +>fnStaticExpressionMethodHasReturn : Symbol(FnParamsExportedClass.fnStaticExpressionMethodHasReturn, Decl(isolatedDeclarationErrorsReturnTypes.ts, 164, 84)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 166, 46)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 166, 60)) + + static fnStaticArrowMethodHasReturn = (cb = function(){ }): string => "S"; +>fnStaticArrowMethodHasReturn : Symbol(FnParamsExportedClass.fnStaticArrowMethodHasReturn, Decl(isolatedDeclarationErrorsReturnTypes.ts, 166, 101)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 167, 43)) + + protected static fnStaticExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } +>fnStaticExpressionProtectedMethodHasReturn : Symbol(FnParamsExportedClass.fnStaticExpressionProtectedMethodHasReturn, Decl(isolatedDeclarationErrorsReturnTypes.ts, 167, 78)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 168, 65)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 168, 79)) + + protected static fnStaticArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; +>fnStaticArrowProtectedMethodHasReturn : Symbol(FnParamsExportedClass.fnStaticArrowProtectedMethodHasReturn, Decl(isolatedDeclarationErrorsReturnTypes.ts, 168, 120)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 169, 62)) + + // Have annotation only on parameter + fnExpressionOnlyOnParam = function foo(cb = function(): void { }) { return 0; } +>fnExpressionOnlyOnParam : Symbol(FnParamsExportedClass.fnExpressionOnlyOnParam, Decl(isolatedDeclarationErrorsReturnTypes.ts, 169, 97)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 172, 29)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 172, 43)) + + fnArrowOnlyOnParam = (cb = function(): void { }) => "S"; +>fnArrowOnlyOnParam : Symbol(FnParamsExportedClass.fnArrowOnlyOnParam, Decl(isolatedDeclarationErrorsReturnTypes.ts, 172, 83)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 173, 26)) + + protected fnExpressionProtectedOnlyOnParam = function foo(cb = function(): void { }) { return 0; } +>fnExpressionProtectedOnlyOnParam : Symbol(FnParamsExportedClass.fnExpressionProtectedOnlyOnParam, Decl(isolatedDeclarationErrorsReturnTypes.ts, 173, 60)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 174, 48)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 174, 62)) + + protected fnArrowProtectedOnlyOnParam = (cb = function(): void { }) => "S"; +>fnArrowProtectedOnlyOnParam : Symbol(FnParamsExportedClass.fnArrowProtectedOnlyOnParam, Decl(isolatedDeclarationErrorsReturnTypes.ts, 174, 102)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 175, 45)) + + static fnStaticExpressionOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } +>fnStaticExpressionOnlyOnParam : Symbol(FnParamsExportedClass.fnStaticExpressionOnlyOnParam, Decl(isolatedDeclarationErrorsReturnTypes.ts, 175, 79)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 177, 42)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 177, 56)) + + static fnStaticArrowOnlyOnParam = (cb = function(): void{ }) => "S"; +>fnStaticArrowOnlyOnParam : Symbol(FnParamsExportedClass.fnStaticArrowOnlyOnParam, Decl(isolatedDeclarationErrorsReturnTypes.ts, 177, 95)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 178, 39)) + + protected static fnStaticExpressionProtectedOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } +>fnStaticExpressionProtectedOnlyOnParam : Symbol(FnParamsExportedClass.fnStaticExpressionProtectedOnlyOnParam, Decl(isolatedDeclarationErrorsReturnTypes.ts, 178, 72)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 179, 61)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 179, 75)) + + protected static fnStaticArrowProtectedOnlyOnParam = (cb = function(): void{ }) => "S"; +>fnStaticArrowProtectedOnlyOnParam : Symbol(FnParamsExportedClass.fnStaticArrowProtectedOnlyOnParam, Decl(isolatedDeclarationErrorsReturnTypes.ts, 179, 114)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 180, 58)) + + // Have annotation, so ok + fnExpressionOk = function foo(cb = function(): void { }): number { return 0; } +>fnExpressionOk : Symbol(FnParamsExportedClass.fnExpressionOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 180, 91)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 183, 20)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 183, 34)) + + fnArrowOK = (cb = function(): void { }): string => "S"; +>fnArrowOK : Symbol(FnParamsExportedClass.fnArrowOK, Decl(isolatedDeclarationErrorsReturnTypes.ts, 183, 82)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 184, 17)) + + protected fnExpressionProtectedOk = function foo(cb = function(): void { }): number { return 0; } +>fnExpressionProtectedOk : Symbol(FnParamsExportedClass.fnExpressionProtectedOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 184, 59)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 185, 39)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 185, 53)) + + protected fnArrowProtectedOK = (cb = function(): void { }): string => "S"; +>fnArrowProtectedOK : Symbol(FnParamsExportedClass.fnArrowProtectedOK, Decl(isolatedDeclarationErrorsReturnTypes.ts, 185, 101)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 186, 36)) + + static fnStaticExpressionOk = function foo(cb = function(): void{ }): number { return 0; } +>fnStaticExpressionOk : Symbol(FnParamsExportedClass.fnStaticExpressionOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 186, 78)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 188, 33)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 188, 47)) + + static fnStaticArrowOk = (cb = function(): void{ }): string => "S"; +>fnStaticArrowOk : Symbol(FnParamsExportedClass.fnStaticArrowOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 188, 94)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 189, 30)) + + protected static fnStaticExpressionProtectedOk = function foo(cb = function(): void{ }): number { return 0; } +>fnStaticExpressionProtectedOk : Symbol(FnParamsExportedClass.fnStaticExpressionProtectedOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 189, 71)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 190, 52)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 190, 66)) + + protected static fnStaticArrowProtectedOk = (cb = function(): void{ }): string => "S"; +>fnStaticArrowProtectedOk : Symbol(FnParamsExportedClass.fnStaticArrowProtectedOk, Decl(isolatedDeclarationErrorsReturnTypes.ts, 190, 113)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 191, 49)) + + + // No Error, not in declarations + private fnExpressionPrivate = function foo(cb = function(){ }) { return 0; } +>fnExpressionPrivate : Symbol(FnParamsExportedClass.fnExpressionPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 191, 90)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 195, 33)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 195, 47)) + + private fnArrowPrivate = (cb = function(){ }) => "S"; +>fnArrowPrivate : Symbol(FnParamsExportedClass.fnArrowPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 195, 80)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 196, 30)) + + #fnArrow = (cb = function(){ }) => "S"; +>#fnArrow : Symbol(FnParamsExportedClass.#fnArrow, Decl(isolatedDeclarationErrorsReturnTypes.ts, 196, 57)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 197, 16)) + + #fnExpression = function foo(cb = function(){ }) { return 0;} +>#fnExpression : Symbol(FnParamsExportedClass.#fnExpression, Decl(isolatedDeclarationErrorsReturnTypes.ts, 197, 43)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 198, 19)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 198, 33)) + + private static fnStaticExpressionPrivate = function foo(cb = function(){ }) { return 0; } +>fnStaticExpressionPrivate : Symbol(FnParamsExportedClass.fnStaticExpressionPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 198, 65)) +>foo : Symbol(foo, Decl(isolatedDeclarationErrorsReturnTypes.ts, 199, 46)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 199, 60)) + + private static fnStaticArrowPrivate = (cb = function(){ }) => "S"; +>fnStaticArrowPrivate : Symbol(FnParamsExportedClass.fnStaticArrowPrivate, Decl(isolatedDeclarationErrorsReturnTypes.ts, 199, 93)) +>cb : Symbol(cb, Decl(isolatedDeclarationErrorsReturnTypes.ts, 200, 43)) +} + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.types b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.types new file mode 100644 index 0000000000000..9cecf5a8c253e --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.types @@ -0,0 +1,880 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsReturnTypes.ts] //// + +=== isolatedDeclarationErrorsReturnTypes.ts === +// Function Variables +export const fnExpressionConstVariable = function foo() { return 0;} +>fnExpressionConstVariable : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + +export const fnArrowConstVariable = () => "S"; +>fnArrowConstVariable : () => string +>() => "S" : () => string +>"S" : "S" + +export let fnExpressionLetVariable = function foo() { return 0;} +>fnExpressionLetVariable : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + +export let fnArrowLetVariable = () => "S"; +>fnArrowLetVariable : () => string +>() => "S" : () => string +>"S" : "S" + +export var fnExpressionVarVariable = function foo() { return 0;} +>fnExpressionVarVariable : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + +export var fnArrowVarVariable = () => "S"; +>fnArrowVarVariable : () => string +>() => "S" : () => string +>"S" : "S" + +// No Errors +export const fnExpressionConstVariableOk = function foo(): number { return 0;} +>fnExpressionConstVariableOk : () => number +>function foo(): number { return 0;} : () => number +>foo : () => number +>0 : 0 + +export const fnArrowConstVariableOk = (cb = function(){ }): string => "S"; +>fnArrowConstVariableOk : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + +export let fnExpressionLetVariableOk = function foo(): number { return 0;} +>fnExpressionLetVariableOk : () => number +>function foo(): number { return 0;} : () => number +>foo : () => number +>0 : 0 + +export let fnArrowLetVariableOk = (cb = function(){ }): string => "S"; +>fnArrowLetVariableOk : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + +export var fnExpressionVarVariableOk = function foo(): number { return 0;} +>fnExpressionVarVariableOk : () => number +>function foo(): number { return 0;} : () => number +>foo : () => number +>0 : 0 + +export var fnArrowVarVariableOk = (cb = function(){ }): string => "S"; +>fnArrowVarVariableOk : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + +// Not exported +const fnExpressionConstVariableInternal = function foo() { return 0;} +>fnExpressionConstVariableInternal : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + +const fnArrowConstVariableInternal = () => "S"; +>fnArrowConstVariableInternal : () => string +>() => "S" : () => string +>"S" : "S" + +let fnExpressionLetVariableInternal = function foo() { return 0;} +>fnExpressionLetVariableInternal : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + +let fnArrowLetVariableInternal = () => "S"; +>fnArrowLetVariableInternal : () => string +>() => "S" : () => string +>"S" : "S" + +var fnExpressionVarVariableInternal = function foo() { return 0;} +>fnExpressionVarVariableInternal : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + +var fnArrowVarVariableInternal = () => "S"; +>fnArrowVarVariableInternal : () => string +>() => "S" : () => string +>"S" : "S" + +// Function Fields +export class ExportedClass { +>ExportedClass : ExportedClass + + // Should Error + fnExpression = function foo() { return 0; } +>fnExpression : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + fnArrow = () => "S"; +>fnArrow : () => string +>() => "S" : () => string +>"S" : "S" + + protected fnExpressionProtected = function foo() { return 0; } +>fnExpressionProtected : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + protected fnArrowProtected = () => "S"; +>fnArrowProtected : () => string +>() => "S" : () => string +>"S" : "S" + + static fnStaticExpression = function foo() { return 0; } +>fnStaticExpression : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + static fnStaticArrow = () => "S"; +>fnStaticArrow : () => string +>() => "S" : () => string +>"S" : "S" + + protected static fnStaticExpressionProtected = function foo() { return 0; } +>fnStaticExpressionProtected : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + protected static fnStaticArrowProtected = () => "S"; +>fnStaticArrowProtected : () => string +>() => "S" : () => string +>"S" : "S" + + // Have annotation, so ok + fnExpressionOk = function foo(): number { return 0; } +>fnExpressionOk : () => number +>function foo(): number { return 0; } : () => number +>foo : () => number +>0 : 0 + + fnArrowOK = (): string => "S"; +>fnArrowOK : () => string +>(): string => "S" : () => string +>"S" : "S" + + protected fnExpressionProtectedOk = function foo(): number { return 0; } +>fnExpressionProtectedOk : () => number +>function foo(): number { return 0; } : () => number +>foo : () => number +>0 : 0 + + protected fnArrowProtectedOK = (): string => "S"; +>fnArrowProtectedOK : () => string +>(): string => "S" : () => string +>"S" : "S" + + static fnStaticExpressionOk = function foo(): number { return 0; } +>fnStaticExpressionOk : () => number +>function foo(): number { return 0; } : () => number +>foo : () => number +>0 : 0 + + static fnStaticArrowOk = (): string => "S"; +>fnStaticArrowOk : () => string +>(): string => "S" : () => string +>"S" : "S" + + protected static fnStaticExpressionProtectedOk = function foo(): number { return 0; } +>fnStaticExpressionProtectedOk : () => number +>function foo(): number { return 0; } : () => number +>foo : () => number +>0 : 0 + + protected static fnStaticArrowProtectedOk = (): string => "S"; +>fnStaticArrowProtectedOk : () => string +>(): string => "S" : () => string +>"S" : "S" + + + // No Error not in declarations + private fnExpressionPrivate = function foo() { return 0; } +>fnExpressionPrivate : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + private fnArrowPrivate = () => "S"; +>fnArrowPrivate : () => string +>() => "S" : () => string +>"S" : "S" + + #fnArrow = () => "S"; +>#fnArrow : () => string +>() => "S" : () => string +>"S" : "S" + + #fnExpression = function foo() { return 0;} +>#fnExpression : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + + private static fnStaticExpressionPrivate = function foo() { return 0; } +>fnStaticExpressionPrivate : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + private static fnStaticArrowPrivate = () => "S"; +>fnStaticArrowPrivate : () => string +>() => "S" : () => string +>"S" : "S" +} + +// Should error +class IndirectlyExportedClass { +>IndirectlyExportedClass : IndirectlyExportedClass + + fnExpression = function foo() { return 0; } +>fnExpression : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + fnArrow = () => "S"; +>fnArrow : () => string +>() => "S" : () => string +>"S" : "S" + + static fnStaticExpression = function foo() { return 0; } +>fnStaticExpression : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + static fnStaticArrow = () => "S"; +>fnStaticArrow : () => string +>() => "S" : () => string +>"S" : "S" + + protected static fnStaticExpressionProtected = function foo() { return 0; } +>fnStaticExpressionProtected : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + protected static fnStaticArrowProtected = () => "S"; +>fnStaticArrowProtected : () => string +>() => "S" : () => string +>"S" : "S" + + private fnExpressionPrivate = function foo() { return 0; } +>fnExpressionPrivate : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + private fnArrowPrivate = () => "S"; +>fnArrowPrivate : () => string +>() => "S" : () => string +>"S" : "S" + + #fnArrow = () => "S"; +>#fnArrow : () => string +>() => "S" : () => string +>"S" : "S" + + #fnExpression = function foo() { return 0;} +>#fnExpression : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + + private static fnStaticExpressionPrivate = function foo() { return 0; } +>fnStaticExpressionPrivate : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + private static fnStaticArrowPrivate = () => "S"; +>fnStaticArrowPrivate : () => string +>() => "S" : () => string +>"S" : "S" +} +export const instance: IndirectlyExportedClass = new IndirectlyExportedClass(); +>instance : IndirectlyExportedClass +>new IndirectlyExportedClass() : IndirectlyExportedClass +>IndirectlyExportedClass : typeof IndirectlyExportedClass + +// No Errors +class InternalClass { +>InternalClass : InternalClass + + fnExpression = function foo() { return 0; } +>fnExpression : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + fnArrow = () => "S"; +>fnArrow : () => string +>() => "S" : () => string +>"S" : "S" + + static fnStaticExpression = function foo() { return 0; } +>fnStaticExpression : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + static fnStaticArrow = () => "S"; +>fnStaticArrow : () => string +>() => "S" : () => string +>"S" : "S" + + protected static fnStaticExpressionProtected = function foo() { return 0; } +>fnStaticExpressionProtected : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + protected static fnStaticArrowProtected = () => "S"; +>fnStaticArrowProtected : () => string +>() => "S" : () => string +>"S" : "S" + + private fnExpressionPrivate = function foo() { return 0; } +>fnExpressionPrivate : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + private fnArrowPrivate = () => "S"; +>fnArrowPrivate : () => string +>() => "S" : () => string +>"S" : "S" + + #fnArrow = () => "S"; +>#fnArrow : () => string +>() => "S" : () => string +>"S" : "S" + + #fnExpression = function foo() { return 0;} +>#fnExpression : () => number +>function foo() { return 0;} : () => number +>foo : () => number +>0 : 0 + + private static fnStaticExpressionPrivate = function foo() { return 0; } +>fnStaticExpressionPrivate : () => number +>function foo() { return 0; } : () => number +>foo : () => number +>0 : 0 + + private static fnStaticArrowPrivate = () => "S"; +>fnStaticArrowPrivate : () => string +>() => "S" : () => string +>"S" : "S" +} +const internalInstance: InternalClass = new InternalClass(); +>internalInstance : InternalClass +>new InternalClass() : InternalClass +>InternalClass : typeof InternalClass + + +// Function parameters + +// In Function Variables - No annotations +export const fnParamExpressionConstVariable = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionConstVariable : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export const fnParamArrowConstVariable = (cb = () => 1) => "S"; +>fnParamArrowConstVariable : (cb?: () => number) => string +>(cb = () => 1) => "S" : (cb?: () => number) => string +>cb : () => number +>() => 1 : () => number +>1 : 1 +>"S" : "S" + +export let fnParamExpressionLetVariable = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionLetVariable : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export let fnParamArrowLetVariable = (cb = () => 1) => "S"; +>fnParamArrowLetVariable : (cb?: () => number) => string +>(cb = () => 1) => "S" : (cb?: () => number) => string +>cb : () => number +>() => 1 : () => number +>1 : 1 +>"S" : "S" + +export var fnParamExpressionVarVariable = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionVarVariable : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export var fnParamArrowVarVariable = (cb = () => 1) => "S"; +>fnParamArrowVarVariable : (cb?: () => number) => string +>(cb = () => 1) => "S" : (cb?: () => number) => string +>cb : () => number +>() => 1 : () => number +>1 : 1 +>"S" : "S" + +// In Function Variables - No annotations on parameter +export const fnParamExpressionConstVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +>fnParamExpressionConstVariableOwnerHasReturnType : (cb?: () => void) => number +>function foo(cb = function(){ }): number { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export const fnParamArrowConstVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; +>fnParamArrowConstVariableOwnerHasReturnType : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + +export let fnParamExpressionLetVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +>fnParamExpressionLetVariableOwnerHasReturnType : (cb?: () => void) => number +>function foo(cb = function(){ }): number { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export let fnParamArrowLetVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; +>fnParamArrowLetVariableOwnerHasReturnType : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + +export var fnParamExpressionVarVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +>fnParamExpressionVarVariableOwnerHasReturnType : (cb?: () => void) => number +>function foo(cb = function(){ }): number { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export var fnParamArrowVarVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; +>fnParamArrowVarVariableOwnerHasReturnType : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + +// No Errors +export const fnParamExpressionConstVariableOk = function foo(cb = function(): void{ }): number { return 0;} +>fnParamExpressionConstVariableOk : (cb?: () => void) => number +>function foo(cb = function(): void{ }): number { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void{ } : () => void +>0 : 0 + +export const fnParamArrowConstVariableOk = (cb = function(): void{ }): string => "S"; +>fnParamArrowConstVariableOk : (cb?: () => void) => string +>(cb = function(): void{ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void{ } : () => void +>"S" : "S" + +export let fnParamExpressionLetVariableOk = function foo(cb = function(): void{ }): number { return 0;} +>fnParamExpressionLetVariableOk : (cb?: () => void) => number +>function foo(cb = function(): void{ }): number { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void{ } : () => void +>0 : 0 + +export let fnParamArrowLetVariableOk = (cb = function(): void{ }): string => "S"; +>fnParamArrowLetVariableOk : (cb?: () => void) => string +>(cb = function(): void{ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void{ } : () => void +>"S" : "S" + +export var fnParamExpressionVarVariableOk = function foo(cb = function(): void{ }): number { return 0;} +>fnParamExpressionVarVariableOk : (cb?: () => void) => number +>function foo(cb = function(): void{ }): number { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void{ } : () => void +>0 : 0 + +export var fnParamArrowVarVariableOk = (cb = function(): void{ }): string => "S"; +>fnParamArrowVarVariableOk : (cb?: () => void) => string +>(cb = function(): void{ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void{ } : () => void +>"S" : "S" + +export const fnParamExpressionConstVariableInternal = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionConstVariableInternal : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export const fnParamArrowConstVariableInternal = (cb = () => 1) => "S"; +>fnParamArrowConstVariableInternal : (cb?: () => number) => string +>(cb = () => 1) => "S" : (cb?: () => number) => string +>cb : () => number +>() => 1 : () => number +>1 : 1 +>"S" : "S" + +export let fnParamExpressionLetVariableInternal = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionLetVariableInternal : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export let fnParamArrowLetVariableInternal = (cb = () => 1) => "S"; +>fnParamArrowLetVariableInternal : (cb?: () => number) => string +>(cb = () => 1) => "S" : (cb?: () => number) => string +>cb : () => number +>() => 1 : () => number +>1 : 1 +>"S" : "S" + +export var fnParamExpressionVarVariableInternal = function foo(cb = function(){ }) { return 0;} +>fnParamExpressionVarVariableInternal : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + +export var fnParamArrowVarVariableInternal = (cb = () => 1) => "S"; +>fnParamArrowVarVariableInternal : (cb?: () => number) => string +>(cb = () => 1) => "S" : (cb?: () => number) => string +>cb : () => number +>() => 1 : () => number +>1 : 1 +>"S" : "S" + + +// In Function Fields +export class FnParamsExportedClass { +>FnParamsExportedClass : FnParamsExportedClass + + // Should Error + fnExpression = function foo(cb = function(){ }) { return 0; } +>fnExpression : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + fnArrow = (cb = function(){ }) => "S"; +>fnArrow : (cb?: () => void) => string +>(cb = function(){ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + protected fnExpressionProtected = function foo(cb = function(){ }) { return 0; } +>fnExpressionProtected : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + protected fnArrowProtected = (cb = function(){ }) => "S"; +>fnArrowProtected : (cb?: () => void) => string +>(cb = function(){ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + static fnStaticExpression = function foo(cb = function(){ }) { return 0; } +>fnStaticExpression : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + static fnStaticArrow = (cb = function(){ }) => "S"; +>fnStaticArrow : (cb?: () => void) => string +>(cb = function(){ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + protected static fnStaticExpressionProtected = function foo(cb = function(){ }) { return 0; } +>fnStaticExpressionProtected : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + protected static fnStaticArrowProtected = (cb = function(){ }) => "S"; +>fnStaticArrowProtected : (cb?: () => void) => string +>(cb = function(){ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + // Have annotation on owner + fnExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } +>fnExpressionMethodHasReturn : (cb?: () => void) => number +>function foo(cb = function(){ }): number { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + fnArrowMethodHasReturn = (cb = function(){ }): string => "S"; +>fnArrowMethodHasReturn : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + protected fnExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } +>fnExpressionProtectedMethodHasReturn : (cb?: () => void) => number +>function foo(cb = function(){ }): number { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + protected fnArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; +>fnArrowProtectedMethodHasReturn : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + static fnStaticExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } +>fnStaticExpressionMethodHasReturn : (cb?: () => void) => number +>function foo(cb = function(){ }): number { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + static fnStaticArrowMethodHasReturn = (cb = function(){ }): string => "S"; +>fnStaticArrowMethodHasReturn : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + protected static fnStaticExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } +>fnStaticExpressionProtectedMethodHasReturn : (cb?: () => void) => number +>function foo(cb = function(){ }): number { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + protected static fnStaticArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; +>fnStaticArrowProtectedMethodHasReturn : (cb?: () => void) => string +>(cb = function(){ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + // Have annotation only on parameter + fnExpressionOnlyOnParam = function foo(cb = function(): void { }) { return 0; } +>fnExpressionOnlyOnParam : (cb?: () => void) => number +>function foo(cb = function(): void { }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void { } : () => void +>0 : 0 + + fnArrowOnlyOnParam = (cb = function(): void { }) => "S"; +>fnArrowOnlyOnParam : (cb?: () => void) => string +>(cb = function(): void { }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void { } : () => void +>"S" : "S" + + protected fnExpressionProtectedOnlyOnParam = function foo(cb = function(): void { }) { return 0; } +>fnExpressionProtectedOnlyOnParam : (cb?: () => void) => number +>function foo(cb = function(): void { }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void { } : () => void +>0 : 0 + + protected fnArrowProtectedOnlyOnParam = (cb = function(): void { }) => "S"; +>fnArrowProtectedOnlyOnParam : (cb?: () => void) => string +>(cb = function(): void { }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void { } : () => void +>"S" : "S" + + static fnStaticExpressionOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } +>fnStaticExpressionOnlyOnParam : (cb?: () => void) => number +>function foo(cb = function(): void{ }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void{ } : () => void +>0 : 0 + + static fnStaticArrowOnlyOnParam = (cb = function(): void{ }) => "S"; +>fnStaticArrowOnlyOnParam : (cb?: () => void) => string +>(cb = function(): void{ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void{ } : () => void +>"S" : "S" + + protected static fnStaticExpressionProtectedOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } +>fnStaticExpressionProtectedOnlyOnParam : (cb?: () => void) => number +>function foo(cb = function(): void{ }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void{ } : () => void +>0 : 0 + + protected static fnStaticArrowProtectedOnlyOnParam = (cb = function(): void{ }) => "S"; +>fnStaticArrowProtectedOnlyOnParam : (cb?: () => void) => string +>(cb = function(): void{ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void{ } : () => void +>"S" : "S" + + // Have annotation, so ok + fnExpressionOk = function foo(cb = function(): void { }): number { return 0; } +>fnExpressionOk : (cb?: () => void) => number +>function foo(cb = function(): void { }): number { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void { } : () => void +>0 : 0 + + fnArrowOK = (cb = function(): void { }): string => "S"; +>fnArrowOK : (cb?: () => void) => string +>(cb = function(): void { }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void { } : () => void +>"S" : "S" + + protected fnExpressionProtectedOk = function foo(cb = function(): void { }): number { return 0; } +>fnExpressionProtectedOk : (cb?: () => void) => number +>function foo(cb = function(): void { }): number { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void { } : () => void +>0 : 0 + + protected fnArrowProtectedOK = (cb = function(): void { }): string => "S"; +>fnArrowProtectedOK : (cb?: () => void) => string +>(cb = function(): void { }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void { } : () => void +>"S" : "S" + + static fnStaticExpressionOk = function foo(cb = function(): void{ }): number { return 0; } +>fnStaticExpressionOk : (cb?: () => void) => number +>function foo(cb = function(): void{ }): number { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void{ } : () => void +>0 : 0 + + static fnStaticArrowOk = (cb = function(): void{ }): string => "S"; +>fnStaticArrowOk : (cb?: () => void) => string +>(cb = function(): void{ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void{ } : () => void +>"S" : "S" + + protected static fnStaticExpressionProtectedOk = function foo(cb = function(): void{ }): number { return 0; } +>fnStaticExpressionProtectedOk : (cb?: () => void) => number +>function foo(cb = function(): void{ }): number { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(): void{ } : () => void +>0 : 0 + + protected static fnStaticArrowProtectedOk = (cb = function(): void{ }): string => "S"; +>fnStaticArrowProtectedOk : (cb?: () => void) => string +>(cb = function(): void{ }): string => "S" : (cb?: () => void) => string +>cb : () => void +>function(): void{ } : () => void +>"S" : "S" + + + // No Error, not in declarations + private fnExpressionPrivate = function foo(cb = function(){ }) { return 0; } +>fnExpressionPrivate : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + private fnArrowPrivate = (cb = function(){ }) => "S"; +>fnArrowPrivate : (cb?: () => void) => string +>(cb = function(){ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + #fnArrow = (cb = function(){ }) => "S"; +>#fnArrow : (cb?: () => void) => string +>(cb = function(){ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" + + #fnExpression = function foo(cb = function(){ }) { return 0;} +>#fnExpression : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0;} : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + private static fnStaticExpressionPrivate = function foo(cb = function(){ }) { return 0; } +>fnStaticExpressionPrivate : (cb?: () => void) => number +>function foo(cb = function(){ }) { return 0; } : (cb?: () => void) => number +>foo : (cb?: () => void) => number +>cb : () => void +>function(){ } : () => void +>0 : 0 + + private static fnStaticArrowPrivate = (cb = function(){ }) => "S"; +>fnStaticArrowPrivate : (cb?: () => void) => string +>(cb = function(){ }) => "S" : (cb?: () => void) => string +>cb : () => void +>function(){ } : () => void +>"S" : "S" +} + diff --git a/tests/baselines/reference/isolatedDeclarationLazySymbols.errors.txt b/tests/baselines/reference/isolatedDeclarationLazySymbols.errors.txt new file mode 100644 index 0000000000000..bb46d672d1099 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationLazySymbols.errors.txt @@ -0,0 +1,40 @@ +isolatedDeclarationLazySymbols.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationLazySymbols.ts(13,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationLazySymbols.ts(16,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationLazySymbols.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + + +==== isolatedDeclarationLazySymbols.ts (4 errors) ==== + export function foo() { + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 isolatedDeclarationLazySymbols.ts:1:17: Add a return type to the function declaration. + + } + + const o = { + ["prop.inner"]: "a", + prop: { + inner: "b", + } + } as const + + foo[o["prop.inner"]] ="A"; + foo[o.prop.inner] = "B"; + ~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export class Foo { + [o["prop.inner"]] ="A" + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [o.prop.inner] = "B" + } + + export let oo = { + [o['prop.inner']]:"A", + ~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 isolatedDeclarationLazySymbols.ts:20:12: Add a type annotation to the variable oo. + [o.prop.inner]: "B", + } \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationLazySymbols.js b/tests/baselines/reference/isolatedDeclarationLazySymbols.js new file mode 100644 index 0000000000000..fbcc574d35f63 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationLazySymbols.js @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/isolatedDeclarationLazySymbols.ts] //// + +//// [isolatedDeclarationLazySymbols.ts] +export function foo() { + +} + +const o = { + ["prop.inner"]: "a", + prop: { + inner: "b", + } +} as const + +foo[o["prop.inner"]] ="A"; +foo[o.prop.inner] = "B"; + +export class Foo { + [o["prop.inner"]] ="A" + [o.prop.inner] = "B" +} + +export let oo = { + [o['prop.inner']]:"A", + [o.prop.inner]: "B", +} + +//// [isolatedDeclarationLazySymbols.js] +export function foo() { +} +const o = { + ["prop.inner"]: "a", + prop: { + inner: "b", + } +}; +foo[o["prop.inner"]] = "A"; +foo[o.prop.inner] = "B"; +export class Foo { + [o["prop.inner"]] = "A"[o.prop.inner] = "B"; +} +export let oo = { + [o['prop.inner']]: "A", + [o.prop.inner]: "B", +}; diff --git a/tests/baselines/reference/isolatedDeclarationLazySymbols.symbols b/tests/baselines/reference/isolatedDeclarationLazySymbols.symbols new file mode 100644 index 0000000000000..f2df8038e2c75 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationLazySymbols.symbols @@ -0,0 +1,69 @@ +//// [tests/cases/compiler/isolatedDeclarationLazySymbols.ts] //// + +=== isolatedDeclarationLazySymbols.ts === +export function foo() { +>foo : Symbol(foo, Decl(isolatedDeclarationLazySymbols.ts, 0, 0), Decl(isolatedDeclarationLazySymbols.ts, 9, 10), Decl(isolatedDeclarationLazySymbols.ts, 11, 26)) + +} + +const o = { +>o : Symbol(o, Decl(isolatedDeclarationLazySymbols.ts, 4, 5)) + + ["prop.inner"]: "a", +>["prop.inner"] : Symbol(["prop.inner"], Decl(isolatedDeclarationLazySymbols.ts, 4, 11)) +>"prop.inner" : Symbol(["prop.inner"], Decl(isolatedDeclarationLazySymbols.ts, 4, 11)) + + prop: { +>prop : Symbol(prop, Decl(isolatedDeclarationLazySymbols.ts, 5, 24)) + + inner: "b", +>inner : Symbol(inner, Decl(isolatedDeclarationLazySymbols.ts, 6, 11)) + } +} as const +>const : Symbol(const) + +foo[o["prop.inner"]] ="A"; +>foo : Symbol(foo, Decl(isolatedDeclarationLazySymbols.ts, 0, 0), Decl(isolatedDeclarationLazySymbols.ts, 9, 10), Decl(isolatedDeclarationLazySymbols.ts, 11, 26)) +>o : Symbol(o, Decl(isolatedDeclarationLazySymbols.ts, 4, 5)) +>"prop.inner" : Symbol(["prop.inner"], Decl(isolatedDeclarationLazySymbols.ts, 4, 11)) + +foo[o.prop.inner] = "B"; +>foo : Symbol(foo, Decl(isolatedDeclarationLazySymbols.ts, 0, 0), Decl(isolatedDeclarationLazySymbols.ts, 9, 10), Decl(isolatedDeclarationLazySymbols.ts, 11, 26)) +>o.prop.inner : Symbol(inner, Decl(isolatedDeclarationLazySymbols.ts, 6, 11)) +>o.prop : Symbol(prop, Decl(isolatedDeclarationLazySymbols.ts, 5, 24)) +>o : Symbol(o, Decl(isolatedDeclarationLazySymbols.ts, 4, 5)) +>prop : Symbol(prop, Decl(isolatedDeclarationLazySymbols.ts, 5, 24)) +>inner : Symbol(inner, Decl(isolatedDeclarationLazySymbols.ts, 6, 11)) + +export class Foo { +>Foo : Symbol(Foo, Decl(isolatedDeclarationLazySymbols.ts, 12, 24)) + + [o["prop.inner"]] ="A" +>[o["prop.inner"]] : Symbol(Foo[o["prop.inner"]], Decl(isolatedDeclarationLazySymbols.ts, 14, 18)) +>o : Symbol(o, Decl(isolatedDeclarationLazySymbols.ts, 4, 5)) +>"prop.inner" : Symbol(["prop.inner"], Decl(isolatedDeclarationLazySymbols.ts, 4, 11)) + + [o.prop.inner] = "B" +>o.prop.inner : Symbol(inner, Decl(isolatedDeclarationLazySymbols.ts, 6, 11)) +>o.prop : Symbol(prop, Decl(isolatedDeclarationLazySymbols.ts, 5, 24)) +>o : Symbol(o, Decl(isolatedDeclarationLazySymbols.ts, 4, 5)) +>prop : Symbol(prop, Decl(isolatedDeclarationLazySymbols.ts, 5, 24)) +>inner : Symbol(inner, Decl(isolatedDeclarationLazySymbols.ts, 6, 11)) +} + +export let oo = { +>oo : Symbol(oo, Decl(isolatedDeclarationLazySymbols.ts, 19, 10)) + + [o['prop.inner']]:"A", +>[o['prop.inner']] : Symbol([o['prop.inner']], Decl(isolatedDeclarationLazySymbols.ts, 19, 17)) +>o : Symbol(o, Decl(isolatedDeclarationLazySymbols.ts, 4, 5)) +>'prop.inner' : Symbol(["prop.inner"], Decl(isolatedDeclarationLazySymbols.ts, 4, 11)) + + [o.prop.inner]: "B", +>[o.prop.inner] : Symbol([o.prop.inner], Decl(isolatedDeclarationLazySymbols.ts, 20, 26)) +>o.prop.inner : Symbol(inner, Decl(isolatedDeclarationLazySymbols.ts, 6, 11)) +>o.prop : Symbol(prop, Decl(isolatedDeclarationLazySymbols.ts, 5, 24)) +>o : Symbol(o, Decl(isolatedDeclarationLazySymbols.ts, 4, 5)) +>prop : Symbol(prop, Decl(isolatedDeclarationLazySymbols.ts, 5, 24)) +>inner : Symbol(inner, Decl(isolatedDeclarationLazySymbols.ts, 6, 11)) +} diff --git a/tests/baselines/reference/isolatedDeclarationLazySymbols.types b/tests/baselines/reference/isolatedDeclarationLazySymbols.types new file mode 100644 index 0000000000000..10a376bec89d9 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationLazySymbols.types @@ -0,0 +1,89 @@ +//// [tests/cases/compiler/isolatedDeclarationLazySymbols.ts] //// + +=== isolatedDeclarationLazySymbols.ts === +export function foo() { +>foo : typeof foo + +} + +const o = { +>o : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } +>{ ["prop.inner"]: "a", prop: { inner: "b", }} as const : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } +>{ ["prop.inner"]: "a", prop: { inner: "b", }} : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } + + ["prop.inner"]: "a", +>["prop.inner"] : "a" +>"prop.inner" : "prop.inner" +>"a" : "a" + + prop: { +>prop : { readonly inner: "b"; } +>{ inner: "b", } : { readonly inner: "b"; } + + inner: "b", +>inner : "b" +>"b" : "b" + } +} as const + +foo[o["prop.inner"]] ="A"; +>foo[o["prop.inner"]] ="A" : "A" +>foo[o["prop.inner"]] : any +>foo : typeof foo +>o["prop.inner"] : "a" +>o : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } +>"prop.inner" : "prop.inner" +>"A" : "A" + +foo[o.prop.inner] = "B"; +>foo[o.prop.inner] = "B" : "B" +>foo[o.prop.inner] : string +>foo : typeof foo +>o.prop.inner : "b" +>o.prop : { readonly inner: "b"; } +>o : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } +>prop : { readonly inner: "b"; } +>inner : "b" +>"B" : "B" + +export class Foo { +>Foo : Foo + + [o["prop.inner"]] ="A" +>[o["prop.inner"]] : string +>o["prop.inner"] : "a" +>o : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } +>"prop.inner" : "prop.inner" +>"A" [o.prop.inner] = "B" : "B" +>"A" [o.prop.inner] : any +>"A" : "A" + + [o.prop.inner] = "B" +>o.prop.inner : "b" +>o.prop : { readonly inner: "b"; } +>o : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } +>prop : { readonly inner: "b"; } +>inner : "b" +>"B" : "B" +} + +export let oo = { +>oo : { a: string; b: string; } +>{ [o['prop.inner']]:"A", [o.prop.inner]: "B",} : { a: string; b: string; } + + [o['prop.inner']]:"A", +>[o['prop.inner']] : string +>o['prop.inner'] : "a" +>o : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } +>'prop.inner' : "prop.inner" +>"A" : "A" + + [o.prop.inner]: "B", +>[o.prop.inner] : string +>o.prop.inner : "b" +>o.prop : { readonly inner: "b"; } +>o : { readonly "prop.inner": "a"; readonly prop: { readonly inner: "b"; }; } +>prop : { readonly inner: "b"; } +>inner : "b" +>"B" : "B" +} diff --git a/tests/baselines/reference/isolatedDeclarations.errors.txt b/tests/baselines/reference/isolatedDeclarations.errors.txt new file mode 100644 index 0000000000000..4927acb99073c --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarations.errors.txt @@ -0,0 +1,8 @@ +error TS5053: Option 'outFile' cannot be specified with option 'isolatedDeclarations'. + + +!!! error TS5053: Option 'outFile' cannot be specified with option 'isolatedDeclarations'. +==== file1.ts (0 errors) ==== + export var x; +==== file2.ts (0 errors) ==== + var y; \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarations.js b/tests/baselines/reference/isolatedDeclarations.js new file mode 100644 index 0000000000000..bfbc99c8befae --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarations.js @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/isolatedDeclarations.ts] //// + +//// [file1.ts] +export var x; +//// [file2.ts] +var y; + +//// [all.js] +define("file1", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; +}); +var y; diff --git a/tests/baselines/reference/isolatedDeclarations.symbols b/tests/baselines/reference/isolatedDeclarations.symbols new file mode 100644 index 0000000000000..e427ed1326d70 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarations.symbols @@ -0,0 +1,10 @@ +//// [tests/cases/compiler/isolatedDeclarations.ts] //// + +=== file1.ts === +export var x; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== file2.ts === +var y; +>y : Symbol(y, Decl(file2.ts, 0, 3)) + diff --git a/tests/baselines/reference/isolatedDeclarations.types b/tests/baselines/reference/isolatedDeclarations.types new file mode 100644 index 0000000000000..3b81e85a2941a --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarations.types @@ -0,0 +1,10 @@ +//// [tests/cases/compiler/isolatedDeclarations.ts] //// + +=== file1.ts === +export var x; +>x : any + +=== file2.ts === +var y; +>y : any + diff --git a/tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts b/tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts index 80a6cf04a19aa..151c0e76df6e4 100644 --- a/tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts +++ b/tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts @@ -1,6 +1,7 @@ // @target: es6 // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts export class Q { set bet(arg: DoesNotExist) {} diff --git a/tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts b/tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts index 1bc5ff1eac9c8..8d8e134f4c2c0 100644 --- a/tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts +++ b/tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export var basePrototype = { get primaryPath() { diff --git a/tests/cases/compiler/ambientConstLiterals.ts b/tests/cases/compiler/ambientConstLiterals.ts index d42b8524998fd..011943cf9d2bb 100644 --- a/tests/cases/compiler/ambientConstLiterals.ts +++ b/tests/cases/compiler/ambientConstLiterals.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: We made this is an error, thus the auto-fixer is trying to fix it. Although it's possible syntactically to figure out that E is an enum, I think we should rather make this an error for now. function f(x: T): T { return x; diff --git a/tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts b/tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts index 8431b0b396627..d386fd4787df4 100644 --- a/tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts +++ b/tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts @@ -1,6 +1,7 @@ // @strict: true // @lib: es2020 // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid, already has a cyclic error type type BadFlatArray = {obj: { "done": Arr, "recur": Arr extends ReadonlyArray diff --git a/tests/cases/compiler/booleanFilterAnyArray.ts b/tests/cases/compiler/booleanFilterAnyArray.ts index db5f38e78f9a0..e7a7814ca0ea7 100644 --- a/tests/cases/compiler/booleanFilterAnyArray.ts +++ b/tests/cases/compiler/booleanFilterAnyArray.ts @@ -5,8 +5,8 @@ interface BulleanConstructor { } interface Ari { - filter(cb1: (value: T) => value is S): T extends any ? Ari : Ari; - filter(cb2: (value: T) => unknown): Ari; + filter(cb1: (value: T) => value is S): T extends any ? Ari : Ari; + filter(cb2: (value: T) => unknown): Ari; } declare var Bullean: BulleanConstructor; declare let anys: Ari; diff --git a/tests/cases/compiler/coAndContraVariantInferences.ts b/tests/cases/compiler/coAndContraVariantInferences.ts index 1b0a6cb56db0a..3f22a64165e97 100644 --- a/tests/cases/compiler/coAndContraVariantInferences.ts +++ b/tests/cases/compiler/coAndContraVariantInferences.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type A = { kind: 'a' }; type B = { kind: 'b' }; diff --git a/tests/cases/compiler/commentsFunction.ts b/tests/cases/compiler/commentsFunction.ts index 1b379fd15c67f..c97661b582ddb 100644 --- a/tests/cases/compiler/commentsFunction.ts +++ b/tests/cases/compiler/commentsFunction.ts @@ -1,6 +1,7 @@ // @target: ES5 // @declaration: true // @removeComments: false +// @isolatedDeclarationFixedDiffReason: Printing differences /** This comment should appear for foo*/ function foo() { diff --git a/tests/cases/compiler/commentsVarDecl.ts b/tests/cases/compiler/commentsVarDecl.ts index 23cd8766653f4..17eb5aed75578 100644 --- a/tests/cases/compiler/commentsVarDecl.ts +++ b/tests/cases/compiler/commentsVarDecl.ts @@ -1,6 +1,7 @@ // @target: ES5 // @declaration: true // @removeComments: false +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed /** Variable comments*/ var myVariable = 10; // This trailing Comment1 diff --git a/tests/cases/compiler/complicatedPrivacy.ts b/tests/cases/compiler/complicatedPrivacy.ts index 6fe144d237c80..774a2244f97fc 100644 --- a/tests/cases/compiler/complicatedPrivacy.ts +++ b/tests/cases/compiler/complicatedPrivacy.ts @@ -1,4 +1,5 @@ // @target: es5 + module m1 { export module m2 { diff --git a/tests/cases/compiler/computedEnumTypeWidening.ts b/tests/cases/compiler/computedEnumTypeWidening.ts index 0ccdbfccc6ab1..50f0e66d0fc89 100644 --- a/tests/cases/compiler/computedEnumTypeWidening.ts +++ b/tests/cases/compiler/computedEnumTypeWidening.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Enums are not fixed declare function computed(x: number): number; diff --git a/tests/cases/compiler/computedPropertiesNarrowed.ts b/tests/cases/compiler/computedPropertiesNarrowed.ts new file mode 100644 index 0000000000000..3e052b7ebb7f6 --- /dev/null +++ b/tests/cases/compiler/computedPropertiesNarrowed.ts @@ -0,0 +1,54 @@ +// @target: es2015 +// @isolatedDeclarations: true +// @declaration: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC +// @isolatedDeclarationFixedDiffReason: Invalid computed property can only be detected by TSC + +const x: 0 | 1 = Math.random()? 0: 1; +declare function assert(n: number): asserts n is 1; +assert(x); +export let o = { + [x]: 1 // error narrow type !== declared type +} + + +const y: 0 = 0 +export let o2 = { + [y]: 1 // ok literal computed type +} + +// literals are ok +export let o3 = { [1]: 1 } +export let o31 = { [-1]: 1 } + +export let o32 = { [1-1]: 1 } // error number + +let u = Symbol(); +export let o4 = { + [u]: 1 // Should error, nut a unique symbol +} + +export let o5 ={ + [Symbol()]: 1 // Should error +} + +const uu: unique symbol = Symbol(); +export let o6 = { + [uu]: 1 // Should be ok +} + + +function foo (): 1 { return 1; } +export let o7 = { + [foo()]: 1 // Should error +}; + +let E = { A: 1 } as const +export const o8 = { + [E.A]: 1 // Fresh +} + +function ns() { return { v: 0 } as const } +export const o9 = { + [ns().v]: 1 +} diff --git a/tests/cases/compiler/correlatedUnions.ts b/tests/cases/compiler/correlatedUnions.ts index 460ddf408a104..cb3da13f07577 100644 --- a/tests/cases/compiler/correlatedUnions.ts +++ b/tests/cases/compiler/correlatedUnions.ts @@ -1,5 +1,7 @@ // @strict: true // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types +// @isolatedDeclarationFixedDiffReason: Printing differences // Various repros from #30581 diff --git a/tests/cases/compiler/declFileEmitDeclarationOnly.ts b/tests/cases/compiler/declFileEmitDeclarationOnly.ts index bc6f88ea36492..7a65afd6279ba 100644 --- a/tests/cases/compiler/declFileEmitDeclarationOnly.ts +++ b/tests/cases/compiler/declFileEmitDeclarationOnly.ts @@ -1,5 +1,6 @@ // @declaration: true // @emitDeclarationOnly: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: helloworld.ts const Log = { diff --git a/tests/cases/compiler/declFileEnums.ts b/tests/cases/compiler/declFileEnums.ts index 693dc2711819a..723875bd84350 100644 --- a/tests/cases/compiler/declFileEnums.ts +++ b/tests/cases/compiler/declFileEnums.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Enums are not fixed enum e1 { a, diff --git a/tests/cases/compiler/declarationEmitAliasExportStar.ts b/tests/cases/compiler/declarationEmitAliasExportStar.ts index f556e35aa0b20..0629ae6f288e0 100644 --- a/tests/cases/compiler/declarationEmitAliasExportStar.ts +++ b/tests/cases/compiler/declarationEmitAliasExportStar.ts @@ -1,5 +1,6 @@ // @declaration: true // @filename: thingB.ts +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export interface ThingB { } // @filename: things.ts export * from "./thingB"; diff --git a/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts b/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts index be6fdc13ea0e8..2b2e35b5e6a7d 100644 --- a/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts +++ b/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type LocaleData = Record type ConvertLocaleConfig = Record< string, diff --git a/tests/cases/compiler/declarationEmitBindingPatterns.ts b/tests/cases/compiler/declarationEmitBindingPatterns.ts index 16d380307fd76..6b8b76afc463f 100644 --- a/tests/cases/compiler/declarationEmitBindingPatterns.ts +++ b/tests/cases/compiler/declarationEmitBindingPatterns.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed const k = ({x: z = 'y'}) => { } diff --git a/tests/cases/compiler/declarationEmitBindingPatternsFunctionExpr.ts b/tests/cases/compiler/declarationEmitBindingPatternsFunctionExpr.ts index 42fda3d008873..256a38a7eb8fd 100644 --- a/tests/cases/compiler/declarationEmitBindingPatternsFunctionExpr.ts +++ b/tests/cases/compiler/declarationEmitBindingPatternsFunctionExpr.ts @@ -1,6 +1,7 @@ // @declaration: true // @target: esnext // @skipLibCheck: false +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type Named = { name: string } // Tempting to remove alias if unused diff --git a/tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts b/tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts index a8f20df82a3b9..b0f3b6857de19 100644 --- a/tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts +++ b/tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts @@ -2,6 +2,7 @@ // @declaration: true // @module: amd // @outFile: out/datastore.bundle.js +// @isolatedDeclarationFixedDiffReason: TSC adds type reference directives. // @filename: lib/lib.d.ts declare module "lib/result" { export type Result = (E & Failure) | (T & Success); diff --git a/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts b/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts index 5207d655037fd..a09591b80efdb 100644 --- a/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts +++ b/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: r/node_modules/foo/node_modules/nested/index.d.ts export interface NestedProps {} // @filename: r/node_modules/foo/other/index.d.ts diff --git a/tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts b/tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts index c5ffd0c3a7454..e6e7b7815c5d7 100644 --- a/tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts +++ b/tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts @@ -1,5 +1,6 @@ // @declaration: true // @lib: es6 +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: context.ts export const Key = Symbol(); export interface Context { diff --git a/tests/cases/compiler/declarationEmitComputedNameConstEnumAlias.ts b/tests/cases/compiler/declarationEmitComputedNameConstEnumAlias.ts index 951ec0b0a9d7e..2b3b6eef4c2d7 100644 --- a/tests/cases/compiler/declarationEmitComputedNameConstEnumAlias.ts +++ b/tests/cases/compiler/declarationEmitComputedNameConstEnumAlias.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: EnumExample.ts enum EnumExample { TEST = 'TEST', diff --git a/tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts b/tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts index 9f9461314edf8..ad7ddb8ed9e41 100644 --- a/tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts +++ b/tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TSC adds type reference directives. // @filename: types/component.d.ts declare module '@namespace/component' { export class Foo {} diff --git a/tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts b/tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts index d6638ab8e3641..0fc9f9cf3914b 100644 --- a/tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts +++ b/tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed // @filename: foo.ts export class Foo {} diff --git a/tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts b/tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts index 597497feac0b2..83ae1fed37cab 100644 --- a/tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts +++ b/tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Syntactically invalid. class C1 { constructor(public [x, y, z]: string[]) { } diff --git a/tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts b/tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts index 5f7c8c77f1538..f1faf11d9df6c 100644 --- a/tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts +++ b/tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts @@ -1,5 +1,6 @@ // @declaration: true // @lib: es2020 +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // This function's type is changed on declaration export const fun = ( subFun: () diff --git a/tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts b/tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts index 12f3ce9aa2bc8..cc39a6d2cb9f1 100644 --- a/tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts +++ b/tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts @@ -1,5 +1,6 @@ // @declaration: true // @emitDeclarationOnly: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export const fn1 = ({ prop: a, prop: b }: { prop: number }) => a + b; diff --git a/tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts b/tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts index 09be2a08ff89b..3bc736d11f52c 100644 --- a/tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts +++ b/tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed // @filename: a.ts interface I {} export function f(): I { return null as I; } diff --git a/tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts b/tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts index 79a704ce5bae7..6e5d179505d01 100644 --- a/tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts +++ b/tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export interface Point { readonly x: number; readonly y: number; diff --git a/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts b/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts index 666ea9c2eda11..d563254cd03bf 100644 --- a/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts +++ b/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts @@ -1,5 +1,6 @@ // @lib: es2015 // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: Types.ts type Suit = 'Hearts' | 'Spades' | 'Clubs' | 'Diamonds'; type Rank = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 'Jack' | 'Queen' | 'King'; diff --git a/tests/cases/compiler/declarationEmitExpressionInExtends4.ts b/tests/cases/compiler/declarationEmitExpressionInExtends4.ts index 6b3044f227f5f..07688401605ff 100644 --- a/tests/cases/compiler/declarationEmitExpressionInExtends4.ts +++ b/tests/cases/compiler/declarationEmitExpressionInExtends4.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts function getSomething() { return class D { } diff --git a/tests/cases/compiler/declarationEmitExpressionInExtends7.ts b/tests/cases/compiler/declarationEmitExpressionInExtends7.ts index 8ec46fe1524ae..bdf70be120675 100644 --- a/tests/cases/compiler/declarationEmitExpressionInExtends7.ts +++ b/tests/cases/compiler/declarationEmitExpressionInExtends7.ts @@ -1,2 +1,3 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts export default class extends SomeUndefinedFunction {} diff --git a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts index b42d679b521e8..f713a42bfbe74 100644 --- a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts +++ b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts @@ -1,5 +1,6 @@ // @useCaseSensitiveFilenames: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: /p1/node_modules/typescript-fsa/src/impl.d.ts export function getA(): A; export enum A { diff --git a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts index 5b46de996224c..774edf31d6d4c 100644 --- a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts +++ b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts @@ -1,5 +1,6 @@ // @useCaseSensitiveFilenames: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: /cache/typescript-fsa/src/impl.d.ts export function getA(): A; export enum A { diff --git a/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts b/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts index 5d6268864fe52..bdb0404f5a0b8 100644 --- a/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts +++ b/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts @@ -1,4 +1,6 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TSC adds import for augmentation, DTE can't know about the augmentation. + // @filename: child1.ts import { ParentThing } from './parent'; diff --git a/tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts b/tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts index 317f6b7e5171f..88f06b2b6b40a 100644 --- a/tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts +++ b/tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed function f(a: 0): 0; function f(a: 1): 1; function f(a: 0 | 1) { diff --git a/tests/cases/compiler/declarationEmitFunctionKeywordProp.ts b/tests/cases/compiler/declarationEmitFunctionKeywordProp.ts index c2557e4a8f536..e746ae1a882f5 100644 --- a/tests/cases/compiler/declarationEmitFunctionKeywordProp.ts +++ b/tests/cases/compiler/declarationEmitFunctionKeywordProp.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed function foo() {} foo.null = true; diff --git a/tests/cases/compiler/declarationEmitGlobalThisPreserved.ts b/tests/cases/compiler/declarationEmitGlobalThisPreserved.ts index 95e352fb6fa2f..20cd9c461d988 100644 --- a/tests/cases/compiler/declarationEmitGlobalThisPreserved.ts +++ b/tests/cases/compiler/declarationEmitGlobalThisPreserved.ts @@ -1,5 +1,6 @@ // @declaration: true // @emitDeclarationOnly: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Adding this makes tooltips fail too. // declare global { diff --git a/tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts b/tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts index d95fbf3b64db6..bd144512a35b6 100644 --- a/tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts +++ b/tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts @@ -4,6 +4,7 @@ // @currentDirectory: / // @noImplicitReferences: true // @filename: /deps/dep/dep.d.ts +// @isolatedDeclarationDiffReason: TSC preserves import due to augmentation declare namespace NS { interface Dep { } diff --git a/tests/cases/compiler/declarationEmitIndexTypeNotFound.ts b/tests/cases/compiler/declarationEmitIndexTypeNotFound.ts index de3316cd56f9e..f5490a5450576 100644 --- a/tests/cases/compiler/declarationEmitIndexTypeNotFound.ts +++ b/tests/cases/compiler/declarationEmitIndexTypeNotFound.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts export interface Test { [index: TypeNotFound]: any; diff --git a/tests/cases/compiler/declarationEmitInlinedDistributiveConditional.ts b/tests/cases/compiler/declarationEmitInlinedDistributiveConditional.ts index 3a9f762b3afd9..a715c3ed968ba 100644 --- a/tests/cases/compiler/declarationEmitInlinedDistributiveConditional.ts +++ b/tests/cases/compiler/declarationEmitInlinedDistributiveConditional.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: test.ts import {dropPrivateProps1, dropPrivateProps2} from './api'; const a = dropPrivateProps1({foo: 42, _bar: 'secret'}); // type is {foo: number} diff --git a/tests/cases/compiler/declarationEmitLambdaWithMissingTypeParameterNoCrash.ts b/tests/cases/compiler/declarationEmitLambdaWithMissingTypeParameterNoCrash.ts index 1c5b9890db683..436c21b95ca9e 100644 --- a/tests/cases/compiler/declarationEmitLambdaWithMissingTypeParameterNoCrash.ts +++ b/tests/cases/compiler/declarationEmitLambdaWithMissingTypeParameterNoCrash.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts export interface Foo { preFetch: (c: T1) => void; // Type T2 is not defined preFetcher: new (c: T1) => void; // Type T2 is not defined diff --git a/tests/cases/compiler/declarationEmitLateBoundAssignments.ts b/tests/cases/compiler/declarationEmitLateBoundAssignments.ts index fc90e9486bb6c..5827d837ea461 100644 --- a/tests/cases/compiler/declarationEmitLateBoundAssignments.ts +++ b/tests/cases/compiler/declarationEmitLateBoundAssignments.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed // @target: es6 export function foo() {} foo.bar = 12; diff --git a/tests/cases/compiler/declarationEmitLateBoundAssignments2.ts b/tests/cases/compiler/declarationEmitLateBoundAssignments2.ts index 2697b3f7c016a..da1c9a865da80 100644 --- a/tests/cases/compiler/declarationEmitLateBoundAssignments2.ts +++ b/tests/cases/compiler/declarationEmitLateBoundAssignments2.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @target: es6 +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed // https://github.com/microsoft/TypeScript/issues/54811 diff --git a/tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts b/tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts index b65480ea89b84..dc856a13a60c0 100644 --- a/tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts +++ b/tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts // @filename: /Helpers.ts export type StringKeyOf = Extract; diff --git a/tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts b/tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts index cc6118802d8a3..b65d76f2b883f 100644 --- a/tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts +++ b/tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @filename: a.d.ts +// @isolatedDeclarationFixedDiffReason: There will be separate TS error on 'timestamp', but fixer does not know about this so it'll try to fix the missing type. export declare const timestampSymbol: unique symbol; export declare const Timestamp: { diff --git a/tests/cases/compiler/declarationEmitNameConflicts3.ts b/tests/cases/compiler/declarationEmitNameConflicts3.ts index 6edc1056fa2de..e90c433638769 100644 --- a/tests/cases/compiler/declarationEmitNameConflicts3.ts +++ b/tests/cases/compiler/declarationEmitNameConflicts3.ts @@ -1,5 +1,6 @@ // @declaration: true // @module: commonjs +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed module M { export interface D { } export module D { diff --git a/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts b/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts index 020fd785c40d9..53a1462d44d5d 100644 --- a/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts +++ b/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts @@ -1,4 +1,6 @@ // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types +// @isolatedDeclarationFixedDiffReason: Printing differences export enum Test { A, B, C } diff --git a/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts b/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts index e83dffc3b21d2..3e1af36893965 100644 --- a/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts +++ b/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts @@ -1,6 +1,7 @@ // @target: es6 // @module: commonjs // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts interface Statics { "$$whatever": string; diff --git a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts index 6fce3256fa6a3..102ec84632eda 100644 --- a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts +++ b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts @@ -1,6 +1,8 @@ // @strict: true // @declaration: true // @emitDeclarationOnly: true +// @isolatedDeclarationFixedDiffReason: TS merges accessors with the same type. DTE can only merge if one type is specified. +// @isolatedDeclarationDiffReason: TS merges accessors with the same type. DTE can only merge if one type is specified. // same type accessors export const obj1 = { diff --git a/tests/cases/compiler/declarationEmitOptionalMethod.ts b/tests/cases/compiler/declarationEmitOptionalMethod.ts index 708a6852e4b95..337f09f477e4e 100644 --- a/tests/cases/compiler/declarationEmitOptionalMethod.ts +++ b/tests/cases/compiler/declarationEmitOptionalMethod.ts @@ -1,5 +1,6 @@ // @declaration: true // @strictNullChecks: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export const Foo = (opts: { a?(): void, b?: () => void, diff --git a/tests/cases/compiler/declarationEmitParameterProperty.ts b/tests/cases/compiler/declarationEmitParameterProperty.ts index 107d192fe88b7..6528c1e037604 100644 --- a/tests/cases/compiler/declarationEmitParameterProperty.ts +++ b/tests/cases/compiler/declarationEmitParameterProperty.ts @@ -1,5 +1,6 @@ // @strictNullChecks: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export class Foo { constructor(public bar?: string) { } diff --git a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts index 4bb09d93c4486..86e2702ca85ba 100644 --- a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts +++ b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts @@ -3,6 +3,7 @@ // @baseUrl: . // @outDir: ./dist // @rootDir: ./src +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: src/lib/operators/scalar.ts export interface Scalar { (): string; diff --git a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts index ad40e87fffe32..2d9a88b306013 100644 --- a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts +++ b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts @@ -4,6 +4,7 @@ // @module: amd // @outFile: ./dist.js // @rootDir: ./src +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: src/lib/operators/scalar.ts export interface Scalar { (): string; diff --git a/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts b/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts index b5692f9d4cc56..25a59eb01fbc6 100644 --- a/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts +++ b/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts @@ -1,4 +1,6 @@ // @declaration: true +// @isolatedDeclarationDiffReason: Computed property are not resolved +// @isolatedDeclarationFixedDiffReason: Printing differences // https://github.com/microsoft/TypeScript/issues/55292 diff --git a/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts b/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts index cf1760806ae5a..c39fcb6fa664e 100644 --- a/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts +++ b/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts @@ -1,5 +1,6 @@ // @declaration: true // @lib: es2015 +// @isolatedDeclarationFixedDiffReason: There will be separate TS error on 'spread', but fixer does not know about this so it'll try to fix the missing type. // @filename: bug.ts export const SYMBOL = Symbol() diff --git a/tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts b/tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts index 2a44661ab6fdf..7e1f9a69d101e 100644 --- a/tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts +++ b/tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts @@ -1,5 +1,6 @@ // @declaration: true // @filename: input.d.ts +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type _BuildPowersOf2LengthArrays< Length extends number, diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts index a75d82d0ddd77..e41e6bee31460 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: monorepo/pkg1/dist/index.d.ts export * from './types'; // @filename: monorepo/pkg1/dist/types.d.ts diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts index b3e66832e7062..c86275ebb9fd9 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts @@ -1,4 +1,5 @@ // @filename: monorepo/pkg1/dist/index.d.ts +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. export * from './types'; // @filename: monorepo/pkg1/dist/types.d.ts export declare type A = { diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts index d9ee4d1f0fdcf..9734526147fab 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: monorepo/pkg1/dist/index.d.ts export * from './types'; // @filename: monorepo/pkg1/dist/types.d.ts diff --git a/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts b/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts index 53901083758d0..35b272ac628b2 100644 --- a/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts +++ b/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed /** * comment1 * @param p diff --git a/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts b/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts index 7c7058030f90f..597fbb423db21 100644 --- a/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts +++ b/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @module: nodenext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: node_modules/react-select/index.d.ts export type Whatever = {x: string, y: number}; export type Props = Omit & Partial & T; diff --git a/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts b/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts index ac29eeb9d8093..7bf466434ee87 100644 --- a/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts +++ b/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts @@ -1,4 +1,6 @@ // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types +// @isolatedDeclarationFixedDiffReason: Printing differences // Any instance type type Client = string diff --git a/tests/cases/compiler/declarationEmitTupleRestSignatureLeadingVariadic.ts b/tests/cases/compiler/declarationEmitTupleRestSignatureLeadingVariadic.ts index edbce8ce09c5b..95630f46638d0 100644 --- a/tests/cases/compiler/declarationEmitTupleRestSignatureLeadingVariadic.ts +++ b/tests/cases/compiler/declarationEmitTupleRestSignatureLeadingVariadic.ts @@ -1,2 +1,3 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed const f = (...args: [...TFirstArgs, TLastArg]): void => {}; \ No newline at end of file diff --git a/tests/cases/compiler/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.ts b/tests/cases/compiler/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.ts index 07b3b01e1cfc1..a30c61f83c766 100644 --- a/tests/cases/compiler/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.ts +++ b/tests/cases/compiler/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.ts @@ -1,3 +1,4 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts type A = {} \ No newline at end of file diff --git a/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts index ff9042af69968..b107e8ce27a8a 100644 --- a/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts +++ b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export type Bar = () => [X, Y]; export type Foo = Bar; diff --git a/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts index de94ad4998d71..cb1a3b447abee 100644 --- a/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts +++ b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export type Bar = () => [X, Y, Z]; export type Baz = Bar; diff --git a/tests/cases/compiler/declarationEmitTypeParameterNameInOuterScope.ts b/tests/cases/compiler/declarationEmitTypeParameterNameInOuterScope.ts index 10e18f43d4d84..cbd7ce6cc2461 100644 --- a/tests/cases/compiler/declarationEmitTypeParameterNameInOuterScope.ts +++ b/tests/cases/compiler/declarationEmitTypeParameterNameInOuterScope.ts @@ -1,5 +1,6 @@ // @declaration: true // @skipLibCheck: false +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed class A { } diff --git a/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts b/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts index 2c0b6bffd7fe8..444bef3c2ffa1 100644 --- a/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts +++ b/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts @@ -1,5 +1,6 @@ // @declaration: true // @skipLibCheck: false +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export const foo = (x: T) => { const inner = (y: T) => [x, y] as const; diff --git a/tests/cases/compiler/declarationEmitUnknownImport.ts b/tests/cases/compiler/declarationEmitUnknownImport.ts index 9f6344322bcc3..97a8283142ebf 100644 --- a/tests/cases/compiler/declarationEmitUnknownImport.ts +++ b/tests/cases/compiler/declarationEmitUnknownImport.ts @@ -1,6 +1,7 @@ // @target: es5 // @module: commonjs // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts import Foo = SomeNonExistingName export {Foo} \ No newline at end of file diff --git a/tests/cases/compiler/declarationEmitUsingAlternativeContainingModules1.ts b/tests/cases/compiler/declarationEmitUsingAlternativeContainingModules1.ts index e497819e07e38..8225690acd1a2 100644 --- a/tests/cases/compiler/declarationEmitUsingAlternativeContainingModules1.ts +++ b/tests/cases/compiler/declarationEmitUsingAlternativeContainingModules1.ts @@ -3,6 +3,7 @@ // @module: nodenext // @moduleResolution: nodenext // @target: esnext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh.d.ts type QueryKey = ReadonlyArray; diff --git a/tests/cases/compiler/declarationEmitUsingAlternativeContainingModules2.ts b/tests/cases/compiler/declarationEmitUsingAlternativeContainingModules2.ts index 7d29e551f5157..faf57c26974f1 100644 --- a/tests/cases/compiler/declarationEmitUsingAlternativeContainingModules2.ts +++ b/tests/cases/compiler/declarationEmitUsingAlternativeContainingModules2.ts @@ -3,6 +3,7 @@ // @module: nodenext // @moduleResolution: nodenext // @target: esnext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh.d.ts type QueryKey = ReadonlyArray; diff --git a/tests/cases/compiler/declarationEmitUsingTypeAlias1.ts b/tests/cases/compiler/declarationEmitUsingTypeAlias1.ts index 257a82e3e32bc..30a631b8d277a 100644 --- a/tests/cases/compiler/declarationEmitUsingTypeAlias1.ts +++ b/tests/cases/compiler/declarationEmitUsingTypeAlias1.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @module: nodenext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: node_modules/some-dep/dist/inner.d.ts export declare type Other = { other: string }; diff --git a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts index 868bad4484783..4ee068e5e8620 100644 --- a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts +++ b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts @@ -1,5 +1,7 @@ // @declaration: true // @target: es5 +// @isolatedDeclarationDiffReason: Computed property are not resolved +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: other.ts type Experiment = { diff --git a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts index 8feeaa2fa61dc..e6088a2bf2279 100644 --- a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts +++ b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts @@ -1,5 +1,7 @@ // @declaration: true // @target: es5 +// @isolatedDeclarationDiffReason: Computed property are not resolved +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: other.ts type Experiment = { diff --git a/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts b/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts index 5839eda9e19d9..67e141da2db22 100644 --- a/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts +++ b/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: /p1/node_modules/csv-parse/lib/index.d.ts export function bar(): number; // @filename: /p1/node_modules/csv-parse/package.json diff --git a/tests/cases/compiler/declarationFileOverwriteError.ts b/tests/cases/compiler/declarationFileOverwriteError.ts index b7ecb6540028c..fb17f52500973 100644 --- a/tests/cases/compiler/declarationFileOverwriteError.ts +++ b/tests/cases/compiler/declarationFileOverwriteError.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts // @Filename: a.d.ts declare class c { diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences2.ts b/tests/cases/compiler/declarationFilesWithTypeReferences2.ts index 0514895563774..ab865fc85b549 100644 --- a/tests/cases/compiler/declarationFilesWithTypeReferences2.ts +++ b/tests/cases/compiler/declarationFilesWithTypeReferences2.ts @@ -1,6 +1,7 @@ // @types: node // @declaration: true // @currentDirectory: / +// @isolatedDeclarationDiffReason: TSC adds type reference directives. // @filename: /node_modules/@types/node/index.d.ts interface Error2 { diff --git a/tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts b/tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts index 22da11c4ba0be..3bb02dbe4a331 100644 --- a/tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts +++ b/tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts @@ -1,5 +1,6 @@ // @declaration: true // @lib: dom,es6 +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: dom.ts export type DOMNode = Node; // @filename: custom.ts diff --git a/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts b/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts index 777b3c3ccb2db..39c941499d22b 100644 --- a/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts +++ b/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts @@ -1,5 +1,6 @@ // @declaration: true // @lib: es6 +// @isolatedDeclarationFixedDiffReason: Type expansion of infinite type becomes different, but both are technically the same type // Note that both of the following have an `any` in their return type from where we bottom out the type printout // for having too many instances of the same symbol nesting. diff --git a/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts b/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts index bbedf61c6dfc5..76c68dab6cfa2 100644 --- a/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts +++ b/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts @@ -1,5 +1,5 @@ -// @noemithelpers: true -// @experimentaldecorators: true +// @noemithelpers: true +// @experimentaldecorators: true // @emitdecoratormetadata: true // @target: es5 // @module: commonjs @@ -23,4 +23,4 @@ class MyClass { this.db.doSomething(); } } -export {MyClass}; +export {MyClass}; diff --git a/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts b/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts index d2e167c83a350..440e543d6f986 100644 --- a/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts +++ b/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts @@ -1,5 +1,6 @@ // @strictNullChecks: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed function f(addUndefined1 = "J", addUndefined2?: number) { return addUndefined1.length + (addUndefined2 || 0); } diff --git a/tests/cases/compiler/dynamicNames.ts b/tests/cases/compiler/dynamicNames.ts index 3380dc8d9def7..1907828e27b34 100644 --- a/tests/cases/compiler/dynamicNames.ts +++ b/tests/cases/compiler/dynamicNames.ts @@ -2,6 +2,8 @@ // @lib: esnext // @module: commonjs // @declaration: true +// @isolatedDeclarationDiffReason: Computed property are not resolved +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: module.ts export const c0 = "a"; export const c1 = 1; diff --git a/tests/cases/compiler/dynamicNamesErrors.ts b/tests/cases/compiler/dynamicNamesErrors.ts index 9187f5bab467a..1ed14f5c6d23f 100644 --- a/tests/cases/compiler/dynamicNamesErrors.ts +++ b/tests/cases/compiler/dynamicNamesErrors.ts @@ -2,6 +2,7 @@ // @module: commonjs // @declaration: true // @useDefineForClassFields: false +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed const c0 = "1"; const c1 = 1; diff --git a/tests/cases/compiler/emitClassExpressionInDeclarationFile.ts b/tests/cases/compiler/emitClassExpressionInDeclarationFile.ts index f99bcbd7efdaa..c72818c6ad7e5 100644 --- a/tests/cases/compiler/emitClassExpressionInDeclarationFile.ts +++ b/tests/cases/compiler/emitClassExpressionInDeclarationFile.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Can't fix class expressions export var simpleExample = class { static getTags() { } tags() { } diff --git a/tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts b/tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts index 3175f2afce7df..4c18e306e2d43 100644 --- a/tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts +++ b/tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Can't fix class expressions export var noPrivates = class { static getTags() { } tags() { } diff --git a/tests/cases/compiler/emitMethodCalledNew.ts b/tests/cases/compiler/emitMethodCalledNew.ts index 0bc59c9a54e50..5c98dbe02ecc9 100644 --- a/tests/cases/compiler/emitMethodCalledNew.ts +++ b/tests/cases/compiler/emitMethodCalledNew.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Source maps difference. // https://github.com/microsoft/TypeScript/issues/55075 diff --git a/tests/cases/compiler/es6ImportNamedImportWithExport.ts b/tests/cases/compiler/es6ImportNamedImportWithExport.ts index 9643a82b9b9cc..645e6397012fe 100644 --- a/tests/cases/compiler/es6ImportNamedImportWithExport.ts +++ b/tests/cases/compiler/es6ImportNamedImportWithExport.ts @@ -1,5 +1,6 @@ // @module: commonjs // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: server.ts export var a = 10; diff --git a/tests/cases/compiler/expandoFunctionBlockShadowing.ts b/tests/cases/compiler/expandoFunctionBlockShadowing.ts index e55499a33de9b..b9cf1b920eb84 100644 --- a/tests/cases/compiler/expandoFunctionBlockShadowing.ts +++ b/tests/cases/compiler/expandoFunctionBlockShadowing.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed // https://github.com/microsoft/TypeScript/issues/56538 diff --git a/tests/cases/compiler/expandoFunctionNestedAssigments.ts b/tests/cases/compiler/expandoFunctionNestedAssigments.ts new file mode 100644 index 0000000000000..8095247f72e07 --- /dev/null +++ b/tests/cases/compiler/expandoFunctionNestedAssigments.ts @@ -0,0 +1,55 @@ +// @lib: esnext +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed +// @declaration: true + +function Foo(): void { + +} +let d: number = (Foo.inVariableInit = 1); + + +function bar(p = (Foo.inNestedFunction = 1)) { + +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + +if(Foo.fromIf = 1) { + Foo.inIf = 1; +} + +while(Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } +} + +do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } +} while(Foo.fromDoCondition = 1); + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } +} + +for(let f of (Foo.forOf = []) ){ + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } +} + + +for(let f in (Foo.forIn = []) ){ + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/expandoFunctionNestedAssigmentsDeclared.ts b/tests/cases/compiler/expandoFunctionNestedAssigmentsDeclared.ts new file mode 100644 index 0000000000000..a0375921bf6b5 --- /dev/null +++ b/tests/cases/compiler/expandoFunctionNestedAssigmentsDeclared.ts @@ -0,0 +1,74 @@ +// @lib: esnext +// @declaration: true + +function Foo(): void { + +} +declare namespace Foo { + var bla: { + foo: number; + }; + var baz: number; + var bar: number; + var fromIf: number; + var inIf: number; + var fromWhileCondition: number; + var fromWhileBody: number; + var fromWhileBodyNested: number; + var fromDoBody: number; + var fromDoBodyNested: number; + var fromDoCondition: number; + var forInit: number; + var forCond: number; + var fromForBody: number; + var fromForBodyNested: number; + var forIncr: number; + var forOf: any[]; + var fromForOfBody: number; + var fromForOfBodyNested: number; + var forIn: any[]; + var fromForInBody: number; + var fromForInBodyNested: number; +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + +if(Foo.fromIf = 1) { + Foo.inIf = 1; +} + +while(Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } +} + +do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } +} while(Foo.fromDoCondition = 1); + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } +} + +for(let f of (Foo.forOf = []) ){ + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } +} + + +for(let f in (Foo.forIn = []) ){ + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts b/tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts index 72ac174b04418..28ed7b58ea17e 100644 --- a/tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts +++ b/tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts // @Filename: /node_modules/foo/index.d.ts export = foo; diff --git a/tests/cases/compiler/fakeInfinity2.ts b/tests/cases/compiler/fakeInfinity2.ts index a2666a5be527a..08a2e3bb0f735 100644 --- a/tests/cases/compiler/fakeInfinity2.ts +++ b/tests/cases/compiler/fakeInfinity2.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts export enum Foo { A = 1e999, diff --git a/tests/cases/compiler/fakeInfinity3.ts b/tests/cases/compiler/fakeInfinity3.ts index 536a48e477e0e..938e33354aab5 100644 --- a/tests/cases/compiler/fakeInfinity3.ts +++ b/tests/cases/compiler/fakeInfinity3.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts export enum Foo { A = 1e999, diff --git a/tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts b/tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts index 007adbe342c24..29be68bbf8b75 100644 --- a/tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts +++ b/tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @target: esnext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Repro from #43493 diff --git a/tests/cases/compiler/genericDefaultsErrors.ts b/tests/cases/compiler/genericDefaultsErrors.ts index 9cdba888327c4..bfbbd6cd97883 100644 --- a/tests/cases/compiler/genericDefaultsErrors.ts +++ b/tests/cases/compiler/genericDefaultsErrors.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts declare const x: any; diff --git a/tests/cases/compiler/giant.ts b/tests/cases/compiler/giant.ts index a7618cd56e2db..1c00e15e76a09 100644 --- a/tests/cases/compiler/giant.ts +++ b/tests/cases/compiler/giant.ts @@ -1,5 +1,7 @@ //@module: amd // @declaration: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC +// @isolatedDeclarationFixedDiffReason: Invalid computed property can only be detected by TSC /* Prefixes diff --git a/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts b/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts index 207d4998cccce..b226684183a72 100644 --- a/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts +++ b/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts @@ -1,4 +1,7 @@ // @declaration: true +// @forceDtsEmit: false +// @isolatedDeclarationDiffReason: Semantically invalid. TSC does not emit .d.ts +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; type manyprops = `${props}${props}`; diff --git a/tests/cases/compiler/importTypeGenericArrowTypeParenthesized.ts b/tests/cases/compiler/importTypeGenericArrowTypeParenthesized.ts index d8a212b1e8674..585407c754bec 100644 --- a/tests/cases/compiler/importTypeGenericArrowTypeParenthesized.ts +++ b/tests/cases/compiler/importTypeGenericArrowTypeParenthesized.ts @@ -1,5 +1,6 @@ // @declaration: true // @filename: module.d.ts +// @isolatedDeclarationFixedDiffReason: TSC adds type reference directives. declare module "module" { export interface Modifier { } diff --git a/tests/cases/compiler/intrinsics.ts b/tests/cases/compiler/intrinsics.ts index 2391e45e83b3a..e50d8cafe32aa 100644 --- a/tests/cases/compiler/intrinsics.ts +++ b/tests/cases/compiler/intrinsics.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts var hasOwnProperty: hasOwnProperty; // Error diff --git a/tests/cases/compiler/isolatedDeclarationBinderConditionalTypes.ts b/tests/cases/compiler/isolatedDeclarationBinderConditionalTypes.ts new file mode 100644 index 0000000000000..f0796a4240a01 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationBinderConditionalTypes.ts @@ -0,0 +1,48 @@ +// @declaration: true +// @target: ESNext + +type TA = string; +type UA = string; +export type Conditional = UA extends infer TA ? TA: never; + + +type TF = string; +type UF = string; +export function test(o: UF extends infer TF ? TF: never): UF extends infer TF ? TF: never { + return null! +} + +type TC = string; +type UC = string; +export class C { + member!: UC extends infer TC ? TC: never + get accessor(): UC extends infer TC ? TC: never { + return null! + } + set accessor(value: UC extends infer TC ? TC: never) { + + } + constructor(p: UC extends infer TC ? TC: never) { + return null!; + } + method(p: UC extends infer TC ? TC: never): UC extends infer TC ? TC: never { + return null!; + } +} + +type TI = string; +type UI = string; +export interface I { + member: UI extends infer TI ? TI: never + method(p: UI extends infer TI ? TI: never): UI extends infer TI ? TI: never; + new (p: UI extends infer TI ? TI: never): UI extends infer TI ? TI: never; +} + + + +type T2 = {} +export type Prepend = + T extends unknown ? + ((arg: Elm, ...rest: T) => void) extends ((...args: infer T2) => void) ? T2 : + never : + never; \ No newline at end of file diff --git a/tests/cases/compiler/isolatedDeclarationBinderSignatures.ts b/tests/cases/compiler/isolatedDeclarationBinderSignatures.ts new file mode 100644 index 0000000000000..64f814a96ef40 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationBinderSignatures.ts @@ -0,0 +1,99 @@ +// @declaration: true +// @target: ESNext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed +type N = "not used"; +const N = "not used" +export type F = () => N; + +export const fn = (): N => { + return null!; +} +export const fn2 = (p: N): void => { + return null! +} + + +export module M1 { + export type N = T extends T? N : never; + export function N(): typeof N { + return N + } +} + +export module M2 { + export interface N { + child: N + m(): N; + get X(): N + set X(value: N); + } +} + +export module M3 { + export interface N { + [n: string]: N + } +} +export module M3 { + export class N { child: N } + export function fn(): N { + return new N(); + } +} +export module M4 { + export module N { + export function fn(): typeof N { + return N; + } + } +} + + +export const fn3 = function (p: N): void { + +} + +export const fn4 = function (): { name: N } { + return null!; +} + +export interface I { + (): N; + new (): N + m(): N; +} + +export interface I2 { + [n: string]: N +} + +export interface I1 { + (): N; + new (): N + m(): N; +} + + +export interface I { + (): N; + new (): N + m(): N; +} + +export class C { + constructor(n: N) { + + } + m(): N { + return null!; + } + get N(): N { return null! } + set N(value) { } +} + +export class C2 { + m(): N { + return null!; + } +} + diff --git a/tests/cases/compiler/isolatedDeclarationErrors.ts b/tests/cases/compiler/isolatedDeclarationErrors.ts new file mode 100644 index 0000000000000..1edab83eaa506 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrors.ts @@ -0,0 +1,13 @@ +// @declaration: true +// @isolatedDeclarations: true +// @isolatedDeclarationFixedDiffReason: Can't auto-fix expando functions. +// @target: ESNext + +function errorOnAssignmentBelowDecl(): void {} +errorOnAssignmentBelowDecl.a = ""; + +const errorOnAssignmentBelow = (): void => {} +errorOnAssignmentBelow.a = ""; + +const errorOnMissingReturn = () => {} +errorOnMissingReturn.a = ""; diff --git a/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts b/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts new file mode 100644 index 0000000000000..3744ef442dd74 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts @@ -0,0 +1,65 @@ +// @declaration: true +// @isolatedDeclarations: true +// @declarationMap: false +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC +// @isolatedDeclarationFixedDiffReason: Invalid computed property can only be detected by TSC +// @strict: true +// @target: ESNext + +export class Cls { + + field = 1 + 1; + method() {} + + methodOk(): void {} + + methodParams(p): void {} + methodParams2(p = 1 + 1): void {} + + get getOnly() { return 0 } + set setOnly(value) { } + + get getSetBad() { return 0 } + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } +} + +let noAnnotationStringName: string = "noAnnotationStringName"; +let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + +const noAnnotationLiteralName = "noAnnotationLiteralName"; +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + +export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName]() { return 0;} + + set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + +} + +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} \ No newline at end of file diff --git a/tests/cases/compiler/isolatedDeclarationErrorsDefault.ts b/tests/cases/compiler/isolatedDeclarationErrorsDefault.ts new file mode 100644 index 0000000000000..6493db7efff73 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsDefault.ts @@ -0,0 +1,25 @@ +// @declaration: true +// @isolatedDeclarations: true +// @declarationMap: false +// @strict: true +// @target: ESNext + +// @fileName: a.ts +export default 1 + 1; + + +// @fileName: b.ts +export default { foo: 1 + 1 }; + +// @fileName: c.ts +export default [{ foo: 1 + 1 }]; + +// @fileName: d.ts +export default [{ foo: 1 + 1 }] as const; + +// @fileName: e.ts +export default [{ foo: 1 + 1 }] as const; + +// @fileName: f.ts +const a = { foo: 1 }; +export default a; \ No newline at end of file diff --git a/tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts b/tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts new file mode 100644 index 0000000000000..2afd232fdb232 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts @@ -0,0 +1,15 @@ +// @declaration: true +// @isolatedDeclarations: true +// @declarationMap: false +// @target: ESNext +// @isolatedDeclarationFixedDiffReason: Expando function declarations are not fixed. + +export function foo() {} + +foo.apply = () => {} +foo.call = ()=> {} +foo.bind = ()=> {} +foo.caller = ()=> {} +foo.toString = ()=> {} +foo.length = 10 +foo.length = 10 diff --git a/tests/cases/compiler/isolatedDeclarationErrorsExpressions.ts b/tests/cases/compiler/isolatedDeclarationErrorsExpressions.ts new file mode 100644 index 0000000000000..f61cee72df597 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsExpressions.ts @@ -0,0 +1,142 @@ +// @declaration: true +// @isolatedDeclarations: true +// @declarationMap: false +// @strict: true +// @target: ESNext + +declare function time(): bigint +export const numberConst = 1; +export const numberConstBad1 = 1 + 1; +export const numberConstBad2 = Math.random(); +export const numberConstBad3 = numberConst; + +export const bigIntConst = 1n; +export const bigIntConstBad1 = 1n + 1n; +export const bigIntConstBad2 = time(); +export const bigIntConstBad3 = bigIntConst; + +export const stringConst = "s"; +export const stringConstBad = "s" + "s"; + +// These are just strings +export const templateConstOk1 = `s`; +export const templateConstOk2 = `s${1n}`; +export const templateConstOk3 = `s${1} - ${"S"}`; +export const templateConstOk4 = `s${1} - ${"S"} - ${false}`; +export const templateConstOk5 = `s${1 + 1} - ${"S"} - ${!false}`; + +export let numberLet = 1; +export let numberLetBad1 = 1 + 1; +export let numberLetBad2 = Math.random(); +export let numberLetBad3 = numberLet; + +export let bigIntLet = 1n; +export let bigIntLetBad1 = 1n + 1n; +export let bigIntLetBad2 = time(); +export let bigIntLetBad3 = bigIntLet; + +export let stringLet = "s"; +export let stringLetBad = "s" + "s"; + +export let templateLetOk1 = `s`; +export let templateLetOk2 = `s${1} - ${"S"}`; +export let templateLetOk3 = `s${1} - ${"S"} - ${false}`; +export let templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + +// As const + +export let numberLetAsConst = 1 as const; + +export let bigIntLetAsConst = 1n as const; + +export let stringLetAsConst = "s" as const; + +export let templateLetOk1AsConst = `s` as const; +export let templateLetOk2AsConst = `s${1} - ${"S"}` as const; +export let templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; +export let templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; + +export let arr = [1, 2, 3]; +export let arrConst = [1, 2, 3] as const; +export let arrWithSpread = [1, 2, 3, ...arr] as const; + +export class Exported { + public numberLet = 1; + public numberLetBad1 = 1 + 1; + public numberLetBad2 = Math.random(); + public numberLetBad3 = numberLet; + + public bigIntLet = 1n; + public bigIntLetBad1 = 1n + 1n; + public bigIntLetBad2 = time(); + public bigIntLetBad3 = bigIntLet; + + public stringLet = "s"; + public stringLetBad = "s" + "s"; + + public templateLetOk1 = `s`; + public templateLetOk2 = `s${1} - ${"S"}`; + public templateLetOk3 = `s${1} - ${"S"} - ${false}`; + public templateLetOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + + + readonly numberConst = 1; + readonly numberConstBad1 = 1 + 1; + readonly numberConstBad2 = Math.random(); + readonly numberConstBad3 = numberConst; + + readonly bigIntConst = 1n; + readonly bigIntConstBad1 = 1n + 1n; + readonly bigIntConstBad2 = time(); + readonly bigIntConstBad3 = bigIntConst; + + readonly stringConst = "s"; + readonly stringConstBad = "s" + "s"; + + readonly templateConstOk1 = `s`; + readonly templateConstOk2 = `s${1} - ${"S"}`; + readonly templateConstOk3 = `s${1} - ${"S"} - ${false}`; + readonly templateConstOk4 = `s${1 + 1} - ${"S"} - ${!false}`; + + numberLetAsConst = 1 as const; + + bigIntLetAsConst = 1n as const; + + stringLetAsConst = "s" as const; + + templateLetOk1AsConst = `s` as const; + templateLetOk2AsConst = `s${1} - ${"S"}` as const; + templateLetOk3AsConst = `s${1} - ${"S"} - ${false}` as const; + templateLetOk4AsConst = `s${1 + 1} - ${"S"} - ${!false}` as const; + +} + +export function numberParam(p = 1): void { }; +export function numberParamBad1(p = 1 + 1): void { }; +export function numberParamBad2(p = Math.random()): void { }; +export function numberParamBad3(p = numberParam): void { }; + +export function bigIntParam(p = 1n): void { }; +export function bigIntParamBad1(p = 1n + 1n): void { }; +export function bigIntParamBad2(p = time()): void { }; +export function bigIntParamBad3(p = bigIntParam): void { }; + +export function stringParam(p = "s"): void { }; +export function stringParamBad(p = "s" + "s"): void { }; + +export function templateParamOk1(p = `s`): void { }; +export function templateParamOk2(p = `s${1} - ${"S"}`): void { }; +export function templateParamOk3(p = `s${1} - ${"S"} - ${false}`): void { }; +export function templateParamOk4(p = `s${1 + 1} - ${"S"} - ${!false}`): void { }; + + +export const { a } = { a: 1 }; +export const [, , b = 1]: [number, number, number | undefined] = [0, 1, 2]; + +export function foo([, , b]: [ + number, + number, + number +] = [0, 1, 2]): void { + +} \ No newline at end of file diff --git a/tests/cases/compiler/isolatedDeclarationErrorsFunctionDeclarations.ts b/tests/cases/compiler/isolatedDeclarationErrorsFunctionDeclarations.ts new file mode 100644 index 0000000000000..b905981eceffc --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsFunctionDeclarations.ts @@ -0,0 +1,14 @@ +// @declaration: true +// @isolatedDeclarations: true +// @declarationMap: false +// @target: ESNext + +export function noReturn() {} + +export function noParamAnnotation(p): void {} + +export function noParamAnnotationDefault(p = 1): void {} + +export function noParamAnnotationBadDefault(p = 1 + 1, p2 = { a: 1 + 1 }, p3 = [1 + 1] as const): void {} + +export function noParamAnnotationBadDefault2(p = { a: 1 + 1 }): void {} diff --git a/tests/cases/compiler/isolatedDeclarationErrorsObjects.ts b/tests/cases/compiler/isolatedDeclarationErrorsObjects.ts new file mode 100644 index 0000000000000..cbd3cbb36b028 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsObjects.ts @@ -0,0 +1,97 @@ +// @declaration: true +// @isolatedDeclarations: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC +// @isolatedDeclarationFixedDiffReason: Accessors are not unified in DTE +// @declarationMap: false +// @strict: true +// @target: ESNext + +export let o = { + a: 1, + b: "" +} + +export let oBad = { + a: Math.random(), +} +export const V = 1; +export let oBad2 = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } +} + +export let oWithMethods = { + method() { }, + okMethod(): void { }, + a: 1, + bad() { }, + e: V, +} +export let oWithMethodsNested = { + foo: { + method() { }, + a: 1, + okMethod(): void { }, + bad() { } + } +} + + + +export let oWithAccessor = { + get singleGetterBad() { return 0 }, + set singleSetterBad(value) { }, + + get getSetBad() { return 0 }, + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, +} + +function prop(v: T): T { return v } + +const s: unique symbol = Symbol(); +const str: string = ""; +enum E { + V = 10, +} +export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, +} + +const part = { a: 1 }; + +export const oWithSpread = { + b: 1, + ...part, + c: 1, + part, +} + + +export const oWithSpread = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, +} diff --git a/tests/cases/compiler/isolatedDeclarationErrorsReturnTypes.ts b/tests/cases/compiler/isolatedDeclarationErrorsReturnTypes.ts new file mode 100644 index 0000000000000..9843797bab0a8 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsReturnTypes.ts @@ -0,0 +1,207 @@ +// @declaration: true +// @isolatedDeclarations: true +// @declarationMap: false +// @target: ESNext + +// Function Variables +export const fnExpressionConstVariable = function foo() { return 0;} +export const fnArrowConstVariable = () => "S"; + +export let fnExpressionLetVariable = function foo() { return 0;} +export let fnArrowLetVariable = () => "S"; + +export var fnExpressionVarVariable = function foo() { return 0;} +export var fnArrowVarVariable = () => "S"; + +// No Errors +export const fnExpressionConstVariableOk = function foo(): number { return 0;} +export const fnArrowConstVariableOk = (cb = function(){ }): string => "S"; + +export let fnExpressionLetVariableOk = function foo(): number { return 0;} +export let fnArrowLetVariableOk = (cb = function(){ }): string => "S"; + +export var fnExpressionVarVariableOk = function foo(): number { return 0;} +export var fnArrowVarVariableOk = (cb = function(){ }): string => "S"; + +// Not exported +const fnExpressionConstVariableInternal = function foo() { return 0;} +const fnArrowConstVariableInternal = () => "S"; + +let fnExpressionLetVariableInternal = function foo() { return 0;} +let fnArrowLetVariableInternal = () => "S"; + +var fnExpressionVarVariableInternal = function foo() { return 0;} +var fnArrowVarVariableInternal = () => "S"; + +// Function Fields +export class ExportedClass { + // Should Error + fnExpression = function foo() { return 0; } + fnArrow = () => "S"; + protected fnExpressionProtected = function foo() { return 0; } + protected fnArrowProtected = () => "S"; + + static fnStaticExpression = function foo() { return 0; } + static fnStaticArrow = () => "S"; + protected static fnStaticExpressionProtected = function foo() { return 0; } + protected static fnStaticArrowProtected = () => "S"; + + // Have annotation, so ok + fnExpressionOk = function foo(): number { return 0; } + fnArrowOK = (): string => "S"; + protected fnExpressionProtectedOk = function foo(): number { return 0; } + protected fnArrowProtectedOK = (): string => "S"; + + static fnStaticExpressionOk = function foo(): number { return 0; } + static fnStaticArrowOk = (): string => "S"; + protected static fnStaticExpressionProtectedOk = function foo(): number { return 0; } + protected static fnStaticArrowProtectedOk = (): string => "S"; + + + // No Error not in declarations + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; +} + +// Should error +class IndirectlyExportedClass { + fnExpression = function foo() { return 0; } + fnArrow = () => "S"; + + static fnStaticExpression = function foo() { return 0; } + static fnStaticArrow = () => "S"; + + protected static fnStaticExpressionProtected = function foo() { return 0; } + protected static fnStaticArrowProtected = () => "S"; + + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; +} +export const instance: IndirectlyExportedClass = new IndirectlyExportedClass(); + +// No Errors +class InternalClass { + fnExpression = function foo() { return 0; } + fnArrow = () => "S"; + + static fnStaticExpression = function foo() { return 0; } + static fnStaticArrow = () => "S"; + + protected static fnStaticExpressionProtected = function foo() { return 0; } + protected static fnStaticArrowProtected = () => "S"; + + private fnExpressionPrivate = function foo() { return 0; } + private fnArrowPrivate = () => "S"; + #fnArrow = () => "S"; + #fnExpression = function foo() { return 0;} + private static fnStaticExpressionPrivate = function foo() { return 0; } + private static fnStaticArrowPrivate = () => "S"; +} +const internalInstance: InternalClass = new InternalClass(); + + +// Function parameters + +// In Function Variables - No annotations +export const fnParamExpressionConstVariable = function foo(cb = function(){ }) { return 0;} +export const fnParamArrowConstVariable = (cb = () => 1) => "S"; + +export let fnParamExpressionLetVariable = function foo(cb = function(){ }) { return 0;} +export let fnParamArrowLetVariable = (cb = () => 1) => "S"; + +export var fnParamExpressionVarVariable = function foo(cb = function(){ }) { return 0;} +export var fnParamArrowVarVariable = (cb = () => 1) => "S"; + +// In Function Variables - No annotations on parameter +export const fnParamExpressionConstVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +export const fnParamArrowConstVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + +export let fnParamExpressionLetVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +export let fnParamArrowLetVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + +export var fnParamExpressionVarVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} +export var fnParamArrowVarVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + +// No Errors +export const fnParamExpressionConstVariableOk = function foo(cb = function(): void{ }): number { return 0;} +export const fnParamArrowConstVariableOk = (cb = function(): void{ }): string => "S"; + +export let fnParamExpressionLetVariableOk = function foo(cb = function(): void{ }): number { return 0;} +export let fnParamArrowLetVariableOk = (cb = function(): void{ }): string => "S"; + +export var fnParamExpressionVarVariableOk = function foo(cb = function(): void{ }): number { return 0;} +export var fnParamArrowVarVariableOk = (cb = function(): void{ }): string => "S"; + +export const fnParamExpressionConstVariableInternal = function foo(cb = function(){ }) { return 0;} +export const fnParamArrowConstVariableInternal = (cb = () => 1) => "S"; + +export let fnParamExpressionLetVariableInternal = function foo(cb = function(){ }) { return 0;} +export let fnParamArrowLetVariableInternal = (cb = () => 1) => "S"; + +export var fnParamExpressionVarVariableInternal = function foo(cb = function(){ }) { return 0;} +export var fnParamArrowVarVariableInternal = (cb = () => 1) => "S"; + + +// In Function Fields +export class FnParamsExportedClass { + // Should Error + fnExpression = function foo(cb = function(){ }) { return 0; } + fnArrow = (cb = function(){ }) => "S"; + protected fnExpressionProtected = function foo(cb = function(){ }) { return 0; } + protected fnArrowProtected = (cb = function(){ }) => "S"; + + static fnStaticExpression = function foo(cb = function(){ }) { return 0; } + static fnStaticArrow = (cb = function(){ }) => "S"; + protected static fnStaticExpressionProtected = function foo(cb = function(){ }) { return 0; } + protected static fnStaticArrowProtected = (cb = function(){ }) => "S"; + + // Have annotation on owner + fnExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + fnArrowMethodHasReturn = (cb = function(){ }): string => "S"; + protected fnExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + protected fnArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; + + static fnStaticExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + static fnStaticArrowMethodHasReturn = (cb = function(){ }): string => "S"; + protected static fnStaticExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + protected static fnStaticArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; + + // Have annotation only on parameter + fnExpressionOnlyOnParam = function foo(cb = function(): void { }) { return 0; } + fnArrowOnlyOnParam = (cb = function(): void { }) => "S"; + protected fnExpressionProtectedOnlyOnParam = function foo(cb = function(): void { }) { return 0; } + protected fnArrowProtectedOnlyOnParam = (cb = function(): void { }) => "S"; + + static fnStaticExpressionOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } + static fnStaticArrowOnlyOnParam = (cb = function(): void{ }) => "S"; + protected static fnStaticExpressionProtectedOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } + protected static fnStaticArrowProtectedOnlyOnParam = (cb = function(): void{ }) => "S"; + + // Have annotation, so ok + fnExpressionOk = function foo(cb = function(): void { }): number { return 0; } + fnArrowOK = (cb = function(): void { }): string => "S"; + protected fnExpressionProtectedOk = function foo(cb = function(): void { }): number { return 0; } + protected fnArrowProtectedOK = (cb = function(): void { }): string => "S"; + + static fnStaticExpressionOk = function foo(cb = function(): void{ }): number { return 0; } + static fnStaticArrowOk = (cb = function(): void{ }): string => "S"; + protected static fnStaticExpressionProtectedOk = function foo(cb = function(): void{ }): number { return 0; } + protected static fnStaticArrowProtectedOk = (cb = function(): void{ }): string => "S"; + + + // No Error, not in declarations + private fnExpressionPrivate = function foo(cb = function(){ }) { return 0; } + private fnArrowPrivate = (cb = function(){ }) => "S"; + #fnArrow = (cb = function(){ }) => "S"; + #fnExpression = function foo(cb = function(){ }) { return 0;} + private static fnStaticExpressionPrivate = function foo(cb = function(){ }) { return 0; } + private static fnStaticArrowPrivate = (cb = function(){ }) => "S"; +} diff --git a/tests/cases/compiler/isolatedDeclarationLazySymbols.ts b/tests/cases/compiler/isolatedDeclarationLazySymbols.ts new file mode 100644 index 0000000000000..c8b1fbf602d24 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationLazySymbols.ts @@ -0,0 +1,29 @@ +// @declaration: true +// @isolatedDeclarations: true +// @target: ESNext +// @isolatedDeclarationFixedDiffReason: Expando function declarations are not fixed. + + +export function foo() { + +} + +const o = { + ["prop.inner"]: "a", + prop: { + inner: "b", + } +} as const + +foo[o["prop.inner"]] ="A"; +foo[o.prop.inner] = "B"; + +export class Foo { + [o["prop.inner"]] ="A" + [o.prop.inner] = "B" +} + +export let oo = { + [o['prop.inner']]:"A", + [o.prop.inner]: "B", +} \ No newline at end of file diff --git a/tests/cases/compiler/isolatedDeclarations.ts b/tests/cases/compiler/isolatedDeclarations.ts new file mode 100644 index 0000000000000..2a1a019cbfc46 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarations.ts @@ -0,0 +1,9 @@ +// @isolatedDeclarations: true +// @outFile:all.js +// @target: es6 +// @module: amd + +// @filename: file1.ts +export var x; +// @filename: file2.ts +var y; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts b/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts index c200602dddd65..5c11838f28e47 100644 --- a/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts +++ b/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts // @filename: a.ts class c { } diff --git a/tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts b/tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts index 07b443272546a..15fb15793b758 100644 --- a/tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts +++ b/tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts @@ -1,6 +1,7 @@ // @declaration: true // @target: es6 // @strict: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed // @filename: index.ts export function foo() {} foo.bar = 12; diff --git a/tests/cases/compiler/mappedTypeGenericIndexedAccess.ts b/tests/cases/compiler/mappedTypeGenericIndexedAccess.ts index 68240b8bc87fb..c4a7dd6e60c2f 100644 --- a/tests/cases/compiler/mappedTypeGenericIndexedAccess.ts +++ b/tests/cases/compiler/mappedTypeGenericIndexedAccess.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Repro from #49242 diff --git a/tests/cases/compiler/mappedTypeGenericInstantiationPreservesHomomorphism.ts b/tests/cases/compiler/mappedTypeGenericInstantiationPreservesHomomorphism.ts index c8cf359509fad..c449f4613aeac 100644 --- a/tests/cases/compiler/mappedTypeGenericInstantiationPreservesHomomorphism.ts +++ b/tests/cases/compiler/mappedTypeGenericInstantiationPreservesHomomorphism.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: internal.ts export declare function usePrivateType(...args: T): PrivateMapped; diff --git a/tests/cases/compiler/mappedTypeGenericInstantiationPreservesInlineForm.ts b/tests/cases/compiler/mappedTypeGenericInstantiationPreservesInlineForm.ts index cae88c35591d6..0d4fea9974895 100644 --- a/tests/cases/compiler/mappedTypeGenericInstantiationPreservesInlineForm.ts +++ b/tests/cases/compiler/mappedTypeGenericInstantiationPreservesInlineForm.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @emitDeclarationOnly: true +// @isolatedDeclarationFixedDiffReason: Printing differences // repro from #53109 diff --git a/tests/cases/compiler/mappedTypeNoTypeNoCrash.ts b/tests/cases/compiler/mappedTypeNoTypeNoCrash.ts index fc9760c7a69b0..5efc315079861 100644 --- a/tests/cases/compiler/mappedTypeNoTypeNoCrash.ts +++ b/tests/cases/compiler/mappedTypeNoTypeNoCrash.ts @@ -1,2 +1,3 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts type T0 = ({[K in keyof T]}) extends ({[key in K]: T[K]}) ? number : never; \ No newline at end of file diff --git a/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts b/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts index 1cb22a7305783..afd43a32b9a0a 100644 --- a/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts +++ b/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts @@ -1,3 +1,5 @@ // @target: ES2020 // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences +// @isolatedDeclarationDiffReason: TS expands type export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); diff --git a/tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts b/tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts index 9113e6e329b5d..c017fe8e35a09 100644 --- a/tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts +++ b/tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: model/index.ts export * from "./account"; diff --git a/tests/cases/compiler/noEmitOnError.ts b/tests/cases/compiler/noEmitOnError.ts index b171a23c5b95b..ba6f0c2b76dc3 100644 --- a/tests/cases/compiler/noEmitOnError.ts +++ b/tests/cases/compiler/noEmitOnError.ts @@ -1,5 +1,6 @@ // @noemitonerror: true // @sourcemap: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts var x: number = ""; diff --git a/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts b/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts index 022b0262a8c8c..c443e432585fe 100644 --- a/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts +++ b/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @Filename: /node_modules/.prisma/client/index.d.ts export interface PrismaClientOptions { diff --git a/tests/cases/compiler/numericEnumMappedType.ts b/tests/cases/compiler/numericEnumMappedType.ts index 7c03991e6a206..fb69a653059b0 100644 --- a/tests/cases/compiler/numericEnumMappedType.ts +++ b/tests/cases/compiler/numericEnumMappedType.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Fixing enum values is not supported // Repro from #31771 diff --git a/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts b/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts index 93755f5e5d53d..82a44361f00a4 100644 --- a/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts +++ b/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts @@ -1,4 +1,6 @@ // @declaration: true +// @isolatedDeclarationDiffReason: Computed property are not resolved +// @isolatedDeclarationFixedDiffReason: Printing differences const Foo = { BANANA: 'banana' as 'banana', } diff --git a/tests/cases/compiler/parameterDestructuringObjectLiteral.ts b/tests/cases/compiler/parameterDestructuringObjectLiteral.ts index 5e1ec5f4edd52..bd8016718d530 100644 --- a/tests/cases/compiler/parameterDestructuringObjectLiteral.ts +++ b/tests/cases/compiler/parameterDestructuringObjectLiteral.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Repro from #22644 diff --git a/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts b/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts index 0f8e993bbd6f6..a81558e13141a 100644 --- a/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts +++ b/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export type InvalidKeys = { [P in K]? : never }; export type InvalidKeys2 = ( diff --git a/tests/cases/compiler/parseAssertEntriesError.ts b/tests/cases/compiler/parseAssertEntriesError.ts index 37e8ef23bd155..724702f31008c 100644 --- a/tests/cases/compiler/parseAssertEntriesError.ts +++ b/tests/cases/compiler/parseAssertEntriesError.ts @@ -2,6 +2,7 @@ // @module: nodenext // @declaration: true // @outDir: out +// @isolatedDeclarationDiffReason: TS resolves invalid types to any // @filename: /node_modules/pkg/package.json { "name": "pkg", diff --git a/tests/cases/compiler/parseImportAttributesError.ts b/tests/cases/compiler/parseImportAttributesError.ts index df87a0ed1a9be..ac09b2e8559d6 100644 --- a/tests/cases/compiler/parseImportAttributesError.ts +++ b/tests/cases/compiler/parseImportAttributesError.ts @@ -2,6 +2,7 @@ // @module: nodenext // @declaration: true // @outDir: out +// @isolatedDeclarationDiffReason: TS resolves invalid types to any // @filename: /node_modules/pkg/package.json { "name": "pkg", diff --git a/tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts b/tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts index 71947ca80c1c8..272c744afbee5 100644 --- a/tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts +++ b/tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts @@ -1,5 +1,6 @@ // https://github.com/Microsoft/TypeScript/issues/8612 // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: ThingA.ts export class ThingA { } diff --git a/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts b/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts index 5714dcb887e02..1ba267d5ec45f 100644 --- a/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts +++ b/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts @@ -1,5 +1,7 @@ // @target: es2015 // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types +// @isolatedDeclarationFixedDiffReason: TS normalizes types // GH#37454, GH#41044 type O = { a?: string; b: number; c: number; }; diff --git a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts index 4ff61e9636031..6744a0dc44323 100644 --- a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts +++ b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts @@ -1,6 +1,7 @@ // @declaration: true // @useCaseSensitiveFileNames: false // @noImplicitReferences: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: Folder/monorepo/package-a/index.d.ts export declare const styles: import("styled-components").InterpolationValue[]; diff --git a/tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts b/tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts index 12e812b1d3e1e..ebec3a59698ce 100644 --- a/tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts +++ b/tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts @@ -1,5 +1,6 @@ // @declaration: true // @target: es6 +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed interface SymbolConstructor { readonly observer: symbol; } diff --git a/tests/cases/compiler/templateLiteralsInTypes.ts b/tests/cases/compiler/templateLiteralsInTypes.ts index 707fb8a2a5a17..da29b05f50240 100644 --- a/tests/cases/compiler/templateLiteralsInTypes.ts +++ b/tests/cases/compiler/templateLiteralsInTypes.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed const f = (hdr: string, val: number) => `${hdr}:\t${val}\r\n` as `${string}:\t${number}\r\n`; diff --git a/tests/cases/compiler/templateLiteralsSourceMap.ts b/tests/cases/compiler/templateLiteralsSourceMap.ts index 6e56ce184ce99..f3d18180d8a7f 100644 --- a/tests/cases/compiler/templateLiteralsSourceMap.ts +++ b/tests/cases/compiler/templateLiteralsSourceMap.ts @@ -1,3 +1,2 @@ // @sourcemap: true - const s = `a${0}b${1}c${2}`; diff --git a/tests/cases/compiler/trackedSymbolsNoCrash.ts b/tests/cases/compiler/trackedSymbolsNoCrash.ts index 85a7e3552475a..e23070ef20624 100644 --- a/tests/cases/compiler/trackedSymbolsNoCrash.ts +++ b/tests/cases/compiler/trackedSymbolsNoCrash.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: ast.ts export enum SyntaxKind { Node0, Node1, Node2, Node3, Node4, Node5, Node6, Node7, Node8, Node9, Node10, Node11, Node12, Node13, Node14, Node15, Node16, Node17, Node18, Node19, Node20, Node21, Node22, Node23, Node24, Node25, Node26, Node27, Node28, Node29, Node30, Node31, Node32, Node33, Node34, Node35, Node36, Node37, Node38, Node39, Node40, Node41, Node42, Node43, Node44, Node45, Node46, Node47, Node48, Node49, Node50, Node51, Node52, Node53, Node54, Node55, Node56, Node57, Node58, Node59, Node60, Node61, Node62, Node63, Node64, Node65, Node66, Node67, Node68, Node69, Node70, Node71, Node72, Node73, Node74, Node75, Node76, Node77, Node78, Node79, Node80, Node81, Node82, Node83, Node84, Node85, Node86, Node87, Node88, Node89, Node90, Node91, Node92, Node93, Node94, Node95, Node96, Node97, Node98, Node99 } diff --git a/tests/cases/compiler/typeReferenceDirectives11.ts b/tests/cases/compiler/typeReferenceDirectives11.ts index 696fdd56987d0..26c460b85504e 100644 --- a/tests/cases/compiler/typeReferenceDirectives11.ts +++ b/tests/cases/compiler/typeReferenceDirectives11.ts @@ -4,6 +4,7 @@ // @traceResolution: true // @types: lib // @out: output.js +// @isolatedDeclarationDiffReason: TSC adds type reference directives. // @currentDirectory: / diff --git a/tests/cases/compiler/typeReferenceDirectives13.ts b/tests/cases/compiler/typeReferenceDirectives13.ts index f9dede73267bd..e9935c5142f96 100644 --- a/tests/cases/compiler/typeReferenceDirectives13.ts +++ b/tests/cases/compiler/typeReferenceDirectives13.ts @@ -1,5 +1,6 @@ // @noImplicitReferences: true // @declaration: true +// @isolatedDeclarationDiffReason: TSC removes type only import. DTE can't know import is type only. // @typeRoots: /types // @traceResolution: true // @currentDirectory: / diff --git a/tests/cases/compiler/typeReferenceDirectives2.ts b/tests/cases/compiler/typeReferenceDirectives2.ts index 44218683a5a99..1c3e536eb791c 100644 --- a/tests/cases/compiler/typeReferenceDirectives2.ts +++ b/tests/cases/compiler/typeReferenceDirectives2.ts @@ -4,6 +4,7 @@ // @typeRoots: /types // @types: lib // @currentDirectory: / +// @isolatedDeclarationDiffReason: TSC adds type reference directives. // @filename: /types/lib/index.d.ts interface $ { x } diff --git a/tests/cases/compiler/typeReferenceDirectives5.ts b/tests/cases/compiler/typeReferenceDirectives5.ts index e81ae663e24f6..deaaa8874a239 100644 --- a/tests/cases/compiler/typeReferenceDirectives5.ts +++ b/tests/cases/compiler/typeReferenceDirectives5.ts @@ -1,6 +1,7 @@ // @noImplicitReferences: true // @traceResolution: true // @declaration: true +// @isolatedDeclarationDiffReason: TSC removes type only import. DTE can't know import is type only. // @typeRoots: /types // @currentDirectory: / diff --git a/tests/cases/compiler/typeReferenceDirectives8.ts b/tests/cases/compiler/typeReferenceDirectives8.ts index bed69cbf35739..72b62e6768e60 100644 --- a/tests/cases/compiler/typeReferenceDirectives8.ts +++ b/tests/cases/compiler/typeReferenceDirectives8.ts @@ -4,6 +4,7 @@ // @traceResolution: true // @types: lib // @currentDirectory: / +// @isolatedDeclarationDiffReason: Requires adding a type reference directive that only TSC can detect // @filename: /types/lib/index.d.ts diff --git a/tests/cases/conformance/classes/mixinClassesAnnotated.ts b/tests/cases/conformance/classes/mixinClassesAnnotated.ts index 62f5e30c9a00d..c26b2a698ec7b 100644 --- a/tests/cases/conformance/classes/mixinClassesAnnotated.ts +++ b/tests/cases/conformance/classes/mixinClassesAnnotated.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type Constructor = new(...args: any[]) => T; diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts index 04f0e86b5e090..8475055c4a829 100644 --- a/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts @@ -18,8 +18,8 @@ class C3 { accessor #y = 0; } -// @filename: file3.ts -class C3 { +// @filename: file3-2.ts +class C32 { accessor x = 0; } diff --git a/tests/cases/conformance/constEnums/constEnum2.ts b/tests/cases/conformance/constEnums/constEnum2.ts index 02c4aea5733cd..6470ecdd91839 100644 --- a/tests/cases/conformance/constEnums/constEnum2.ts +++ b/tests/cases/conformance/constEnums/constEnum2.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Fixing enum values is not supported // An enum declaration that specifies a const modifier is a constant enum declaration. // In a constant enum declaration, all members must have constant values and diff --git a/tests/cases/conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts b/tests/cases/conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts index 56c2231043392..77a4b55542d4b 100644 --- a/tests/cases/conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts +++ b/tests/cases/conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Syntactically invalid. const a: string | undefined = 'ff'; const foo = { a! } diff --git a/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts b/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts index 67bce5559e9cf..cbed20ee50c5c 100644 --- a/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts +++ b/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts @@ -2,6 +2,7 @@ // @declaration: true // @target: es2015 // @lib: esnext, dom +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type Action = | { kind: 'A', payload: number } diff --git a/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts b/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts index 2bba269b89d1c..0979b49ca1eb2 100644 --- a/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts +++ b/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts @@ -1,6 +1,7 @@ // @strict: true // @allowUnreachableCode: false // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed function f1(x: 1 | 2): string { if (!!true) { diff --git a/tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts b/tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts index 4724bda727ca3..66eddb79f5162 100644 --- a/tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts +++ b/tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed export default function someFunc() { return 'hello!'; diff --git a/tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts b/tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts index f22262cb82c11..502aa0f4f308a 100644 --- a/tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts +++ b/tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts @@ -3,6 +3,7 @@ // @declaration: true // @emitDeclarationOnly: true // @strictNullChecks: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @Filename: a.ts export interface Foo {} diff --git a/tests/cases/conformance/declarationEmit/nullPropertyName.ts b/tests/cases/conformance/declarationEmit/nullPropertyName.ts index fb0b6ae0fb0e2..fe850310b3d31 100644 --- a/tests/cases/conformance/declarationEmit/nullPropertyName.ts +++ b/tests/cases/conformance/declarationEmit/nullPropertyName.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed function foo() {} // properties diff --git a/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates02.ts b/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates02.ts index c17b26f423c85..4bdbb7352a1e0 100644 --- a/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates02.ts +++ b/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates02.ts @@ -1,5 +1,6 @@ // @declaration: true // @module: commonjs +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export interface Foo { a: string; diff --git a/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName02.ts b/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName02.ts index 94e657db9f399..e93a892c89352 100644 --- a/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName02.ts +++ b/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName02.ts @@ -1,5 +1,6 @@ // @declaration: true // @module: commonjs +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed interface Foo { a: string; diff --git a/tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts b/tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts index aabf57bcc0135..7ccb133bcc7af 100644 --- a/tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts +++ b/tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @Filename: button.ts import {classMap} from './lit.js'; diff --git a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts index 01adfac0480b9..a5c07d589e212 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts @@ -2,6 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: node_modules/ext/package.json { "name": "ext", diff --git a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts index ee37f43630208..763fd2252928e 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts @@ -2,6 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: node_modules/ext/package.json { "name": "ext", diff --git a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts index 7ef6adcce52af..9254f29d2a2e6 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts @@ -2,6 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: node_modules/ext/package.json { "name": "ext", diff --git a/tests/cases/conformance/enums/enumClassification.ts b/tests/cases/conformance/enums/enumClassification.ts index bbb059840889b..2d263c9ea7b00 100644 --- a/tests/cases/conformance/enums/enumClassification.ts +++ b/tests/cases/conformance/enums/enumClassification.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Fixing enum values is not supported // An enum type where each member has no initializer or an initializer that specififes // a numeric literal, a string literal, or a single identifier naming another member in diff --git a/tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts b/tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts index ddd4e3e3d826f..56299b999f6dc 100644 --- a/tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts +++ b/tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Fixing enum values is not supported enum T1 { a = `1` } diff --git a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts index cf3496c2553e2..b79e2f0e51478 100644 --- a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts +++ b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts @@ -1,5 +1,6 @@ //@target: ES6 //@declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var obj = { get [Symbol.isConcatSpreadable]() { return '' }, set [Symbol.isConcatSpreadable](x) { } diff --git a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts index 2682a4940f986..015d52eccb424 100644 --- a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts +++ b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts @@ -1,5 +1,7 @@ //@target: ES6 //@declaration: true +//@isolatedDeclarationFixedDiffReason: Sourcemap is more detailed + var obj = { [Symbol.isConcatSpreadable]: 0 } \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts index 2c35a55360052..90515b5b8569b 100644 --- a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts +++ b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts @@ -1,5 +1,6 @@ //@target: ES6 //@declaration: true +//@isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var obj = { [Symbol.isConcatSpreadable]() { } } \ No newline at end of file diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts index b146f3de98a85..bb0656e706e8e 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts @@ -1,5 +1,6 @@ // @target: es6 // @declaration: true +// @isolatedDeclarations: false var v = { [-1]: {}, [+1]: {}, diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts index 2d6f92b9bde61..7eccd615bc4c3 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts @@ -1,4 +1,5 @@ // @target: es6 +class C { class C1 { static staticProp = 10; get [C1.staticProp]() { diff --git a/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts b/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts index 51333b1ca5333..d9ac5c1e807a3 100644 --- a/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts +++ b/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed interface a { a } interface b { b } diff --git a/tests/cases/conformance/esDecorators/classDeclaration/esDecorators-classDeclaration-setFunctionName.ts b/tests/cases/conformance/esDecorators/classDeclaration/esDecorators-classDeclaration-setFunctionName.ts index b479b27785e45..7e2f8c3132c4e 100644 --- a/tests/cases/conformance/esDecorators/classDeclaration/esDecorators-classDeclaration-setFunctionName.ts +++ b/tests/cases/conformance/esDecorators/classDeclaration/esDecorators-classDeclaration-setFunctionName.ts @@ -19,7 +19,7 @@ declare let dec: any; @dec export default class C {} -// @filename: c.ts +// @filename: d.ts declare let dec: any; @dec export default class {} diff --git a/tests/cases/conformance/expressions/typeAssertions/constAssertions.ts b/tests/cases/conformance/expressions/typeAssertions/constAssertions.ts index 801f929f2c98e..3283177fc8bd0 100644 --- a/tests/cases/conformance/expressions/typeAssertions/constAssertions.ts +++ b/tests/cases/conformance/expressions/typeAssertions/constAssertions.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @target: esnext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed let v1 = 'abc' as const; let v2 = `abc` as const; diff --git a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts index 2f3da304c9958..befa5174e9f11 100644 --- a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts +++ b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts @@ -1,3 +1,5 @@ // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types. Removes duplicate properties. +// @isolatedDeclarationFixedDiffReason: Syntactically invalid. Duplicate property let x = <{a: number; a: number}>{}; \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts index 265fdbe5321bc..4c77f51665e0f 100644 --- a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts +++ b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts @@ -1,3 +1,5 @@ // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types. Removes duplicate properties. +// @isolatedDeclarationFixedDiffReason: Syntactically invalid. Duplicate property let x = {} as {a: number; a: number}; \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts index 12f6687c4015a..87dae70e8c844 100644 --- a/tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed class RoyalGuard { isLeader(): this is LeadGuard { return this instanceof LeadGuard; diff --git a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts index 7d90c570e5b4d..f2294fd035fdf 100644 --- a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts +++ b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarations: false // Unary operator - // operand before - diff --git a/tests/cases/conformance/externalModules/typeOnly/importsNotUsedAsValues_error.ts b/tests/cases/conformance/externalModules/typeOnly/importsNotUsedAsValues_error.ts index ae697e7c3cb4e..6440828b7350d 100644 --- a/tests/cases/conformance/externalModules/typeOnly/importsNotUsedAsValues_error.ts +++ b/tests/cases/conformance/externalModules/typeOnly/importsNotUsedAsValues_error.ts @@ -62,5 +62,5 @@ export = K; import K = require('./k'); K.One; -// @Filename: /j.ts +// @Filename: /m.ts // Sad face https://github.com/microsoft/TypeScript/blob/6b04f5039429b9d412696fe2febe39ecc69ad365/src/testRunner/compilerRunner.ts#L207 \ No newline at end of file diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts index af20a16ba76fa..283e75a067e62 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts @@ -4,6 +4,7 @@ // @allowJs: true // @checkJs: true // @outDir: out +// @isolatedDeclarationFixedDiffReason: TSC adds type reference directives. // @filename: subfolder/index.ts // cjs format file export * from "fs"; diff --git a/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts index 656465829e6d9..116f36798815c 100644 --- a/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts +++ b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts @@ -2,6 +2,8 @@ // @lib: es2020 // @declaration: true // @filename: index.ts +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. + export const a = async () => (await import("inner")).x(); // @filename: node_modules/inner/index.d.ts export { x } from "./other.js"; diff --git a/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts index 3f8bae7ffc404..ca8c373363ace 100644 --- a/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts +++ b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts @@ -1,5 +1,6 @@ // @module: nodenext // @declaration: true +// @isolatedDeclarations: false // @filename: index.ts // esm format file export {}; diff --git a/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts index ee6587b5ea073..a07a29c949b34 100644 --- a/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts +++ b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts @@ -1,5 +1,6 @@ // @module: node16,nodenext // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode fails on types that originate from node_module. // @filename: index.ts // esm format file import { Thing } from "inner/other"; diff --git a/tests/cases/conformance/node/nodeModulesExportsSourceTs.ts b/tests/cases/conformance/node/nodeModulesExportsSourceTs.ts index 5ca23c1526a0e..8247220f61cc5 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSourceTs.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSourceTs.ts @@ -1,5 +1,6 @@ // @module: node16,nodenext // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode fails on types that originate from node_module. // @filename: index.ts // esm format file import { Thing } from "inner/other"; diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts index 92c686f1c2303..c25c9e79b55b2 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts @@ -1,5 +1,6 @@ // @module: node16,nodenext // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode fails on types that originate from node_module. // @filename: index.ts // esm format file import { Thing } from "inner/other.js"; // should fail diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts index 684cb5588fc74..dee64812f690b 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts @@ -1,5 +1,6 @@ // @module: node16,nodenext // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode fails on types that originate from node_module. // @filename: index.ts // esm format file import { Thing } from "inner/other"; diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts index a325a2dfe6c63..6622d19c6a88f 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts @@ -1,5 +1,6 @@ // @module: node16,nodenext // @declaration: true +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode fails on types that originate from node_module. // @filename: index.ts // esm format file import { Thing } from "inner/other"; diff --git a/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts index ca9ff3cf41311..d8f1ef1f7e057 100644 --- a/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts +++ b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts @@ -1,6 +1,7 @@ // @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // cjs format file const x = () => (void 0); export {x}; diff --git a/tests/cases/conformance/node/nodeModulesImportAssignments.ts b/tests/cases/conformance/node/nodeModulesImportAssignments.ts index cce29eb0d7583..a4521e1ebd576 100644 --- a/tests/cases/conformance/node/nodeModulesImportAssignments.ts +++ b/tests/cases/conformance/node/nodeModulesImportAssignments.ts @@ -1,5 +1,6 @@ // @module: node16,nodenext // @declaration: true +// @isolatedDeclarationFixedDiffReason: TSC adds type reference directives. // @filename: subfolder/index.ts // cjs format file import fs = require("fs"); diff --git a/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts b/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts index 45bf0f409e569..4ba1376469656 100644 --- a/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts +++ b/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts @@ -2,6 +2,8 @@ // @module: node16,nodenext // @declaration: true // @outDir: out +// @isolatedDeclarationDiffReason: TSC simplifies import type removing resolution-mode +// @isolatedDeclarationFixedDiffReason: TSC simplifies import type removing resolution-mode // @filename: /node_modules/pkg/package.json { "name": "pkg", diff --git a/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts b/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts index e5c7c1420f314..82b24c57dd5e6 100644 --- a/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts +++ b/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts @@ -1,6 +1,7 @@ // @module: node16,nodenext // @declaration: true // @outDir: out +// @isolatedDeclarationDiffReason: TSC simplifies import type removing resolution-mode // @filename: /node_modules/pkg/package.json { "name": "pkg", diff --git a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts index 58e65723cbc1b..d8754276ba447 100644 --- a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts +++ b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts @@ -1,6 +1,7 @@ // @module: node16,nodenext // @declaration: true // @importHelpers: true +// @isolatedDeclarationFixedDiffReason: TSC adds type reference directives. // @filename: subfolder/index.ts // cjs format file export * from "fs"; diff --git a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts index 3145df76cd58e..c0b407bba00eb 100644 --- a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts +++ b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts @@ -1,6 +1,7 @@ // @module: node16,nodenext // @declaration: true // @importHelpers: true +// @isolatedDeclarationFixedDiffReason: TSC adds type reference directives. // @filename: subfolder/index.ts // cjs format file export {default} from "fs"; diff --git a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts index c6ca4e2f13f97..7ed74c535da11 100644 --- a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts +++ b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts @@ -2,6 +2,8 @@ // @module: node16,nodenext // @declaration: true // @outDir: out +// @isolatedDeclarationFixedDiffReason: TSC simplifies import type removing resolution-mode and uses with instead of assert +// @isolatedDeclarationDiffReason: TSC simplifies import type removing resolution-mode and uses with instead of assert // @filename: /node_modules/pkg/package.json { "name": "pkg", diff --git a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts index d118bc6da2931..647c722315142 100644 --- a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts +++ b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts @@ -1,6 +1,7 @@ // @module: node16,nodenext // @declaration: true // @outDir: out +// @isolatedDeclarationDiffReason: TSC simplifies import type removing resolution-mode // @filename: /node_modules/pkg/package.json { "name": "pkg", diff --git a/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts b/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts index 1f19bd2b39da9..f060c9cf7f489 100644 --- a/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts +++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarations: false var v = () => 1; var v = a; diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts index 1882731c8f106..72c2d5dd3fe52 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations and class expressions are not fixed function ExpandoDecl(n: number) { return n.toString(); } diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts index ee1038f48ca39..306e116bde80e 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts @@ -1,4 +1,5 @@ // @strict: true + function f(b: boolean) { function d() { } diff --git a/tests/cases/conformance/types/conditional/conditionalTypes1.ts b/tests/cases/conformance/types/conditional/conditionalTypes1.ts index 2e8690a228b45..de25fdc7dff5b 100644 --- a/tests/cases/conformance/types/conditional/conditionalTypes1.ts +++ b/tests/cases/conformance/types/conditional/conditionalTypes1.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type T00 = Exclude<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "b" | "d" type T01 = Extract<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "a" | "c" diff --git a/tests/cases/conformance/types/conditional/inferTypes1.ts b/tests/cases/conformance/types/conditional/inferTypes1.ts index 42e5897dc663f..885824aed85cb 100644 --- a/tests/cases/conformance/types/conditional/inferTypes1.ts +++ b/tests/cases/conformance/types/conditional/inferTypes1.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts type Unpacked = T extends (infer U)[] ? U : diff --git a/tests/cases/conformance/types/conditional/inferTypesInvalidExtendsDeclaration.ts b/tests/cases/conformance/types/conditional/inferTypesInvalidExtendsDeclaration.ts index 73fa8027d0801..be73f054f87ca 100644 --- a/tests/cases/conformance/types/conditional/inferTypesInvalidExtendsDeclaration.ts +++ b/tests/cases/conformance/types/conditional/inferTypesInvalidExtendsDeclaration.ts @@ -1,3 +1,4 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Semantically invalid. TSC does not emit .d.ts type Test = T extends infer A extends B ? number : string; diff --git a/tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx b/tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx index 2235961086f7b..94203a34ba32b 100644 --- a/tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx +++ b/tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx @@ -1,5 +1,6 @@ // @jsx: preserve // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed namespace JSX { export interface IntrinsicElements { diff --git a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts index 56ff157a67fd0..b38b31c68c7c8 100644 --- a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts +++ b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts @@ -1,5 +1,6 @@ // @strictNullChecks: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences class Shape { name: string; diff --git a/tests/cases/conformance/types/literal/templateLiteralTypes4.ts b/tests/cases/conformance/types/literal/templateLiteralTypes4.ts index 9976c2297d87e..f9bfcc9c4e8d9 100644 --- a/tests/cases/conformance/types/literal/templateLiteralTypes4.ts +++ b/tests/cases/conformance/types/literal/templateLiteralTypes4.ts @@ -1,6 +1,7 @@ // @strict: true // @target: esnext // @declaration: true +// @isolatedDeclarationFixedDiffReason: Enums are not fixed // infer from number type TNumber0 = "100" extends `${infer N extends number}` ? N : never; // 100 diff --git a/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts b/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts index 4cc2d08be6c6b..e3c1510925249 100644 --- a/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts +++ b/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts @@ -1,6 +1,7 @@ // @strictNullChecks: true // @noimplicitany: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type Box = { value: T; diff --git a/tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts b/tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts index b96957b7cbd83..21c40a0cf6d92 100644 --- a/tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts +++ b/tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @target: es2017 +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type Mapped1 = { [P in K]: { a: P } }; diff --git a/tests/cases/conformance/types/members/indexSignatures1.ts b/tests/cases/conformance/types/members/indexSignatures1.ts index f888275683363..72fdd537c2d3b 100644 --- a/tests/cases/conformance/types/members/indexSignatures1.ts +++ b/tests/cases/conformance/types/members/indexSignatures1.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @target: esnext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Symbol index signature checking diff --git a/tests/cases/conformance/types/namedTypes/optionalMethods.ts b/tests/cases/conformance/types/namedTypes/optionalMethods.ts index 932521425f9f6..5385b0087b74f 100644 --- a/tests/cases/conformance/types/namedTypes/optionalMethods.ts +++ b/tests/cases/conformance/types/namedTypes/optionalMethods.ts @@ -1,5 +1,6 @@ // @strictNullChecks: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed interface Foo { a: number; diff --git a/tests/cases/conformance/types/thisType/declarationFiles.ts b/tests/cases/conformance/types/thisType/declarationFiles.ts index 462e497a90e79..2b62e1e269a59 100644 --- a/tests/cases/conformance/types/thisType/declarationFiles.ts +++ b/tests/cases/conformance/types/thisType/declarationFiles.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Declarations types can't be named so can't be fixed class C1 { x: this; diff --git a/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts b/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts index 27861f81da6a6..107ff0854b972 100644 --- a/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts +++ b/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts @@ -1,6 +1,7 @@ // @declaration: true // @strict: true // @target: es5 +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // In methods of an object literal with no contextual type, 'this' has the type // of the object literal. diff --git a/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts b/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts index 2e1e2d4249987..06026468e0974 100644 --- a/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts +++ b/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed let x = <[]>[]; let y = x[0]; \ No newline at end of file diff --git a/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts b/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts index 43f63e9ce778c..3abfb8082641e 100644 --- a/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts +++ b/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed let x = [] as []; let y = x[0]; \ No newline at end of file diff --git a/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts b/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts index 9846c4f5b0f98..c0d716bb71ab0 100644 --- a/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts +++ b/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts @@ -1,4 +1,6 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences +// @isolatedDeclarationDiffReason: TS normalizes types export type Segment = [length: number, count: number]; diff --git a/tests/cases/conformance/types/tuple/variadicTuples1.ts b/tests/cases/conformance/types/tuple/variadicTuples1.ts index 573b95b1da98a..50fb54da0275f 100644 --- a/tests/cases/conformance/types/tuple/variadicTuples1.ts +++ b/tests/cases/conformance/types/tuple/variadicTuples1.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Variadics in tuple types diff --git a/tests/cases/conformance/types/typeParameters/typeParameterLists/varianceAnnotations.ts b/tests/cases/conformance/types/typeParameters/typeParameterLists/varianceAnnotations.ts index d2abd84ce6963..4c81497c23ec8 100644 --- a/tests/cases/conformance/types/typeParameters/typeParameterLists/varianceAnnotations.ts +++ b/tests/cases/conformance/types/typeParameters/typeParameterLists/varianceAnnotations.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Can't fix class expressions type Covariant = { x: T; diff --git a/tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts b/tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts index d4f04d78c8062..b7782699c9e4a 100644 --- a/tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts +++ b/tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts @@ -1,5 +1,6 @@ // @strictNullChecks: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed interface Foo { required1: string; diff --git a/tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts b/tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts index 003a56a5c655d..d6ad2946811bc 100644 --- a/tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts +++ b/tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @emitDeclarationOnly: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type WeakTypes = | { optional?: true; } diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts index 6d937adcbf626..acb83d38c2522 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type Box = { value: T }; diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts b/tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts index 6d23f571d41f3..211dc13bce5b7 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Repros from #47599 diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/noInferRedeclaration.ts b/tests/cases/conformance/types/typeRelationships/typeInference/noInferRedeclaration.ts index feab4ca3df0ea..30e1005b0bb39 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/noInferRedeclaration.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/noInferRedeclaration.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @target: esnext +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: a.ts export const f = (x: T, y: NoInfer) => x; diff --git a/tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts b/tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts index cc38324b3c89b..b5cef37cbd47d 100644 --- a/tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts +++ b/tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts @@ -3,6 +3,7 @@ // @module: commonjs // @declaration: true // @useDefineForClassFields: false +// @isolatedDeclarationFixedDiffReason: Can't fix class expressions. declare const s: unique symbol; interface I { readonly readonlyType: unique symbol; } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts new file mode 100644 index 0000000000000..5649333d5cd3a --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts @@ -0,0 +1,14 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo() { return 42; } +////export const g = foo(); + +verify.codeFix({ + description: "Add annotation of type 'number'", + index: 0, + newFileContent: +`function foo() { return 42; } +export const g: number = foo();`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts new file mode 100644 index 0000000000000..83e626e81e15f --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts @@ -0,0 +1,22 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo() { +//// return { x: 1, y: 1 }; +////} +////export default foo(); + +verify.codeFix({ + description: "Extract default export to variable", + index: 0, + newFileContent: +`function foo() { + return { x: 1, y: 1 }; +} +const __default: { + x: number; + y: number; +} = foo(); +export default __default;`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts new file mode 100644 index 0000000000000..43ac0b20d20ec --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function mixin any>(ctor: T): T { +//// return ctor; +//// } +//// class Point2D { x = 0; y = 0; } +//// export class Point3D extends mixin(Point2D) { z = 0; } + +verify.codeFix({ + description: ts.Diagnostics.Extract_base_class_to_variable.message, + index: 0, + newFileContent: +`function mixin any>(ctor: T): T { + return ctor; +} +class Point2D { x = 0; y = 0; } +const Point3DBase: typeof Point2D = mixin(Point2D); +export class Point3D extends Point3DBase { z = 0; }` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts new file mode 100644 index 0000000000000..0e51849bc2afd --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts @@ -0,0 +1,20 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: 1 }; +//// } +//// export const { x, y } = foo(); + +verify.codeFix({ + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, + index: 0, + newFileContent: +`function foo() { + return { x: 1, y: 1 }; +} +const dest = foo(); +export const x: number = dest.x; +export const y: number = dest.y;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts new file mode 100644 index 0000000000000..019960140d4dc --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts @@ -0,0 +1,20 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: 1 }; +//// } +//// export const { x: abcd, y: defg } = foo(); + +verify.codeFix({ + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, + index: 0, + newFileContent: +`function foo() { + return { x: 1, y: 1 }; +} +const dest = foo(); +export const abcd: number = dest.x; +export const defg: number = dest.y;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts new file mode 100644 index 0000000000000..fade5b0c65cad --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: 1}; +//// } +//// export const { x, y = 0} = foo(), z= 42; + +verify.codeFix({ + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, + index: 0, + newFileContent: +`function foo() { + return { x: 1, y: 1}; +} +const dest = foo(); +export const x: number = dest.x; +const temp = dest.y; +export const y: number = temp === undefined ? 0 : dest.y; +export const z = 42;`}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts new file mode 100644 index 0000000000000..41ea67e189849 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: 1 } as const; +//// } +//// export const { x, y = 0 } = foo(); + +verify.codeFix({ + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, + index: 0, + newFileContent: +`function foo() { + return { x: 1, y: 1 } as const; +} +const dest = foo(); +export const x: 1 = dest.x; +const temp = dest.y; +export const y: 1 | 0 = temp === undefined ? 0 : dest.y;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts new file mode 100644 index 0000000000000..8eefdf01fe2a1 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts @@ -0,0 +1,28 @@ + +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: {42: {dd: "45"}, b: 2} }; +//// } +//// function foo3(): "42" { +//// return "42"; +//// } +//// export const { x: a , y: { [foo3()]: {dd: e} } } = foo(); + +verify.codeFix({ + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, + index: 0, + newFileContent: +`function foo() { + return { x: 1, y: {42: {dd: "45"}, b: 2} }; +} +function foo3(): "42" { + return "42"; +} +const dest = foo(); +export const a: number = dest.x; +const _a = foo3(); +export const e: string = (dest.y)[_a].dd;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18-unique-symbol.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18-unique-symbol.ts new file mode 100644 index 0000000000000..409b0869af68e --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18-unique-symbol.ts @@ -0,0 +1,13 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 +//// export const a = Symbol(); + +verify.codeFix({ + description: "Add annotation of type 'unique symbol'", + index: 0, + newFileContent: +`export const a: unique symbol = Symbol();` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts new file mode 100644 index 0000000000000..c8442437b11b1 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts @@ -0,0 +1,20 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// export class A { +//// readonly a = function foo() {return 42;} +//// } + +verify.codeFixAvailable([ + { description: "Add return type 'number'" }, +]); + +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`export class A { + readonly a = function foo(): number {return 42;} +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts new file mode 100644 index 0000000000000..c0ce15c2dc205 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts @@ -0,0 +1,20 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////const a = 42; +////const b = 43; +////export function foo() { return a + b; } + +verify.codeFixAvailable([ + { description: "Add return type 'number'" } +]); + +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`const a = 42; +const b = 43; +export function foo(): number { return a + b; }`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts new file mode 100644 index 0000000000000..c1e9e7900ae5b --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts @@ -0,0 +1,22 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { return 42; } +//// export class A { +//// readonly a = () => foo(); +//// } + +verify.codeFixAvailable([ + { description: "Add return type 'number'" }, +]); + +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`function foo() { return 42; } +export class A { + readonly a = (): number => foo(); +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts new file mode 100644 index 0000000000000..90b8c10a4fc54 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts @@ -0,0 +1,19 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 +////export const a = { +//// z: Symbol() +////} as const; + +verify.codeFix({ + description: `Add annotation of type '{ readonly z: symbol; }'`, + index: 0, + newFileContent: +`export const a: { + readonly z: symbol; +} = { + z: Symbol() +} as const;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts new file mode 100644 index 0000000000000..fb5c043266284 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 +//// export function foo () { +//// return Symbol(); +//// } + +verify.codeFixAvailable([ + { description: "Add return type 'symbol'" } +]); + +verify.codeFix({ + description: "Add return type 'symbol'", + index: 0, + newFileContent: +`export function foo (): symbol { + return Symbol(); +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts new file mode 100644 index 0000000000000..bfa0897e87504 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts @@ -0,0 +1,33 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +/////** +//// * Test +//// */ +////export function foo(): number { return 0; } +/////** +////* Docs +////*/ +////export const bar = (a = foo()) => +//// a; +////// Trivia + + +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`/** + * Test + */ +export function foo(): number { return 0; } +/** +* Docs +*/ +export const bar = (a: number = foo()): number => + a; +// Trivia` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts new file mode 100644 index 0000000000000..54f306aa8aaad --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts @@ -0,0 +1,22 @@ +/// +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 +/////** +//// * Test +//// */ +////export function foo(){} + +verify.codeFixAvailable([ + { description: "Add return type 'void'" } +]); + +verify.codeFix({ + description: "Add return type 'void'", + index: 0, + newFileContent: +`/** + * Test + */ +export function foo(): void{}` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports25-formatting-2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports25-formatting-2.ts new file mode 100644 index 0000000000000..8cd30c66dda26 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports25-formatting-2.ts @@ -0,0 +1,29 @@ +/// +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +/////** +//// * Docs +//// */ +////export const bar = () => +//// 10; +////// Trivia + + +verify.codeFixAvailable([ + { description: "Add return type 'number'" } +]); + +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`/** + * Docs + */ +export const bar = (): number => + 10; +// Trivia` + +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports26-heritage-formatting.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports26-heritage-formatting.ts new file mode 100644 index 0000000000000..5485006c46df0 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports26-heritage-formatting.ts @@ -0,0 +1,41 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function mixin any>(ctor: T): T { +//// return ctor; +////} +////class Point2D { x = 0; y = 0; } +////interface I{} +////export class Point3D extends +//// /** Base class */ +//// mixin(Point2D) +//// // Test +//// implements I +//// { +//// z = 0; +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Extract_base_class_to_variable.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Extract_base_class_to_variable.message, + index: 0, + newFileContent: +`function mixin any>(ctor: T): T { + return ctor; +} +class Point2D { x = 0; y = 0; } +interface I{} +const Point3DBase: typeof Point2D = + /** Base class */ + mixin(Point2D); +export class Point3D extends Point3DBase + // Test + implements I + { + z = 0; +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports27-heritage-formatting-2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports27-heritage-formatting-2.ts new file mode 100644 index 0000000000000..eaa37d1a21c4d --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports27-heritage-formatting-2.ts @@ -0,0 +1,29 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function mixin any>(ctor: T): T { +//// return ctor; +////} +////class Point2D { x = 0; y = 0; } +////export class Point3D2 extends mixin(Point2D) { +//// z = 0; +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Extract_base_class_to_variable.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Extract_base_class_to_variable.message, + index: 0, + newFileContent: +`function mixin any>(ctor: T): T { + return ctor; +} +class Point2D { x = 0; y = 0; } +const Point3D2Base: typeof Point2D = mixin(Point2D); +export class Point3D2 extends Point3D2Base { + z = 0; +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-heritage-formatting-3.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-heritage-formatting-3.ts new file mode 100644 index 0000000000000..cb3c18d888188 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-heritage-formatting-3.ts @@ -0,0 +1,29 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function mixin any>(ctor: T): T { +//// return ctor; +////} +////class Point2D { x = 0; y = 0; } +////export class Point3D3 extends mixin(Point2D) /* DD*/ { +//// z = 0; +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Extract_base_class_to_variable.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Extract_base_class_to_variable.message, + index: 0, + newFileContent: +`function mixin any>(ctor: T): T { + return ctor; +} +class Point2D { x = 0; y = 0; } +const Point3D3Base: typeof Point2D = mixin(Point2D) /* DD*/; +export class Point3D3 extends Point3D3Base { + z = 0; +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts new file mode 100644 index 0000000000000..5a345c904e0a0 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts @@ -0,0 +1,31 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// fileName: code.ts +////export const extensions = { +//// /** +//// */ +//// fn: (actualValue: T, expectedValue: T) => { +//// return actualValue === expectedValue +//// }, +//// fn2: function(actualValue: T, expectedValue: T) { +//// return actualValue === expectedValue +//// } +////} + +verify.codeFixAll({ + fixId: "fixMissingTypeAnnotationOnExports", + fixAllDescription: ts.Diagnostics.Add_all_missing_type_annotations.message, + newFileContent: +`export const extensions = { + /** + */ + fn: (actualValue: T, expectedValue: T): boolean => { + return actualValue === expectedValue + }, + fn2: function(actualValue: T, expectedValue: T): boolean { + return actualValue === expectedValue + } +}` +}) \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts new file mode 100644 index 0000000000000..001a6f8416903 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts @@ -0,0 +1,22 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////const a = 42; +////const b = 42; +////export class C { +//// //making sure comments are not changed +//// property =a+b; // comment should stay here +////} + +verify.codeFix({ + description: "Add annotation of type 'number'", + index: 0, + newFileContent: +`const a = 42; +const b = 42; +export class C { + //making sure comments are not changed + property: number =a+b; // comment should stay here +}`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts new file mode 100644 index 0000000000000..aaeaa5c4b6b95 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// fileName: code.ts +////let p = { x: 1, y: 2} +////const a = 1, b = 10, { x, y } = p, c = 1; +////export { x, y } +////export const d = a + b + c; + +verify.codeFixAll({ + fixId: "fixMissingTypeAnnotationOnExports", + fixAllDescription: ts.Diagnostics.Add_all_missing_type_annotations.message, + newFileContent: +`let p = { x: 1, y: 2} +const x: number = p.x; +const y: number = p.y; +const a = 1, b = 10, c = 1; +export { x, y } +export const d: number = a + b + c;` +}) \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports31-long-types.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports31-long-types.ts new file mode 100644 index 0000000000000..1de6a9ea124d7 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports31-long-types.ts @@ -0,0 +1,111 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// fileName: code.ts +////export const sessionLoader = { +//// async loadSession() { +//// if (Math.random() > 0.5) { +//// return { +//// PROP_1: { +//// name: false, +//// }, +//// PROPERTY_2: { +//// name: 1, +//// }, +//// PROPERTY_3: { +//// name: 1 +//// }, +//// PROPERTY_4: { +//// name: 315, +//// }, +//// }; +//// } +//// +//// return { +//// PROP_1: { +//// name: false, +//// }, +//// PROPERTY_2: { +//// name: undefined, +//// }, +//// PROPERTY_3: { +//// }, +//// PROPERTY_4: { +//// name: 576, +//// }, +//// }; +//// }, +////}; + + +const description = "Add return type 'Promise<{\n PROP_1: {\n name: boolean;\n };\n PROPERTY_2: {\n name: number;\n };\n PROPERTY_3: {\n name: number;\n };\n PROPE...'"; +verify.codeFixAvailable([ + { description } +]); + +verify.codeFix({ + description, + index: 0, + newFileContent: +`export const sessionLoader = { + async loadSession(): Promise<{ + PROP_1: { + name: boolean; + }; + PROPERTY_2: { + name: number; + }; + PROPERTY_3: { + name: number; + }; + PROPERTY_4: { + name: number; + }; + } | { + PROP_1: { + name: boolean; + }; + PROPERTY_2: { + name: any; + }; + PROPERTY_3: { + name?: undefined; + }; + PROPERTY_4: { + name: number; + }; + }> { + if (Math.random() > 0.5) { + return { + PROP_1: { + name: false, + }, + PROPERTY_2: { + name: 1, + }, + PROPERTY_3: { + name: 1 + }, + PROPERTY_4: { + name: 315, + }, + }; + } + + return { + PROP_1: { + name: false, + }, + PROPERTY_2: { + name: undefined, + }, + PROPERTY_3: { + }, + PROPERTY_4: { + name: 576, + }, + }; + }, +};` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports32-inline.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports32-inline.ts new file mode 100644 index 0000000000000..f81b0fa98e512 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports32-inline.ts @@ -0,0 +1,23 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// fileName: code.ts +////function getString() { +//// return "" +////} +////export const exp = { +//// prop: getString() +////}; + +verify.codeFix({ + description: "Add inline type assertion to 'string'", + index: 1, + newFileContent: +`function getString() { + return "" +} +export const exp = { + prop: getString() as string +};` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports33-inline-import.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports33-inline-import.ts new file mode 100644 index 0000000000000..26cc1f63bffc1 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports33-inline-import.ts @@ -0,0 +1,28 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true + +// @Filename: /person-code.ts +////export type Person = { x: string; } +////export function getPerson() : Person { +//// return null! +////} + +// @Filename: /code.ts +////import { getPerson } from "./person-code"; +////export const exp = { +//// person: getPerson() +////}; + +goTo.file("/code.ts"); + +verify.codeFix({ + description: "Add inline type assertion to 'Person'", + index: 1, + newFileContent: +`import { Person, getPerson } from "./person-code"; +export const exp = { + person: getPerson() as Person +};` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts new file mode 100644 index 0000000000000..840fcfc0e480f --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts @@ -0,0 +1,39 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true + +// @Filename: /person-code.ts +////export type Person = { x: string; } +////export function getPerson() : Person { +//// return null! +////} + +// @Filename: /code.ts +////import { getPerson } from "./person-code"; +////export default { +//// person: getPerson() +////}; + +goTo.file("/code.ts"); +verify.codeFixAvailable([ + { + "description": "Extract default export to variable" + }, + { + "description": "Add inline type assertion to 'Person'" + }, + { + "description": "Extract to variable and replace with 'person_1 typeof person_1'" + } +]) + +verify.codeFix({ + description: "Add inline type assertion to 'Person'", + index: 1, + newFileContent: +`import { Person, getPerson } from "./person-code"; +export default { + person: getPerson() as Person +};` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts new file mode 100644 index 0000000000000..68b7596ad0b9c --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts @@ -0,0 +1,29 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @Filename: /code.ts +////const x = 1; +////export default { +//// x +////}; + +verify.codeFix({ + description: "Add inline type assertion to 'number'", + index: 1, + newFileContent: +`const x = 1; +export default { + x: x as number +};` +}); + +verify.codeFix({ + description: "Add inline type assertion to 'typeof x'", + index: 2, + newFileContent: +`const x = 1; +export default { + x: x as typeof x +};` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports36-methods.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports36-methods.ts new file mode 100644 index 0000000000000..45eafd535c1bd --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports36-methods.ts @@ -0,0 +1,26 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true + +// @Filename: /code.ts +////export class Foo { +//// m() { +//// } +////} + +verify.codeFixAvailable([ + { + "description": "Add return type 'void'" + }, +]) + +verify.codeFix({ + description: "Add return type 'void'", + index: 0, + newFileContent: +`export class Foo { + m(): void { + } +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts new file mode 100644 index 0000000000000..1528457fa32fd --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts @@ -0,0 +1,65 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true + +// @Filename: /code.ts +////const Start = { +//// A: 'A', +//// B: 'B', +////} as const; +//// +////const End = { +//// Y: "Y", +//// Z: "Z" +////} as const; +////export const All_Part1 = {}; +////function getPart() { +//// return { M: "Z"} +////} +//// +////export const All = { +//// x: 1, +//// ...Start, +//// y: 1, +//// ...getPart(), +//// ...End, +//// z: 1, +////}; +verify.codeFix({ + description: "Add annotation of type 'typeof All_Part1_1 & typeof Start & typeof All_Part3 & typeof All_Part4 & typeof End & typeof All_Part6'" , + index: 1, + newFileContent: +`const Start = { + A: 'A', + B: 'B', +} as const; + +const End = { + Y: "Y", + Z: "Z" +} as const; +export const All_Part1 = {}; +function getPart() { + return { M: "Z"} +} + +const All_Part1_1 = { + x: 1 +}; +const All_Part3 = { + y: 1 +}; +const All_Part4 = getPart(); +const All_Part6 = { + z: 1 +}; +export const All: typeof All_Part1_1 & typeof Start & typeof All_Part3 & typeof All_Part4 & typeof End & typeof All_Part6 = { + ...All_Part1_1, + ...Start, + ...All_Part3, + ...All_Part4, + ...End, + ...All_Part6 +};` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports38-variable-releative.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports38-variable-releative.ts new file mode 100644 index 0000000000000..d647b8962df19 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports38-variable-releative.ts @@ -0,0 +1,16 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true + +// @Filename: /code.ts +////const foo = { a: 1 } +////export const exported = foo; + +verify.codeFix({ + description: "Add annotation of type 'typeof foo'" , + index: 1, + newFileContent: +`const foo = { a: 1 } +export const exported: typeof foo = foo;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports39-conditional-releative.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports39-conditional-releative.ts new file mode 100644 index 0000000000000..1945912187304 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports39-conditional-releative.ts @@ -0,0 +1,31 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true + +// @Filename: /code.ts +////const A = "A" +////const B = "B" +////export const AB = Math.random()? A: B; +verify.codeFixAvailable([ + { + "description": "Add annotation of type '\"A\" | \"B\"'" + }, + { + "description": "Add annotation of type 'typeof A | typeof B'" + }, + { + "description": "Add inline type assertion to '\"A\" | \"B\"'" + }, + { + "description": "Add inline type assertion to 'typeof A | typeof B'" + } +]) +verify.codeFix({ + description: "Add inline type assertion to 'typeof A | typeof B'" , + index: 3, + newFileContent: +`const A = "A" +const B = "B" +export const AB = (Math.random() ? A : B) as typeof A | typeof B;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts new file mode 100644 index 0000000000000..aa85336a35642 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts @@ -0,0 +1,24 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////const a = 42; +////const b = 42; +////export class C { +//// method() { return a + b}; +////} + +verify.codeFixAvailable([ + { description: "Add return type 'number'" }, +]); + +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`const a = 42; +const b = 42; +export class C { + method(): number { return a + b}; +}`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts new file mode 100644 index 0000000000000..784c891aeaff1 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts @@ -0,0 +1,72 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true + +// @Filename: /code.ts +////const Start = [ +//// 'A', +//// 'B', +////] as const; +//// +////const End = [ +//// "Y", +//// "Z" +////] as const; +////export const All_Part1 = {}; +////function getPart() { +//// return ["Z"] +////} +//// +////export const All = [ +//// 1, +//// ...Start, +//// 1, +//// ...getPart(), +//// ...End, +//// 1, +////] as const; +verify.codeFix({ + description: `Add annotation of type '[...typeof All_Part1_1, ...typeof Start, ...typeof All_Part3, ...typeof All_Part4, ...typeof End, ...typeof All_Part6]'` , + index: 1, + newFileContent: +`const Start = [ + 'A', + 'B', +] as const; + +const End = [ + "Y", + "Z" +] as const; +export const All_Part1 = {}; +function getPart() { + return ["Z"] +} + +const All_Part1_1 = [ + 1 +] as const; +const All_Part3 = [ + 1 +] as const; +const All_Part4 = getPart() as const; +const All_Part6 = [ + 1 +] as const; +export const All: [ + ...typeof All_Part1_1, + ...typeof Start, + ...typeof All_Part3, + ...typeof All_Part4, + ...typeof End, + ...typeof All_Part6 +] = [ + ...All_Part1_1, + ...Start, + ...All_Part3, + ...All_Part4, + ...End, + ...All_Part6 +] as const;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts new file mode 100644 index 0000000000000..ec4eead6d36e5 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts @@ -0,0 +1,20 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////const u = Symbol(); +////export const fn = () => ({ u } as const); + +verify.codeFix({ + description: +`Add return type '{ readonly u: typeof u; }'` , + index: 0, + newFileContent: +`const u = Symbol(); +export const fn = (): { + readonly u: typeof u; +} => ({ u } as const);` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts new file mode 100644 index 0000000000000..47fb7c872b975 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts @@ -0,0 +1,29 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////const Enum = { +//// A: "X", +////} as const +////export const o1 = () => ({ +//// [Enum.A]: 1 +////}) + + +verify.codeFix({ + description: +`Add return type '{ [Enum.A]: number; }'` , + index: 0, + newFileContent: +`const Enum = { + A: "X", +} as const +export const o1 = (): { + [Enum.A]: number +} => ({ + [Enum.A]: 1 +})` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports43-extract-arr-to-variable.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports43-extract-arr-to-variable.ts new file mode 100644 index 0000000000000..d17e16706a8cb --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports43-extract-arr-to-variable.ts @@ -0,0 +1,54 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////let c: string[] = []; +////export let o = { +//// p: [ +//// ...c +//// ] +////} + +verify.codeFix({ + description: `Mark array literal as const`, + applyChanges: true, + index: 2, + newFileContent: +`let c: string[] = []; +export let o = { + p: [ + ...c + ] as const +}` +}); + +verify.codeFix({ + description: `Extract to variable and replace with 'o_p typeof o_p'`, + applyChanges: true, + index: 1, + newFileContent: +`let c: string[] = []; +const o_p = [ + ...c +] as const; +export let o = { + p: o_p as typeof o_p +}` +}); + +verify.codeFix({ + description: `Add annotation of type 'readonly string[]'`, + applyChanges: true, + index: 0, + newFileContent: +`let c: string[] = []; +const o_p: readonly string[] = [ + ...c +] as const; +export let o = { + p: o_p as typeof o_p +}` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports44-extract-other-to-variable.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports44-extract-other-to-variable.ts new file mode 100644 index 0000000000000..7b4c87a1363dd --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports44-extract-other-to-variable.ts @@ -0,0 +1,42 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////let c: string[] = []; +////export let o = { +//// p: Math.random() ? []: [ +//// ...c +//// ] +////} + +verify.codeFix({ + description: `Extract to variable and replace with 'o_p typeof o_p'`, + applyChanges: true, + index: 2, + newFileContent: +`let c: string[] = []; +const o_p = Math.random() ? [] : [ + ...c +]; +export let o = { + p: o_p as typeof o_p +}` +}); + + +verify.codeFix({ + description: `Add annotation of type 'string[]'`, + applyChanges: true, + index: 0, + newFileContent: +`let c: string[] = []; +const o_p: string[] = Math.random() ? [] : [ + ...c +]; +export let o = { + p: o_p as typeof o_p +}` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-computed-enum-members.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-computed-enum-members.ts new file mode 100644 index 0000000000000..49451416c9195 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-computed-enum-members.ts @@ -0,0 +1,11 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////enum E { +//// A = "foo".length +////} +verify.codeFixAvailable([]) \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports46-static-readonly-class-symbol.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports46-static-readonly-class-symbol.ts new file mode 100644 index 0000000000000..c068338746301 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports46-static-readonly-class-symbol.ts @@ -0,0 +1,18 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////class A { +//// static readonly p1 = Symbol(); +////} +verify.codeFix({ + description: "Add annotation of type 'unique symbol'", + index: 0, + newFileContent: +`class A { + static readonly p1: unique symbol = Symbol(); +}` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports47-expando-functions-2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports47-expando-functions-2.ts new file mode 100644 index 0000000000000..bab11031a16c3 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports47-expando-functions-2.ts @@ -0,0 +1,23 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////const foo = () => {} +////foo/*a*/["a"] = "A"; +////foo["b"] = "C" + +verify.codeFix({ + description: "Add annotation of type '{ (): void; a: string; b: string; }'", + index: 1, + newFileContent: +`const foo: { + (): void; + a: string; + b: string; +} = () => {} +foo["a"] = "A"; +foo["b"] = "C"` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports47-expando-functions.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports47-expando-functions.ts new file mode 100644 index 0000000000000..f2bf792166104 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports47-expando-functions.ts @@ -0,0 +1,23 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////const foo = (): void => {} +////foo.a = "A"; +////foo.b = "C" + +verify.codeFix({ + description: "Add annotation of type '{ (): void; a: string; b: string; }'", + index: 0, + newFileContent: +`const foo: { + (): void; + a: string; + b: string; +} = (): void => {} +foo.a = "A"; +foo.b = "C"` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports48-class-accessors.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports48-class-accessors.ts new file mode 100644 index 0000000000000..f8c35708c423e --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports48-class-accessors.ts @@ -0,0 +1,22 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////export class Cls { +//// get getSetOnly() { return 0 } +//// set getSetOnly(value/*a*/) { } +////} + +goTo.marker("a"); +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`export class Cls { + get getSetOnly(): number { return 0 } + set getSetOnly(value) { } +}` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports49-class-set-only-accessors.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports49-class-set-only-accessors.ts new file mode 100644 index 0000000000000..5ec3141ad4b4b --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports49-class-set-only-accessors.ts @@ -0,0 +1,20 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +////export class Cls { +//// set setOnly(value/*a*/) { } +////} + +goTo.marker("a"); +verify.codeFix({ + description: "Add annotation of type 'any'", + index: 0, + newFileContent: +`export class Cls { + set setOnly(value: any) { } +}` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts new file mode 100644 index 0000000000000..8a934a215e76a --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts @@ -0,0 +1,24 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////const a = 42; +////const b = 42; +////export class C { +//// get property() { return a + b; } +////} + +verify.codeFixAvailable([ + { description: "Add return type 'number'" } +]); + +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`const a = 42; +const b = 42; +export class C { + get property(): number { return a + b; } +}`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports50-default-export.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports50-default-export.ts new file mode 100644 index 0000000000000..565534de23766 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports50-default-export.ts @@ -0,0 +1,16 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +// @Filename: /code.ts +//// export default 1 + 1; + +verify.codeFix({ + description: "Extract default export to variable", + index: 0, + newFileContent: +`const __default: number = 1 + 1; +export default __default;` +}); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts new file mode 100644 index 0000000000000..e51434c3b4afa --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts @@ -0,0 +1,14 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo(): number[] {return [42];} +////export const c = [...foo()]; + +verify.codeFix({ + description: "Add annotation of type 'number[]'", + index: 0, + newFileContent: +`function foo(): number[] {return [42];} +export const c: number[] = [...foo()];`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts new file mode 100644 index 0000000000000..52403924ae46a --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts @@ -0,0 +1,16 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo(): number[] {return [42];} +////export const c = {foo: foo()}; + +verify.codeFix({ + description: `Add annotation of type '{ foo: number[]; }'`, + index: 0, + newFileContent: +`function foo(): number[] {return [42];} +export const c: { + foo: number[]; +} = {foo: foo()};`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts new file mode 100644 index 0000000000000..fa049ed7264d6 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts @@ -0,0 +1,18 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo() {return 42;} +////export const g = function () { return foo(); }; + +verify.codeFixAvailable([ + { description: "Add return type 'number'" }, +]); + +verify.codeFix({ + description: "Add return type 'number'", + index: 0, + newFileContent: +`function foo() {return 42;} +export const g = function (): number { return foo(); };`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts new file mode 100644 index 0000000000000..422017135c874 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts @@ -0,0 +1,20 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo( ){ +//// return 42; +////} +////const a = foo(); +////export = a; + +verify.codeFix({ + description: "Add annotation of type 'number'", + index: 0, + newFileContent: +`function foo( ){ + return 42; +} +const a: number = foo(); +export = a;`, +});

; +//# sourceMappingURL=declarationEmitExpandoWithGenericConstraint.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitExpandoWithGenericConstraint.d.ts.map] +{"version":3,"file":"declarationEmitExpandoWithGenericConstraint.d.ts","sourceRoot":"","sources":["declarationEmitExpandoWithGenericConstraint.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IAClB,QAAQ,CAAC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IHk6IG51bWJlcik6IFBvaW50ID0+ICh7IHgsIHkgfSk7CmV4cG9ydCBjb25zdCBSZWN0ID0gPHAgZXh0ZW5kcyBQb2ludD4oYTogcCwgYjogcCk6IFJlY3Q8cD4gPT4gKHsgYSwgYiB9KTsKClBvaW50Lnplcm8gPSAoKTogUG9pbnQgPT4gUG9pbnQoMCwgMCk7 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExportAliasVisibiilityMarking.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExportAliasVisibiilityMarking.d.ts.map new file mode 100644 index 0000000000000..d4be1e6131800 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExportAliasVisibiilityMarking.d.ts.map @@ -0,0 +1,70 @@ +//// [tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts] //// + +//// [Types.ts] +type Suit = 'Hearts' | 'Spades' | 'Clubs' | 'Diamonds'; +type Rank = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 'Jack' | 'Queen' | 'King'; +export { Suit, Rank }; + +//// [Card.ts] +import { Suit, Rank } from './Types'; +export default (suit: Suit, rank: Rank): { + suit: Suit; + rank: Rank; +} => ({suit, rank}); + +//// [index.ts] +import { Suit, Rank } from './Types'; + +export let lazyCard = (): Promise<(suit: Suit, rank: Rank) => { + suit: Suit; + rank: Rank; +}> => import('./Card').then(a => a.default); +export { Suit, Rank } from './Types'; + + +/// [Declarations] //// + + + +//// [Card.d.ts] +import { Suit, Rank } from './Types'; +declare const _default: (suit: Suit, rank: Rank) => { + suit: Suit; + rank: Rank; +}; +export default _default; +//# sourceMappingURL=Card.d.ts.map +//// [Types.d.ts] +type Suit = 'Hearts' | 'Spades' | 'Clubs' | 'Diamonds'; +type Rank = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 'Jack' | 'Queen' | 'King'; +export { Suit, Rank }; +//# sourceMappingURL=Types.d.ts.map +//// [index.d.ts] +import { Suit, Rank } from './Types'; +export declare let lazyCard: () => Promise<(suit: Suit, rank: Rank) => { + suit: Suit; + rank: Rank; +}>; +export { Suit, Rank } from './Types'; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [Card.d.ts.map] +{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;yBACrB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,KAAG;IACrC,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;CACd;AAHD,wBAGoB"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogKHN1aXQ6IFN1aXQsIHJhbms6IFJhbmspID0+IHsNCiAgICBzdWl0OiBTdWl0Ow0KICAgIHJhbms6IFJhbms7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1DYXJkLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FyZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiQ2FyZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxNQUFNLFNBQVMsQ0FBQzt5QkFDckIsSUFBSSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsSUFBSSxLQUFHO0lBQ3JDLElBQUksRUFBRSxJQUFJLENBQUM7SUFDWCxJQUFJLEVBQUUsSUFBSSxDQUFDO0NBQ2Q7QUFIRCx3QkFHb0IifQ==,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwpleHBvcnQgZGVmYXVsdCAoc3VpdDogU3VpdCwgcmFuazogUmFuayk6IHsKICAgIHN1aXQ6IFN1aXQ7CiAgICByYW5rOiBSYW5rOwp9ID0+ICh7c3VpdCwgcmFua30pOwo= + + +//// [Types.d.ts.map] +{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["Types.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AACvD,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBTdWl0ID0gJ0hlYXJ0cycgfCAnU3BhZGVzJyB8ICdDbHVicycgfCAnRGlhbW9uZHMnOw0KdHlwZSBSYW5rID0gMCB8IDEgfCAyIHwgMyB8IDQgfCA1IHwgNiB8IDcgfCA4IHwgOSB8IDEwIHwgJ0phY2snIHwgJ1F1ZWVuJyB8ICdLaW5nJzsNCmV4cG9ydCB7IFN1aXQsIFJhbmsgfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPVR5cGVzLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLEtBQUssSUFBSSxHQUFHLFFBQVEsR0FBRyxRQUFRLEdBQUcsT0FBTyxHQUFHLFVBQVUsQ0FBQztBQUN2RCxLQUFLLElBQUksR0FBRyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxHQUFHLE1BQU0sR0FBRyxPQUFPLEdBQUcsTUFBTSxDQUFDO0FBQ25GLE9BQU8sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLENBQUMifQ==,dHlwZSBTdWl0ID0gJ0hlYXJ0cycgfCAnU3BhZGVzJyB8ICdDbHVicycgfCAnRGlhbW9uZHMnOwp0eXBlIFJhbmsgPSAwIHwgMSB8IDIgfCAzIHwgNCB8IDUgfCA2IHwgNyB8IDggfCA5IHwgMTAgfCAnSmFjaycgfCAnUXVlZW4nIHwgJ0tpbmcnOwpleHBvcnQgeyBTdWl0LCBSYW5rIH07Cg== + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,IAAI,QAAQ,QAAO,OAAO,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK;IAC1D,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;CACd,CAA0C,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOw0KZXhwb3J0IGRlY2xhcmUgbGV0IGxhenlDYXJkOiAoKSA9PiBQcm9taXNlPChzdWl0OiBTdWl0LCByYW5rOiBSYW5rKSA9PiB7DQogICAgc3VpdDogU3VpdDsNCiAgICByYW5rOiBSYW5rOw0KfT47DQpleHBvcnQgeyBTdWl0LCBSYW5rIH0gZnJvbSAnLi9UeXBlcyc7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBRXJDLGVBQU8sSUFBSSxRQUFRLFFBQU8sT0FBTyxDQUFDLENBQUMsSUFBSSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsSUFBSSxLQUFLO0lBQzFELElBQUksRUFBRSxJQUFJLENBQUM7SUFDWCxJQUFJLEVBQUUsSUFBSSxDQUFDO0NBQ2QsQ0FBMEMsQ0FBQztBQUM1QyxPQUFPLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxNQUFNLFNBQVMsQ0FBQyJ9,aW1wb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwoKZXhwb3J0IGxldCBsYXp5Q2FyZCA9ICgpOiBQcm9taXNlPChzdWl0OiBTdWl0LCByYW5rOiBSYW5rKSA9PiB7CiAgICBzdWl0OiBTdWl0OwogICAgcmFuazogUmFuazsKfT4gPT4gaW1wb3J0KCcuL0NhcmQnKS50aGVuKGEgPT4gYS5kZWZhdWx0KTsKZXhwb3J0IHsgU3VpdCwgUmFuayB9IGZyb20gJy4vVHlwZXMnOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpressionInExtends4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpressionInExtends4.d.ts new file mode 100644 index 0000000000000..5a52d87eec595 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpressionInExtends4.d.ts @@ -0,0 +1,81 @@ +//// [tests/cases/compiler/declarationEmitExpressionInExtends4.ts] //// + +//// [declarationEmitExpressionInExtends4.ts] +function getSomething(): { + new(): {}; +} { + return class D { } +} + +const CBase: { + new(): {}; +} = getSomething(); +class C extends CBase { + +} + +const C2Base: any = SomeUndefinedFunction(); +class C2 extends C2Base { + +} + + +class C3 extends SomeUndefinedFunction { + +} + +/// [Declarations] //// + + + +//// [declarationEmitExpressionInExtends4.d.ts] +declare function getSomething(): { + new (): {}; +}; +declare const CBase: { + new (): {}; +}; +declare class C extends CBase { +} +declare const C2Base: any; +declare class C2 extends C2Base { +} +declare class C3 extends SomeUndefinedFunction { +} +//# sourceMappingURL=declarationEmitExpressionInExtends4.d.ts.map +/// [Errors] //// + +declarationEmitExpressionInExtends4.ts(14,21): error TS2304: Cannot find name 'SomeUndefinedFunction'. +declarationEmitExpressionInExtends4.ts(20,18): error TS2304: Cannot find name 'SomeUndefinedFunction'. +declarationEmitExpressionInExtends4.ts(20,18): error TS4020: 'extends' clause of exported class 'C3' has or is using private name 'SomeUndefinedFunction'. + + +==== declarationEmitExpressionInExtends4.ts (3 errors) ==== + function getSomething(): { + new(): {}; + } { + return class D { } + } + + const CBase: { + new(): {}; + } = getSomething(); + class C extends CBase { + + } + + const C2Base: any = SomeUndefinedFunction(); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeUndefinedFunction'. + class C2 extends C2Base { + + } + + + class C3 extends SomeUndefinedFunction { + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeUndefinedFunction'. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS4020: 'extends' clause of exported class 'C3' has or is using private name 'SomeUndefinedFunction'. + + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpressionInExtends7.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpressionInExtends7.d.ts new file mode 100644 index 0000000000000..3994ec3f30424 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpressionInExtends7.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/declarationEmitExpressionInExtends7.ts] //// + +//// [declarationEmitExpressionInExtends7.ts] +export default class extends SomeUndefinedFunction {} + + +/// [Declarations] //// + + + +//// [declarationEmitExpressionInExtends7.d.ts] +export default class extends SomeUndefinedFunction { +} +//# sourceMappingURL=declarationEmitExpressionInExtends7.d.ts.map +/// [Errors] //// + +declarationEmitExpressionInExtends7.ts(1,30): error TS2304: Cannot find name 'SomeUndefinedFunction'. +declarationEmitExpressionInExtends7.ts(1,30): error TS4021: 'extends' clause of exported class has or is using private name 'SomeUndefinedFunction'. + + +==== declarationEmitExpressionInExtends7.ts (2 errors) ==== + export default class extends SomeUndefinedFunction {} + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeUndefinedFunction'. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS4021: 'extends' clause of exported class has or is using private name 'SomeUndefinedFunction'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts new file mode 100644 index 0000000000000..928bbb9fb8fce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -0,0 +1,84 @@ +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// + +//// [impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [index.d.ts] +export * from "./src/impl"; +//// [package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [index.d.ts] +export * from "./src/impl"; +//// [package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [index.ts] +import * as _whatever from "p2"; +import { getA } from "typescript-fsa"; + +export const a = getA(); +//// [index.d.ts] +export const a: import("typescript-fsa").A; + + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +/p1/index.ts(4,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== /p1/node_modules/typescript-fsa/src/impl.d.ts (0 errors) ==== + export function getA(): A; + export enum A { + Val + } +==== /p1/node_modules/typescript-fsa/index.d.ts (0 errors) ==== + export * from "./src/impl"; +==== /p1/node_modules/typescript-fsa/package.json (0 errors) ==== + { + "name": "typescript-fsa", + "version": "1.0.0" + } +==== /p2/node_modules/typescript-fsa/src/impl.d.ts (0 errors) ==== + export function getA(): A; + export enum A { + Val + } +==== /p2/node_modules/typescript-fsa/index.d.ts (0 errors) ==== + export * from "./src/impl"; +==== /p2/node_modules/typescript-fsa/package.json (0 errors) ==== + { + "name": "typescript-fsa", + "version": "1.0.0" + } +==== /p1/index.ts (1 errors) ==== + import * as _whatever from "p2"; + import { getA } from "typescript-fsa"; + + export const a = getA(); + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /p1/index.ts:4:14: Add a type annotation to the variable a. +==== /p2/index.d.ts (0 errors) ==== + export const a: import("typescript-fsa").A; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts new file mode 100644 index 0000000000000..b282330d7d5bf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// + +//// [impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [index.d.ts] +export * from "./src/impl"; +//// [package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [index.ts] +import * as _whatever from "p2"; +import { getA } from "typescript-fsa"; + +export const a = getA(); +//// [index.d.ts] +export const a: import("typescript-fsa").A; + + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +/p1/index.ts(4,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== /cache/typescript-fsa/src/impl.d.ts (0 errors) ==== + export function getA(): A; + export enum A { + Val + } +==== /cache/typescript-fsa/index.d.ts (0 errors) ==== + export * from "./src/impl"; +==== /cache/typescript-fsa/package.json (0 errors) ==== + { + "name": "typescript-fsa", + "version": "1.0.0" + } +==== /p1/index.ts (1 errors) ==== + import * as _whatever from "p2"; + import { getA } from "typescript-fsa"; + + export const a = getA(); + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 /p1/index.ts:4:14: Add a type annotation to the variable a. +==== /p2/index.d.ts (0 errors) ==== + export const a: import("typescript-fsa").A; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts new file mode 100644 index 0000000000000..7d1443ff08cd4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts] //// + +//// [child1.ts] +import { ParentThing } from './parent'; + +declare module './parent' { + interface ParentThing { + add: (a: number, b: number) => number; + } +} + +export function child1(prototype: ParentThing): void { + prototype.add = (a: number, b: number) => a + b; +} + +//// [parent.ts] +import { child1 } from './child1'; // this import should still exist in some form in the output, since it augments this module + +export class ParentThing implements ParentThing {} + +child1(ParentThing.prototype); + +/// [Declarations] //// + + + +//// [child1.d.ts] +import { ParentThing } from './parent'; +declare module './parent' { + interface ParentThing { + add: (a: number, b: number) => number; + } +} +export declare function child1(prototype: ParentThing): void; +//# sourceMappingURL=child1.d.ts.map +//// [/.src/parent.d.ts] +export declare class ParentThing implements ParentThing { +} +//# sourceMappingURL=parent.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts new file mode 100644 index 0000000000000..c4221d1f6457c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts] //// + +//// [declarationEmitFunctionDuplicateNamespace.ts] +function f(a: 0): 0; +function f(a: 1): 1; +function f(a: 0 | 1) { + return a; +} + +f.x = 2; + + +/// [Declarations] //// + + + +//// [declarationEmitFunctionDuplicateNamespace.d.ts] +declare function f(a: 0): 0; +declare function f(a: 1): 1; +//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map +/// [Errors] //// + +declarationEmitFunctionDuplicateNamespace.ts(7,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== declarationEmitFunctionDuplicateNamespace.ts (1 errors) ==== + function f(a: 0): 0; + function f(a: 1): 1; + function f(a: 0 | 1) { + return a; + } + + f.x = 2; + ~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts new file mode 100644 index 0000000000000..efaa7f350054c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/declarationEmitFunctionKeywordProp.ts] //// + +//// [declarationEmitFunctionKeywordProp.ts] +function foo(): void {} +foo.null = true; + +function bar(): void {} +bar.async = true; +bar.normal = false; + +function baz(): void {} +baz.class = true; +baz.normal = false; + +/// [Declarations] //// + + + +//// [declarationEmitFunctionKeywordProp.d.ts] +declare function foo(): void; +declare function bar(): void; +declare function baz(): void; +//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map +/// [Errors] //// + +declarationEmitFunctionKeywordProp.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitFunctionKeywordProp.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitFunctionKeywordProp.ts(6,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitFunctionKeywordProp.ts(9,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitFunctionKeywordProp.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== declarationEmitFunctionKeywordProp.ts (5 errors) ==== + function foo(): void {} + foo.null = true; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + function bar(): void {} + bar.async = true; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + bar.normal = false; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + function baz(): void {} + baz.class = true; + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + baz.normal = false; + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitGlobalThisPreserved.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitGlobalThisPreserved.d.ts.map new file mode 100644 index 0000000000000..1aebcb1cfcbf5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitGlobalThisPreserved.d.ts.map @@ -0,0 +1,186 @@ +//// [tests/cases/compiler/declarationEmitGlobalThisPreserved.ts] //// + +//// [declarationEmitGlobalThisPreserved.ts] +// Adding this makes tooltips fail too. +// declare global { +// namespace isNaN { +// const prop: number; +// } +// } + +// Broken inference cases. + +export const a1 = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN; +export const a2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN; +export const a3 = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar; +export const a4 = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; + +export const aObj = { + a1: (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN, + a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN, + a3: (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar, + a4: (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN, +} + +export type a4Return = ReturnType>; +export type a4oReturn = ReturnType>; + +export const b1 = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN; +export const b2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN; +export const b3 = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar; +export const b4 = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; + +export const bObj = { + b1: (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN, + b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN, + b3: (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar, + b4: (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN, +} + +export type b4Return = ReturnType>; +export type b4oReturn = ReturnType>; + +export function c1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN { return isNaN } +export function c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar ?? isNaN } +export function c3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar } +export function c4(isNaN: number): typeof globalThis.isNaN { return globalThis.isNaN; } + +export const cObj = { + c1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN { return isNaN }, + c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar ?? isNaN }, + c3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar }, + c4(isNaN: number): typeof globalThis.isNaN { return globalThis.isNaN; }, +} + +export type c4Return = ReturnType>; +export type c4oReturn = ReturnType>; + +export function d1(): () => (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN { + const fn = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN; + return function() { return fn }; +} + +export function d2(): () => (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN { + const fn = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN; + return function() { return fn }; +} + +export function d3(): () => (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN { + const fn = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar; + return function() { return fn }; +} + +export function d4(): () => (isNaN: number) => typeof globalThis.isNaN { + const fn = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; + return function() { return fn }; +} + +export type d4Return = ReturnType>>>; + +export class A { + method1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN { return isNaN } + method2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar ?? isNaN } + method3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN { return bar } + method4(isNaN: number): typeof globalThis.isNaN { return globalThis.isNaN; } +} + +export function fromParameter(isNaN: number, bar: typeof globalThis.isNaN): () => { + bar: typeof globalThis.isNaN; +} { + return function() { return { bar } }; +} + +// Non-inference cases. + +export const explicitlyTypedVariable: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN = (isNaN) => isNaN; + +export function explicitlyTypedFunction(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN { + return isNaN; +}; + +export type AsObjectProperty = { + isNaN: typeof globalThis.isNaN; +} + +export class AsClassProperty { + isNaN?: typeof globalThis.isNaN; +} + +export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; + + + +/// [Declarations] //// + + + +//// [declarationEmitGlobalThisPreserved.d.ts] +export declare const a1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const a3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const a4: (isNaN: number) => typeof globalThis.isNaN; +export declare const aObj: { + a1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; + a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; + a3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; + a4: (isNaN: number) => typeof globalThis.isNaN; +}; +export type a4Return = ReturnType>; +export type a4oReturn = ReturnType>; +export declare const b1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const b3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare const b4: (isNaN: number) => typeof globalThis.isNaN; +export declare const bObj: { + b1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; + b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; + b3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; + b4: (isNaN: number) => typeof globalThis.isNaN; +}; +export type b4Return = ReturnType>; +export type b4oReturn = ReturnType>; +export declare function c1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN; +export declare function c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN; +export declare function c3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN; +export declare function c4(isNaN: number): typeof globalThis.isNaN; +export declare const cObj: { + c1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN; + c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN; + c3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN; + c4(isNaN: number): typeof globalThis.isNaN; +}; +export type c4Return = ReturnType>; +export type c4oReturn = ReturnType>; +export declare function d1(): () => (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare function d2(): () => (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare function d3(): () => (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare function d4(): () => (isNaN: number) => typeof globalThis.isNaN; +export type d4Return = ReturnType>>>; +export declare class A { + method1(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN; + method2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN; + method3(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN; + method4(isNaN: number): typeof globalThis.isNaN; +} +export declare function fromParameter(isNaN: number, bar: typeof globalThis.isNaN): () => { + bar: typeof globalThis.isNaN; +}; +export declare const explicitlyTypedVariable: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +export declare function explicitlyTypedFunction(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN; +export type AsObjectProperty = { + isNaN: typeof globalThis.isNaN; +}; +export declare class AsClassProperty { + isNaN?: typeof globalThis.isNaN; +} +export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; +//# sourceMappingURL=declarationEmitGlobalThisPreserved.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitGlobalThisPreserved.d.ts.map] +{"version":3,"file":"declarationEmitGlobalThisPreserved.d.ts","sourceRoot":"","sources":["declarationEmitGlobalThisPreserved.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,EAAE,GAAI,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,KAAG,OAAO,UAAU,CAAC,KAAc,CAAC;AACrF,eAAO,MAAM,EAAE,GAAI,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,KAAG,OAAO,UAAU,CAAC,KAAqB,CAAC;AAC3H,eAAO,MAAM,EAAE,GAAI,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,UAAU,CAAC,KAAK,KAAG,OAAO,UAAU,CAAC,KAAY,CAAC;AAChG,eAAO,MAAM,EAAE,GAAI,KAAK,EAAE,MAAM,KAAG,OAAO,UAAU,CAAC,KAAyB,CAAC;AAE/E,eAAO,MAAM,IAAI;SACR,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,KAAG,OAAO,UAAU,CAAC,KAAK;SACxD,KAAK,EAAE,OAAO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dte/declarationEmitIndexTypeNotFound.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitIndexTypeNotFound.d.ts new file mode 100644 index 0000000000000..5c34ad123ed82 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitIndexTypeNotFound.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/declarationEmitIndexTypeNotFound.ts] //// + +//// [declarationEmitIndexTypeNotFound.ts] +export interface Test { + [index: TypeNotFound]: any; +} + + +/// [Declarations] //// + + + +//// [declarationEmitIndexTypeNotFound.d.ts] +export interface Test { + [index: TypeNotFound]: any; +} +//# sourceMappingURL=declarationEmitIndexTypeNotFound.d.ts.map +/// [Errors] //// + +declarationEmitIndexTypeNotFound.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +declarationEmitIndexTypeNotFound.ts(2,13): error TS2304: Cannot find name 'TypeNotFound'. +declarationEmitIndexTypeNotFound.ts(2,13): error TS4092: Parameter 'index' of index signature from exported interface has or is using private name 'TypeNotFound'. + + +==== declarationEmitIndexTypeNotFound.ts (3 errors) ==== + export interface Test { + [index: TypeNotFound]: any; + ~~~~~ +!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'TypeNotFound'. + ~~~~~~~~~~~~ +!!! error TS4092: Parameter 'index' of index signature from exported interface has or is using private name 'TypeNotFound'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInlinedDistributiveConditional.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInlinedDistributiveConditional.d.ts new file mode 100644 index 0000000000000..1abe53fef4235 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInlinedDistributiveConditional.d.ts @@ -0,0 +1,51 @@ +//// [tests/cases/compiler/declarationEmitInlinedDistributiveConditional.ts] //// + +//// [test.ts] +import {dropPrivateProps1, dropPrivateProps2} from './api'; +const a = dropPrivateProps1({foo: 42, _bar: 'secret'}); // type is {foo: number} +//a._bar // error: _bar does not exist <===== as expected +const b = dropPrivateProps2({foo: 42, _bar: 'secret'}); // type is {foo: number, _bar: string} +//b._bar // no error, type of b._bar is string <===== NOT expected + +//// [api.ts] +import {PublicKeys1, excludePrivateKeys1, excludePrivateKeys2} from './internal'; +export const dropPrivateProps1 = (obj: Obj): { + [K in PublicKeys1]: Obj[K]; +} => excludePrivateKeys1(obj); +export const dropPrivateProps2 = (obj: Obj): { + [K in keyof Obj extends infer T ? T extends keyof Obj ? T extends `_${string}` ? never : T : never : never]: Obj[K]; +} => excludePrivateKeys2(obj); + +//// [internal.ts] +export declare function excludePrivateKeys1(obj: Obj): {[K in PublicKeys1]: Obj[K]}; +export declare function excludePrivateKeys2(obj: Obj): {[K in PublicKeys2]: Obj[K]}; +export type PublicKeys1 = T extends `_${string}` ? never : T; +type PublicKeys2 = T extends `_${string}` ? never : T; + +/// [Declarations] //// + + + +//// [test.d.ts] +export {}; +//# sourceMappingURL=test.d.ts.map +//// [/.src/api.d.ts] +import { PublicKeys1 } from './internal'; +export declare const dropPrivateProps1: (obj: Obj) => { + [K in PublicKeys1]: Obj[K]; +}; +export declare const dropPrivateProps2: (obj: Obj) => { + [K in keyof Obj extends infer T ? T extends keyof Obj ? T extends `_${string}` ? never : T : never : never]: Obj[K]; +}; +//# sourceMappingURL=api.d.ts.map +//// [/.src/internal.d.ts] +export declare function excludePrivateKeys1(obj: Obj): { + [K in PublicKeys1]: Obj[K]; +}; +export declare function excludePrivateKeys2(obj: Obj): { + [K in PublicKeys2]: Obj[K]; +}; +export type PublicKeys1 = T extends `_${string}` ? never : T; +type PublicKeys2 = T extends `_${string}` ? never : T; +export {}; +//# sourceMappingURL=internal.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts new file mode 100644 index 0000000000000..dfe5981713f25 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/declarationEmitLambdaWithMissingTypeParameterNoCrash.ts] //// + +//// [declarationEmitLambdaWithMissingTypeParameterNoCrash.ts] +export interface Foo { + preFetch: (c: T1) => void; // Type T2 is not defined + preFetcher: new (c: T1) => void; // Type T2 is not defined +} + + +/// [Declarations] //// + + + +//// [declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts] +export interface Foo { + preFetch: (c: T1) => void; + preFetcher: new (c: T1) => void; +} +//# sourceMappingURL=declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts.map +/// [Errors] //// + +declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(2,27): error TS2304: Cannot find name 'T2'. +declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(2,27): error TS4016: Type parameter 'T1' of exported function has or is using private name 'T2'. +declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(3,33): error TS2304: Cannot find name 'T2'. +declarationEmitLambdaWithMissingTypeParameterNoCrash.ts(3,33): error TS4006: Type parameter 'T1' of constructor signature from exported interface has or is using private name 'T2'. + + +==== declarationEmitLambdaWithMissingTypeParameterNoCrash.ts (4 errors) ==== + export interface Foo { + preFetch: (c: T1) => void; // Type T2 is not defined + ~~ +!!! error TS2304: Cannot find name 'T2'. + ~~ +!!! error TS4016: Type parameter 'T1' of exported function has or is using private name 'T2'. + preFetcher: new (c: T1) => void; // Type T2 is not defined + ~~ +!!! error TS2304: Cannot find name 'T2'. + ~~ +!!! error TS4006: Type parameter 'T1' of constructor signature from exported interface has or is using private name 'T2'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts new file mode 100644 index 0000000000000..01d8a916a8ad9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts @@ -0,0 +1,61 @@ +//// [tests/cases/compiler/declarationEmitLateBoundAssignments.ts] //// + +//// [declarationEmitLateBoundAssignments.ts] +export function foo(): void {} +foo.bar = 12; +const _private = Symbol(); +foo[_private] = "ok"; +const strMem = "strMemName"; +foo[strMem] = "ok"; +const dashStrMem = "dashed-str-mem"; +foo[dashStrMem] = "ok"; +const numMem = 42; +foo[numMem] = "ok"; + +const x: string = foo[_private]; +const y: string = foo[strMem]; +const z: string = foo[numMem]; +const a: string = foo[dashStrMem]; + +/// [Declarations] //// + + + +//// [declarationEmitLateBoundAssignments.d.ts] +export declare function foo(): void; +//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map +/// [Errors] //// + +declarationEmitLateBoundAssignments.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments.ts(6,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments.ts(8,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== declarationEmitLateBoundAssignments.ts (5 errors) ==== + export function foo(): void {} + foo.bar = 12; + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + const _private = Symbol(); + foo[_private] = "ok"; + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + const strMem = "strMemName"; + foo[strMem] = "ok"; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + const dashStrMem = "dashed-str-mem"; + foo[dashStrMem] = "ok"; + ~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + const numMem = 42; + foo[numMem] = "ok"; + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + const x: string = foo[_private]; + const y: string = foo[strMem]; + const z: string = foo[numMem]; + const a: string = foo[dashStrMem]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts new file mode 100644 index 0000000000000..131a519653fb6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -0,0 +1,291 @@ +//// [tests/cases/compiler/declarationEmitLateBoundAssignments2.ts] //// + +//// [declarationEmitLateBoundAssignments2.ts] +// https://github.com/microsoft/TypeScript/issues/54811 + +const c = "C" +const num = 1 +const numStr = "10" +const withWhitespace = "foo bar" +const emoji = "🤷‍♂️" + +export function decl(): void {} +decl["B"] = 'foo' + +export function decl2(): void {} +decl2[c] = 0 + +export function decl3(): void {} +decl3[77] = 0 + +export function decl4(): void {} +decl4[num] = 0 + +export function decl5(): void {} +decl5["101"] = 0 + +export function decl6(): void {} +decl6[numStr] = 0 + +export function decl7(): void {} +decl7["qwe rty"] = 0 + +export function decl8(): void {} +decl8[withWhitespace] = 0 + +export function decl9(): void {} +decl9["🤪"] = 0 + +export function decl10(): void {} +decl10[emoji] = 0 + +export const arrow: { + (): void + B: string +} = (): void => {} +arrow["B"] = 'bar' + +export const arrow2: { + (): void + C: number +} = (): void => {} +arrow2[c] = 100 + +export const arrow3: { + (): void + 77: number +} = (): void => {} +arrow3[77] = 0 + +export const arrow4: { + (): void + 1: number +} = (): void => {} +arrow4[num] = 0 + +export const arrow5: { + (): void + "101": number +} = (): void => {} +arrow5["101"] = 0 + +export const arrow6: { + (): void + "10": number +} = (): void => {} +arrow6[numStr] = 0 + +export const arrow7: { + (): void + "qwe rty": number +} = (): void => {} +arrow7["qwe rty"] = 0 + +export const arrow8: { + (): void + "foo bar": number +} = (): void => {} +arrow8[withWhitespace] = 0 + +export const arrow9: { + (): void + "🤪": number +} = (): void => {} +arrow9["🤪"] = 0 + +export const arrow10: { + (): void + "🤷‍♂️": number +} = (): void => {} +arrow10[emoji] = 0 + + +/// [Declarations] //// + + + +//// [declarationEmitLateBoundAssignments2.d.ts] +export declare function decl(): void; +export declare function decl2(): void; +export declare function decl3(): void; +export declare function decl4(): void; +export declare function decl5(): void; +export declare function decl6(): void; +export declare function decl7(): void; +export declare function decl8(): void; +export declare function decl9(): void; +export declare function decl10(): void; +export declare const arrow: { + (): void; + B: string; +}; +export declare const arrow2: { + (): void; + C: number; +}; +export declare const arrow3: { + (): void; + 77: number; +}; +export declare const arrow4: { + (): void; + 1: number; +}; +export declare const arrow5: { + (): void; + "101": number; +}; +export declare const arrow6: { + (): void; + "10": number; +}; +export declare const arrow7: { + (): void; + "qwe rty": number; +}; +export declare const arrow8: { + (): void; + "foo bar": number; +}; +export declare const arrow9: { + (): void; + "🤪": number; +}; +export declare const arrow10: { + (): void; + "🤷‍♂️": number; +}; +//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map +/// [Errors] //// + +declarationEmitLateBoundAssignments2.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(13,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(16,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(19,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(22,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(25,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(28,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(31,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(34,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +declarationEmitLateBoundAssignments2.ts(37,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== declarationEmitLateBoundAssignments2.ts (10 errors) ==== + // https://github.com/microsoft/TypeScript/issues/54811 + + const c = "C" + const num = 1 + const numStr = "10" + const withWhitespace = "foo bar" + const emoji = "🤷‍♂️" + + export function decl(): void {} + decl["B"] = 'foo' + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl2(): void {} + decl2[c] = 0 + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl3(): void {} + decl3[77] = 0 + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl4(): void {} + decl4[num] = 0 + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl5(): void {} + decl5["101"] = 0 + ~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl6(): void {} + decl6[numStr] = 0 + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl7(): void {} + decl7["qwe rty"] = 0 + ~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl8(): void {} + decl8[withWhitespace] = 0 + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl9(): void {} + decl9["🤪"] = 0 + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export function decl10(): void {} + decl10[emoji] = 0 + ~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export const arrow: { + (): void + B: string + } = (): void => {} + arrow["B"] = 'bar' + + export const arrow2: { + (): void + C: number + } = (): void => {} + arrow2[c] = 100 + + export const arrow3: { + (): void + 77: number + } = (): void => {} + arrow3[77] = 0 + + export const arrow4: { + (): void + 1: number + } = (): void => {} + arrow4[num] = 0 + + export const arrow5: { + (): void + "101": number + } = (): void => {} + arrow5["101"] = 0 + + export const arrow6: { + (): void + "10": number + } = (): void => {} + arrow6[numStr] = 0 + + export const arrow7: { + (): void + "qwe rty": number + } = (): void => {} + arrow7["qwe rty"] = 0 + + export const arrow8: { + (): void + "foo bar": number + } = (): void => {} + arrow8[withWhitespace] = 0 + + export const arrow9: { + (): void + "🤪": number + } = (): void => {} + arrow9["🤪"] = 0 + + export const arrow10: { + (): void + "🤷‍♂️": number + } = (): void => {} + arrow10[emoji] = 0 + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedPrivateTypeTypeParameter.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedPrivateTypeTypeParameter.d.ts new file mode 100644 index 0000000000000..2c8c84fdafbf2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedPrivateTypeTypeParameter.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts] //// + +//// [Helpers.ts] +export type StringKeyOf = Extract; + +//// [FromFactor.ts] +export type RowToColumns = { + [TName in StringKeyOf]: any; +} + +/// [Declarations] //// + + + +//// [/FromFactor.d.ts] +export type RowToColumns = { + [TName in StringKeyOf]: any; +}; +//# sourceMappingURL=FromFactor.d.ts.map +//// [/Helpers.d.ts] +export type StringKeyOf = Extract; +//# sourceMappingURL=Helpers.d.ts.map +/// [Errors] //// + +/FromFactor.ts(2,15): error TS2304: Cannot find name 'StringKeyOf'. +/FromFactor.ts(2,15): error TS4103: Type parameter 'TName' of exported mapped object type is using private name 'StringKeyOf'. + + +==== /Helpers.ts (0 errors) ==== + export type StringKeyOf = Extract; + +==== /FromFactor.ts (2 errors) ==== + export type RowToColumns = { + [TName in StringKeyOf]: any; + ~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'StringKeyOf'. + ~~~~~~~~~~~ +!!! error TS4103: Type parameter 'TName' of exported mapped object type is using private name 'StringKeyOf'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts new file mode 100644 index 0000000000000..87c61b2b41462 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts @@ -0,0 +1,70 @@ +//// [tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts] //// + +//// [a.d.ts] +export declare const timestampSymbol: unique symbol; + +export declare const Timestamp: { + [TKey in typeof timestampSymbol]: true; +}; + +export declare function now(): typeof Timestamp; + +//// [b.ts] +import * as x from "./a"; +export const timestamp: { + [x.timestampSymbol]: true; +} = x.now(); + +//// [c.ts] +import { now } from "./a"; + +export const timestamp: { + [timestampSymbol]: true; +} = now(); + +/// [Declarations] //// + + + +//// [b.d.ts] +import * as x from "./a"; +export declare const timestamp: { + [x.timestampSymbol]: true; +}; +//# sourceMappingURL=b.d.ts.map +//// [c.d.ts] +export declare const timestamp: { + [timestampSymbol]: true; +}; +//# sourceMappingURL=c.d.ts.map +/// [Errors] //// + +c.ts(4,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +c.ts(4,6): error TS2304: Cannot find name 'timestampSymbol'. + + +==== a.d.ts (0 errors) ==== + export declare const timestampSymbol: unique symbol; + + export declare const Timestamp: { + [TKey in typeof timestampSymbol]: true; + }; + + export declare function now(): typeof Timestamp; + +==== b.ts (0 errors) ==== + import * as x from "./a"; + export const timestamp: { + [x.timestampSymbol]: true; + } = x.now(); + +==== c.ts (2 errors) ==== + import { now } from "./a"; + + export const timestamp: { + [timestampSymbol]: true; + ~~~~~~~~~~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'timestampSymbol'. + } = now(); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNameConflicts3.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNameConflicts3.d.ts.map new file mode 100644 index 0000000000000..98c4d50a1eccb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNameConflicts3.d.ts.map @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/declarationEmitNameConflicts3.ts] //// + +//// [declarationEmitNameConflicts3.ts] +module M { + export interface D { } + export module D { + export function f(): void { } + } + export module C { + export function f(): void { } + } + export module E { + export function f(): void { } + } +} + +module M.P { + export class C { + static f(): void { } + } + export class E extends C { } + export enum D { + f + } + export var v: M.D; // ok + export var w: typeof M.D.f = M.D.f; // error, should be typeof M.D.f + export var x: typeof M.C.f = M.C.f; // error, should be typeof M.C.f + export var x = M.E.f; // error, should be typeof M.E.f +} + +/// [Declarations] //// + + + +//// [declarationEmitNameConflicts3.d.ts] +declare namespace M { + interface D { + } + namespace D { + function f(): void; + } + namespace C { + function f(): void; + } + namespace E { + function f(): void; + } +} +declare namespace M.P { + class C { + static f(): void; + } + class E extends C { + } + enum D { + f = 0 + } + var v: M.D; + var w: typeof M.D.f; + var x: typeof M.C.f; + var x: typeof M.C.f; +} +//# sourceMappingURL=declarationEmitNameConflicts3.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitNameConflicts3.d.ts.map] +{"version":3,"file":"declarationEmitNameConflicts3.d.ts","sourceRoot":"","sources":["declarationEmitNameConflicts3.ts"],"names":[],"mappings":"AAAA,kBAAO,CAAC,CAAC;IACL,UAAiB,CAAC;KAAI;IACtB,UAAc,CAAC,CAAC;QACZ,SAAgB,CAAC,IAAI,IAAI,CAAI;KAChC;IACD,UAAc,CAAC,CAAC;QACZ,SAAgB,CAAC,IAAI,IAAI,CAAI;KAChC;IACD,UAAc,CAAC,CAAC;QACZ,SAAgB,CAAC,IAAI,IAAI,CAAI;KACh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ICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBDIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBFIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQp9Cgptb2R1bGUgTS5QIHsKICAgIGV4cG9ydCBjbGFzcyBDIHsKICAgICAgICBzdGF0aWMgZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IGNsYXNzIEUgZXh0ZW5kcyBDIHsgfQogICAgZXhwb3J0IGVudW0gRCB7CiAgICAgICAgZgogICAgfQogICAgZXhwb3J0IHZhciB2OiBNLkQ7IC8vIG9rCiAgICBleHBvcnQgdmFyIHc6IHR5cGVvZiBNLkQuZiA9IE0uRC5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkQuZgogICAgZXhwb3J0IHZhciB4OiB0eXBlb2YgTS5DLmYgPSBNLkMuZjsgLy8gZXJyb3IsIHNob3VsZCBiZSB0eXBlb2YgTS5DLmYKICAgIGV4cG9ydCB2YXIgeCA9IE0uRS5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkUuZgp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNoNonRequiredParens.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNoNonRequiredParens.d.ts new file mode 100644 index 0000000000000..12d967b1ec231 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNoNonRequiredParens.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/declarationEmitNoNonRequiredParens.ts] //// + +//// [declarationEmitNoNonRequiredParens.ts] +export enum Test { + A, B, C +} + +export type TestType = typeof Test; + +export const bar = (null as TestType[Extract][]); + +/// [Declarations] //// + + + +//// [declarationEmitNoNonRequiredParens.d.ts] +export declare enum Test { + A = 0, + B = 1, + C = 2 +} +export type TestType = typeof Test; +export declare const bar: TestType[Extract][]; +//# sourceMappingURL=declarationEmitNoNonRequiredParens.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts new file mode 100644 index 0000000000000..4df5916584557 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -0,0 +1,108 @@ +//// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// + +//// [index.d.ts] +interface Statics { + "$$whatever": string; +} +declare namespace hoistNonReactStatics { + type NonReactStatics = {[X in Exclude]: T[X]} +} +export = hoistNonReactStatics; +//// [index.d.ts] +import * as hoistNonReactStatics from "hoist-non-react-statics"; +export interface DefaultTheme {} +export type StyledComponent = + string + & StyledComponentBase + & hoistNonReactStatics.NonReactStatics; +export interface StyledComponentBase { + tag: TTag; + theme: TTheme; + style: TStyle; + whatever: TWhatever; +} +export interface StyledInterface { + div: (a: TemplateStringsArray) => StyledComponent<"div">; +} + +declare const styled: StyledInterface; +export default styled; +//// [index.ts] +import styled, { DefaultTheme, StyledComponent } from "styled-components"; + +const A = styled.div``; +const B = styled.div``; +export const C: StyledComponent<"div", DefaultTheme, {}, never> = styled.div``; + +export default Object.assign(A, { + B, + C +}); + + +/// [Declarations] //// + + + +//// [index.d.ts] +import { DefaultTheme, StyledComponent } from "styled-components"; +export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; +declare const _default: invalid; +export default _default; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +index.ts(7,1): error TS2742: The inferred type of 'default' cannot be named without a reference to 'styled-components/node_modules/hoist-non-react-statics'. This is likely not portable. A type annotation is necessary. +index.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. + + +==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== + interface Statics { + "$$whatever": string; + } + declare namespace hoistNonReactStatics { + type NonReactStatics = {[X in Exclude]: T[X]} + } + export = hoistNonReactStatics; +==== node_modules/styled-components/index.d.ts (0 errors) ==== + import * as hoistNonReactStatics from "hoist-non-react-statics"; + export interface DefaultTheme {} + export type StyledComponent = + string + & StyledComponentBase + & hoistNonReactStatics.NonReactStatics; + export interface StyledComponentBase { + tag: TTag; + theme: TTheme; + style: TStyle; + whatever: TWhatever; + } + export interface StyledInterface { + div: (a: TemplateStringsArray) => StyledComponent<"div">; + } + + declare const styled: StyledInterface; + export default styled; +==== index.ts (2 errors) ==== + import styled, { DefaultTheme, StyledComponent } from "styled-components"; + + const A = styled.div``; + const B = styled.div``; + export const C: StyledComponent<"div", DefaultTheme, {}, never> = styled.div``; + + export default Object.assign(A, { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~ + B, + ~~~~~~ + ~~~~~~ + C + ~~~~~ + ~~~~~ + }); + ~~~ +!!! error TS2742: The inferred type of 'default' cannot be named without a reference to 'styled-components/node_modules/hoist-non-react-statics'. This is likely not portable. A type annotation is necessary. + ~~ +!!! error TS9037: Default exports can't be inferred with --isolatedDeclarations. +!!! related TS9036 index.ts:7:1: Move the expression in default export to a variable and add a type annotation to it. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts new file mode 100644 index 0000000000000..86a244d5fc3c9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts @@ -0,0 +1,62 @@ +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + +//// [declarationEmitObjectLiteralAccessors1.ts] +// same type accessors +export const obj1 = { + /** my awesome getter (first in source order) */ + get x(): string { + return ""; + }, + /** my awesome setter (second in source order) */ + set x(a: string) {}, +}; + +// divergent accessors +export const obj2 = { + /** my awesome getter */ + get x(): string { + return ""; + }, + /** my awesome setter */ + set x(a: number) {}, +}; + +export const obj3 = { + /** my awesome getter */ + get x(): string { + return ""; + }, +}; + +export const obj4 = { + /** my awesome setter */ + set x(a: number) {}, +}; + + +/// [Declarations] //// + + + +//// [declarationEmitObjectLiteralAccessors1.d.ts] +export declare const obj1: { + /** my awesome getter (first in source order) */ + get x(): string; + /** my awesome setter (second in source order) */ + set x(a: string); +}; +export declare const obj2: { + /** my awesome getter */ + get x(): string; + /** my awesome setter */ + set x(a: number); +}; +export declare const obj3: { + /** my awesome getter */ + readonly x: string; +}; +export declare const obj4: { + /** my awesome setter */ + x: number; +}; +//# sourceMappingURL=declarationEmitObjectLiteralAccessors1.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitOptionalMethod.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitOptionalMethod.d.ts.map new file mode 100644 index 0000000000000..d23639f5fe679 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitOptionalMethod.d.ts.map @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationEmitOptionalMethod.ts] //// + +//// [declarationEmitOptionalMethod.ts] +export const Foo = (opts: { + a?(): void, + b?: () => void, +}): { + c?(): void, + d?: () => void, +} => ({ }); + +/// [Declarations] //// + + + +//// [declarationEmitOptionalMethod.d.ts] +export declare const Foo: (opts: { + a?(): void; + b?: () => void; +}) => { + c?(): void; + d?: () => void; +}; +//# sourceMappingURL=declarationEmitOptionalMethod.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitOptionalMethod.d.ts.map] +{"version":3,"file":"declarationEmitOptionalMethod.d.ts","sourceRoot":"","sources":["declarationEmitOptionalMethod.ts"],"names":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== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts.map new file mode 100644 index 0000000000000..5e216376c1e2b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts.map @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + +//// [declarationEmitParameterProperty.ts] +export class Foo { + constructor(public bar?: string) { + } +} + + +/// [Declarations] //// + + + +//// [declarationEmitParameterProperty.d.ts] +export declare class Foo { + bar?: string | undefined; + constructor(bar?: string | undefined); +} +//# sourceMappingURL=declarationEmitParameterProperty.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitParameterProperty.d.ts.map] +{"version":3,"file":"declarationEmitParameterProperty.d.ts","sourceRoot":"","sources":["declarationEmitParameterProperty.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACK,GAAG,CAAC,EAAE,MAAM;gBAAZ,GAAG,CAAC,EAAE,MAAM,YAAA;CAEhC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBiYXI/OiBzdHJpbmcgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoYmFyPzogc3RyaW5nIHwgdW5kZWZpbmVkKTsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UGFyYW1ldGVyUHJvcGVydHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHFCQUFhLEdBQUc7SUFDSyxHQUFHLENBQUMsRUFBRSxNQUFNO2dCQUFaLEdBQUcsQ0FBQyxFQUFFLE1BQU0sWUFBQTtDQUVoQyJ9,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgY29uc3RydWN0b3IocHVibGljIGJhcj86IHN0cmluZykgewogIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map new file mode 100644 index 0000000000000..92c6964431b87 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts] //// + +//// [scalar.ts] +export interface Scalar { + (): string; + value: number; +} + +export function scalar(value: string): Scalar { + return null as any; +} +//// [spacing.ts] +import { Scalar, scalar } from '../lib/operators/scalar'; + +export default { + get xs(): Scalar { + return scalar("14px"); + } +}; + + +/// [Declarations] //// + + + +//// [/.src/dist/lib/operators/scalar.d.ts] +export interface Scalar { + (): string; + value: number; +} +export declare function scalar(value: string): Scalar; +//# sourceMappingURL=scalar.d.ts.map +//// [/.src/dist/settings/spacing.d.ts] +import { Scalar } from '../lib/operators/scalar'; +declare const _default: { + readonly xs: Scalar; +}; +export default _default; +//# sourceMappingURL=spacing.d.ts.map + +/// [Declarations Maps] //// + + +//// [/.src/dist/lib/operators/scalar.d.ts.map] +{"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["../../../src/lib/operators/scalar.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,IAAI,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5C"} + + +//// [/.src/dist/settings/spacing.d.ts.map] +{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/settings/spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;aAGpD,EAAE,EAAI,MAAM;;AADjB,wBAIE"} + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map new file mode 100644 index 0000000000000..4dc853b4a7327 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map @@ -0,0 +1,54 @@ +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts] //// + +//// [scalar.ts] +export interface Scalar { + (): string; + value: number; +} + +export function scalar(value: string): Scalar { + return null as any; +} +//// [spacing.ts] +import { Scalar, scalar } from '../lib/operators/scalar'; + +export default { + get xs(): Scalar { + return scalar("14px"); + } +}; + + +/// [Declarations] //// + + + +//// [src/lib/operators/scalar.d.ts] +export interface Scalar { + (): string; + value: number; +} +export declare function scalar(value: string): Scalar; +//# sourceMappingURL=scalar.d.ts.map +//// [src/settings/spacing.d.ts] +import { Scalar } from '../lib/operators/scalar'; +declare const _default: { + readonly xs: Scalar; +}; +export default _default; +//# sourceMappingURL=spacing.d.ts.map + +/// [Declarations Maps] //// + + +//// [src/lib/operators/scalar.d.ts.map] +{"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["scalar.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,IAAI,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5C"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBTY2FsYXIgew0KICAgICgpOiBzdHJpbmc7DQogICAgdmFsdWU6IG51bWJlcjsNCn0NCmV4cG9ydCBkZWNsYXJlIGZ1bmN0aW9uIHNjYWxhcih2YWx1ZTogc3RyaW5nKTogU2NhbGFyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c2NhbGFyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NhbGFyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY2FsYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxXQUFXLE1BQU07SUFDdEIsSUFBSSxNQUFNLENBQUM7SUFDWCxLQUFLLEVBQUUsTUFBTSxDQUFDO0NBQ2Q7QUFFRCx3QkFBZ0IsTUFBTSxDQUFDLEtBQUssRUFBRSxNQUFNLEdBQUcsTUFBTSxDQUU1QyJ9,ZXhwb3J0IGludGVyZmFjZSBTY2FsYXIgewoJKCk6IHN0cmluZzsKCXZhbHVlOiBudW1iZXI7Cn0KCmV4cG9ydCBmdW5jdGlvbiBzY2FsYXIodmFsdWU6IHN0cmluZyk6IFNjYWxhciB7CglyZXR1cm4gbnVsbCBhcyBhbnk7Cn0= + + +//// [src/settings/spacing.d.ts.map] +{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;aAGpD,EAAE,EAAI,MAAM;;AADjB,wBAIE"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIHJlYWRvbmx5IHhzOiBTY2FsYXI7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zcGFjaW5nLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2luZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhY2luZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFVLE1BQU0seUJBQXlCLENBQUM7O2FBR3BELEVBQUUsRUFBSSxNQUFNOztBQURqQix3QkFJRSJ9,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPropertyNumericStringKey.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPropertyNumericStringKey.d.ts new file mode 100644 index 0000000000000..801936dca11e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPropertyNumericStringKey.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts] //// + +//// [declarationEmitPropertyNumericStringKey.ts] +// https://github.com/microsoft/TypeScript/issues/55292 + +const STATUS = { + ["404"]: "not found", +} as const; + +const hundredStr = "100"; +const obj = { [hundredStr]: "foo" }; + +const hundredNum = 100; +const obj2 = { [hundredNum]: "bar" }; + + +/// [Declarations] //// + + + +//// [declarationEmitPropertyNumericStringKey.d.ts] +declare const STATUS: { + readonly "404": "not found"; +}; +declare const hundredStr = "100"; +declare const obj: { + [hundredStr]: string; +}; +declare const hundredNum = 100; +declare const obj2: { + [hundredNum]: string; +}; +//# sourceMappingURL=declarationEmitPropertyNumericStringKey.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReadonlyComputedProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReadonlyComputedProperty.d.ts new file mode 100644 index 0000000000000..6970ee4955305 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReadonlyComputedProperty.d.ts @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts] //// + +//// [bug.ts] +export const SYMBOL: unique symbol = Symbol() + +export interface Interface { + readonly [SYMBOL]: string; // remove readonly and @showEmit to see the expected error +} + +export function createInstance(): Interface { + return { + [SYMBOL]: '' + } +} + +//// [index.ts] +import { createInstance } from './bug' + +export const spread: { + [SYMBOL]: string +} = { + ...createInstance(), +} + +/// [Declarations] //// + + + +//// [bug.d.ts] +export declare const SYMBOL: unique symbol; +export interface Interface { + readonly [SYMBOL]: string; +} +export declare function createInstance(): Interface; +//# sourceMappingURL=bug.d.ts.map +//// [index.d.ts] +export declare const spread: { + [SYMBOL]: string; +}; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +index.ts(4,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +index.ts(4,6): error TS2552: Cannot find name 'SYMBOL'. Did you mean 'Symbol'? + + +==== bug.ts (0 errors) ==== + export const SYMBOL: unique symbol = Symbol() + + export interface Interface { + readonly [SYMBOL]: string; // remove readonly and @showEmit to see the expected error + } + + export function createInstance(): Interface { + return { + [SYMBOL]: '' + } + } + +==== index.ts (2 errors) ==== + import { createInstance } from './bug' + + export const spread: { + [SYMBOL]: string + ~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~ +!!! error TS2552: Cannot find name 'SYMBOL'. Did you mean 'Symbol'? +!!! related TS2728 lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here. + } = { + ...createInstance(), + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map new file mode 100644 index 0000000000000..51edaeaa648c8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map @@ -0,0 +1,122 @@ +//// [tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts] //// + +//// [input.d.ts] +type _BuildPowersOf2LengthArrays< + Length extends number, + AccumulatedArray extends never[][], +> = AccumulatedArray[0][Length] extends never + ? AccumulatedArray + : _BuildPowersOf2LengthArrays< + Length, + [[...AccumulatedArray[0], ...AccumulatedArray[0]], ...AccumulatedArray] + >; + +type _ConcatLargestUntilDone< + Length extends number, + AccumulatedArray extends never[][], + NextArray extends never[], +> = NextArray['length'] extends Length + ? NextArray + : [...AccumulatedArray[0], ...NextArray][Length] extends never + ? _ConcatLargestUntilDone< + Length, + AccumulatedArray extends [AccumulatedArray[0], ...infer U] + ? U extends never[][] + ? U + : never + : never, + NextArray + > + : _ConcatLargestUntilDone< + Length, + AccumulatedArray extends [AccumulatedArray[0], ...infer U] + ? U extends never[][] + ? U + : never + : never, + [...AccumulatedArray[0], ...NextArray] + > + +type _Replace = { [K in keyof R]: T }; + +export type TupleOf = number extends Length + ? Type[] + : { + // in case Length is a union + [LengthKey in Length]: _BuildPowersOf2LengthArrays< + LengthKey, + [[never]] + > extends infer TwoDimensionalArray + ? TwoDimensionalArray extends never[][] + ? _Replace<_ConcatLargestUntilDone, Type> + : never + : never + }[Length]; + +export type Subtract = TupleOf extends [ + ...TupleOf, + ...infer R, +] + ? R['length'] + : never; + +export type Decrement = Subtract; + +export type Add = [ + ...TupleOf, + ...TupleOf, +]['length'] & + // intersection to suppress compiler narrowing bug + number; + +type _MultiAdd< + Num extends number, + Accumulator extends number, + IterationsLeft extends number, +> = IterationsLeft extends 0 + ? Accumulator + : _MultiAdd, Decrement> + +export type Multiply = number extends N1 | N2 + ? number + : { + [K2 in N2]: { [K1 in N1]: _MultiAdd }[N1] + }[N2] + +type PowerTailRec< + Num extends number, + PowerOf extends number, + Result extends number, +> = number extends PowerOf + ? number + : PowerOf extends 0 + ? Result + : PowerTailRec, Multiply>; + +export type Power = PowerTailRec; + +//// [a.tsx] +import { Power } from "./input"; + +export const power = ( + num: Num, + powerOf: PowerOf +): Power => (num ** powerOf) as never; + +/// [Declarations] //// + + + +//// [a.d.ts] +import { Power } from "./input"; +export declare const power: (num: Num, powerOf: PowerOf) => Power; +//# sourceMappingURL=a.d.ts.map + +/// [Declarations Maps] //// + + +//// [a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,KAAK,GAAI,GAAG,SAAS,MAAM,EAAE,OAAO,SAAS,MAAM,EAC5D,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,KACjB,KAAK,CAAC,GAAG,EAAE,OAAO,CAA8B,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgUG93ZXIgfSBmcm9tICIuL2lucHV0IjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IHBvd2VyOiA8TnVtIGV4dGVuZHMgbnVtYmVyLCBQb3dlck9mIGV4dGVuZHMgbnVtYmVyPihudW06IE51bSwgcG93ZXJPZjogUG93ZXJPZikgPT4gUG93ZXI8TnVtLCBQb3dlck9mPjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUVoQyxlQUFPLE1BQU0sS0FBSyxHQUFJLEdBQUcsU0FBUyxNQUFNLEVBQUUsT0FBTyxTQUFTLE1BQU0sRUFDNUQsR0FBRyxFQUFFLEdBQUcsRUFDUixPQUFPLEVBQUUsT0FBTyxLQUNqQixLQUFLLENBQUMsR0FBRyxFQUFFLE9BQU8sQ0FBOEIsQ0FBQyJ9,aW1wb3J0IHsgUG93ZXIgfSBmcm9tICIuL2lucHV0IjsKCmV4cG9ydCBjb25zdCBwb3dlciA9IDxOdW0gZXh0ZW5kcyBudW1iZXIsIFBvd2VyT2YgZXh0ZW5kcyBudW1iZXI+KAogICAgbnVtOiBOdW0sCiAgICBwb3dlck9mOiBQb3dlck9mCik6IFBvd2VyPE51bSwgUG93ZXJPZj4gPT4gKG51bSAqKiBwb3dlck9mKSBhcyBuZXZlcjs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts new file mode 100644 index 0000000000000..47deda1cd00c7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -0,0 +1,105 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// + +//// [index.ts] +export * from './keys'; +//// [keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export declare type A = { + id: string; +}; +export declare type B = { + id: number; +}; +export declare type IdType = A | B; +export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; +} +//// [package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export * from '@raymondfeng/pkg1'; +//// [package.json] +{ + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} + +/// [Declarations] //// + + + +//// [/.src/monorepo/pkg3/dist/index.d.ts] +export * from './keys'; +//# sourceMappingURL=index.d.ts.map +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== monorepo/pkg3/src/index.ts (0 errors) ==== + export * from './keys'; +==== monorepo/pkg3/src/keys.ts (1 errors) ==== + import {MetadataAccessor} from "@raymondfeng/pkg2"; + + export const ADMIN = MetadataAccessor.create('1'); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 monorepo/pkg3/src/keys.ts:3:14: Add a type annotation to the variable ADMIN. +==== monorepo/pkg1/dist/index.d.ts (0 errors) ==== + export * from './types'; +==== monorepo/pkg1/dist/types.d.ts (0 errors) ==== + export declare type A = { + id: string; + }; + export declare type B = { + id: number; + }; + export declare type IdType = A | B; + export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; + } +==== monorepo/pkg1/package.json (0 errors) ==== + { + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } +==== monorepo/pkg2/dist/index.d.ts (0 errors) ==== + export * from './types'; +==== monorepo/pkg2/dist/types.d.ts (0 errors) ==== + export * from '@raymondfeng/pkg1'; +==== monorepo/pkg2/package.json (0 errors) ==== + { + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts new file mode 100644 index 0000000000000..a1fb2b7d60100 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -0,0 +1,111 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// + +//// [index.ts] +export * from './keys'; +//// [keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export declare type A = { + id: string; +}; +export declare type B = { + id: number; +}; +export declare type IdType = A | B; +export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; +} +//// [package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [index.d.ts] +import "./secondary"; +export * from './types'; +//// [types.d.ts] +export {MetadataAccessor} from '@raymondfeng/pkg1'; +//// [secondary.d.ts] +export {IdType} from '@raymondfeng/pkg1'; +//// [package.json] +{ + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} + +/// [Declarations] //// + + + +//// [/.src/monorepo/pkg3/dist/index.d.ts] +export * from './keys'; +//# sourceMappingURL=index.d.ts.map +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== monorepo/pkg3/src/index.ts (0 errors) ==== + export * from './keys'; +==== monorepo/pkg3/src/keys.ts (1 errors) ==== + import {MetadataAccessor} from "@raymondfeng/pkg2"; + + export const ADMIN = MetadataAccessor.create('1'); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 monorepo/pkg3/src/keys.ts:3:14: Add a type annotation to the variable ADMIN. +==== monorepo/pkg1/dist/index.d.ts (0 errors) ==== + export * from './types'; +==== monorepo/pkg1/dist/types.d.ts (0 errors) ==== + export declare type A = { + id: string; + }; + export declare type B = { + id: number; + }; + export declare type IdType = A | B; + export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; + } +==== monorepo/pkg1/package.json (0 errors) ==== + { + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } +==== monorepo/pkg2/dist/index.d.ts (0 errors) ==== + import "./secondary"; + export * from './types'; +==== monorepo/pkg2/dist/types.d.ts (0 errors) ==== + export {MetadataAccessor} from '@raymondfeng/pkg1'; +==== monorepo/pkg2/dist/secondary.d.ts (0 errors) ==== + export {IdType} from '@raymondfeng/pkg1'; +==== monorepo/pkg2/package.json (0 errors) ==== + { + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts new file mode 100644 index 0000000000000..3233e1cbe9f44 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -0,0 +1,108 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// + +//// [index.ts] +export * from './keys'; +//// [keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export declare type A = { + id: string; +}; +export declare type B = { + id: number; +}; +export declare type IdType = A | B; +export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; +} +//// [package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [index.d.ts] +export * from './types'; +//// [types.d.ts] +export {MetadataAccessor} from '@raymondfeng/pkg1'; +//// [package.json] +{ + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} + +/// [Declarations] //// + + + +//// [/.src/monorepo/pkg3/dist/index.d.ts] +export * from './keys'; +//# sourceMappingURL=index.d.ts.map +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,14): error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary. +monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== monorepo/pkg3/src/index.ts (0 errors) ==== + export * from './keys'; +==== monorepo/pkg3/src/keys.ts (2 errors) ==== + import {MetadataAccessor} from "@raymondfeng/pkg2"; + + export const ADMIN = MetadataAccessor.create('1'); + ~~~~~ +!!! error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 monorepo/pkg3/src/keys.ts:3:14: Add a type annotation to the variable ADMIN. +==== monorepo/pkg1/dist/index.d.ts (0 errors) ==== + export * from './types'; +==== monorepo/pkg1/dist/types.d.ts (0 errors) ==== + export declare type A = { + id: string; + }; + export declare type B = { + id: number; + }; + export declare type IdType = A | B; + export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; + } +==== monorepo/pkg1/package.json (0 errors) ==== + { + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } +==== monorepo/pkg2/dist/index.d.ts (0 errors) ==== + export * from './types'; +==== monorepo/pkg2/dist/types.d.ts (0 errors) ==== + export {MetadataAccessor} from '@raymondfeng/pkg1'; +==== monorepo/pkg2/package.json (0 errors) ==== + { + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRetainsJsdocyComments.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRetainsJsdocyComments.d.ts.map new file mode 100644 index 0000000000000..610851639cb7c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRetainsJsdocyComments.d.ts.map @@ -0,0 +1,110 @@ +//// [tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts] //// + +//// [declarationEmitRetainsJsdocyComments.ts] +/** + * comment1 + * @param p + */ +export const foo = (p: string): { + /** + * comment2 + * @param s + */ + bar: (s: number) => void; + /** + * comment3 + * @param s + */ + bar2(s: number): void; +} => { + return { + /** + * comment2 + * @param s + */ + bar: (s: number) => {}, + /** + * comment3 + * @param s + */ + bar2(s: number) {}, + } +} + +export class Foo { + /** + * comment4 + * @param s + */ + bar(s: number): void { + } +} + +const dest = null as any; +export const + /** + * comment5 + */ + someMethod: any = dest.someMethod; + +declare global { + interface ExtFunc { + /** + * comment6 + */ + someMethod(collection: any[]): boolean; + } +} + + +/// [Declarations] //// + + + +//// [declarationEmitRetainsJsdocyComments.d.ts] +/** + * comment1 + * @param p + */ +export declare const foo: (p: string) => { + /** + * comment2 + * @param s + */ + bar: (s: number) => void; + /** + * comment3 + * @param s + */ + bar2(s: number): void; +}; +export declare class Foo { + /** + * comment4 + * @param s + */ + bar(s: number): void; +} +export declare const +/** +* comment5 +*/ +someMethod: any; +declare global { + interface ExtFunc { + /** + * comment6 + */ + someMethod(collection: any[]): boolean; + } +} +//# sourceMappingURL=declarationEmitRetainsJsdocyComments.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitRetainsJsdocyComments.d.ts.map] +{"version":3,"file":"declarationEmitRetainsJsdocyComments.d.ts","sourceRoot":"","sources":["declarationEmitRetainsJsdocyComments.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,GAAG,GAAI,CAAC,EAAE,MAAM,KAAG;IAC5B;;;OAGG;IACH,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAczB,CAAA;AAED,qBAAa,GAAG;IACZ;;;OAGG;IACH,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;CAEvB;AAGD,eAAO;AACH;;EAEE;AACF,UAAU,EAAE,GAAqB,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO;QACb;;UAEE;QACF,UAAU,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;KAC1C;CACJ"} + +//// https://sokra.github.io/source-map-visualization#base64,LyoqDQogKiBjb21tZW50MQ0KICogQHBhcmFtIHANCiAqLw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiAocDogc3RyaW5nKSA9PiB7DQogICAgLyoqDQogICAgICogY29tbWVudDINCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcjogKHM6IG51bWJlcikgPT4gdm9pZDsNCiAgICAvKioNCiAgICAgKiBjb21tZW50Mw0KICAgICAqIEBwYXJhbSBzDQogICAgICovDQogICAgYmFyMihzOiBudW1iZXIpOiB2b2lkOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIEZvbyB7DQogICAgLyoqDQogICAgICogY29tbWVudDQNCiAgICAgKiBAcGF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DO0lBQ1gsVUFBVSxPQUFPO1FBQ2I7O1VBRUU7UUFDRixVQUFVLENBQUMsVUFBVSxFQUFFLEdBQUcsRUFBRSxHQUFHLE9BQU8sQ0FBQztLQUMxQztDQUNKIn0=,LyoqCiAqIGNvbW1lbnQxCiAqIEBwYXJhbSBwIAogKi8KZXhwb3J0IGNvbnN0IGZvbyA9IChwOiBzdHJpbmcpOiB7CiAgICAvKioKICAgICAqIGNvbW1lbnQyCiAgICAgKiBAcGFyYW0gcwogICAgICovCiAgICBiYXI6IChzOiBudW1iZXIpID0+IHZvaWQ7CiAgICAvKioKICAgICAqIGNvbW1lbnQzCiAgICAgKiBAcGFyYW0gcwogICAgICovCiAgICBiYXIyKHM6IG51bWJlcik6IHZvaWQ7Cn0gPT4gewogICAgcmV0dXJuIHsKICAgICAgICAvKioKICAgICAgICAgKiBjb21tZW50MgogICAgICAgICAqIEBwYXJhbSBzIAogICAgICAgICAqLwogICAgICAgIGJhcjogKHM6IG51bWJlcikgPT4ge30sCiAgICAgICAgLyoqCiAgICAgICAgICogY29tbWVudDMKICAgICAgICAgKiBAcGFyYW0gcyAKICAgICAgICAgKi8KICAgICAgICBiYXIyKHM6IG51bWJlcikge30sCiAgICB9Cn0KCmV4cG9ydCBjbGFzcyBGb28gewogICAgLyoqCiAgICAgKiBjb21tZW50NAogICAgICogQHBhcmFtIHMgIAogICAgICovCiAgICBiYXIoczogbnVtYmVyKTogdm9pZCB7CiAgICB9Cn0KCmNvbnN0IGRlc3QgPSBudWxsIGFzIGFueTsKZXhwb3J0IGNvbnN0CiAgICAvKioKICAgICogY29tbWVudDUKICAgICovCiAgICBzb21lTWV0aG9kOiBhbnkgPSBkZXN0LnNvbWVNZXRob2Q7CgpkZWNsYXJlIGdsb2JhbCB7CiAgICBpbnRlcmZhY2UgRXh0RnVuYyB7CiAgICAgICAgLyoqCiAgICAgICAgKiBjb21tZW50NgogICAgICAgICovCiAgICAgICAgc29tZU1ldGhvZChjb2xsZWN0aW9uOiBhbnlbXSk6IGJvb2xlYW47CiAgICB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReusesLambdaParameterNodes.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReusesLambdaParameterNodes.d.ts.map new file mode 100644 index 0000000000000..3e9b4ed8fdd9f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReusesLambdaParameterNodes.d.ts.map @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts] //// + +//// [index.d.ts] +export type Whatever = {x: string, y: number}; +export type Props = Omit & Partial & T; + +//// [index.ts] +import { Props } from "react-select"; + +export const CustomSelect1 = (x: Props(x: A) => A; +declare function a2(x: A): A; +declare var a3: (x: A) => globalThis.A; +declare function a4(x: A): globalThis.A; +interface B { +} +declare var b: (x: B) => B; +declare function b2(x: B): B; +//# sourceMappingURL=declarationEmitTypeParameterNameInOuterScope.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitTypeParameterNameInOuterScope.d.ts.map] +{"version":3,"file":"declarationEmitTypeParameterNameInOuterScope.d.ts","sourceRoot":"","sources":["declarationEmitTypeParameterNameInOuterScope.ts"],"names":[],"mappings":"AAAA,cAAM,CAAC;CAAI;AAEX,QAAA,IAAI,CAAC,GAAI,CAAC,EAAG,CAAC,EAAE,CAAC,KAAG,CAAM,CAAC;AAC3B,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAa;AAErC,QAAA,IAAI,EAAE,GAAI,CAAC,EAAG,CAAC,EAAE,CAAC,KAAG,UAAU,CAAC,CAAY,CAAC;AAC7C,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAmB;AAGtD,UAAU,CAAC;CAAI;AAEf,QAAA,IAAI,CAAC,GAAI,CAAC,EAAG,CAAC,EAAE,CAAC,KAAG,C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LQUFHLFVBQVUsQ0FBQyxDQUFZLENBQUM7QUFDN0MsaUJBQVMsRUFBRSxDQUFDLENBQUMsRUFBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLFVBQVUsQ0FBQyxDQUFDLENBQW1CO0FBR3RELFVBQVUsQ0FBQztDQUFJO0FBRWYsUUFBQSxJQUFJLENBQUMsR0FBSSxDQUFDLEVBQUcsQ0FBQyxFQUFFLENBQUMsS0FBRyxDQUFNLENBQUM7QUFDM0IsaUJBQVMsRUFBRSxDQUFDLENBQUMsRUFBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLENBQUMsQ0FBYSJ9,Y2xhc3MgQSB7IH0KCnZhciBhID0gPEEsPih4OiBBKTogQSA9PiB4OwpmdW5jdGlvbiBhMjxBLD4oeDogQSk6IEEgeyByZXR1cm4geCB9Cgp2YXIgYTMgPSA8QSw+KHg6IEEpOiBnbG9iYWxUaGlzLkEgPT4gbmV3IEEoKTsKZnVuY3Rpb24gYTQ8QSw+KHg6IEEpOiBnbG9iYWxUaGlzLkEgeyByZXR1cm4gbmV3IEEoKSB9CgoKaW50ZXJmYWNlIEIgeyB9Cgp2YXIgYiA9IDxCLD4oeDogQik6IEIgPT4geDsKZnVuY3Rpb24gYjI8Qiw+KHg6IEIpOiBCIHsgcmV0dXJuIHggfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeParameterNameShadowedInternally.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeParameterNameShadowedInternally.d.ts.map new file mode 100644 index 0000000000000..653b5641dee4f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeParameterNameShadowedInternally.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts] //// + +//// [declarationEmitTypeParameterNameShadowedInternally.ts] +export const foo = (x: T): (y: T_1) => readonly [T, T_1] => { + const inner = (y: T) => [x, y] as const; + return inner; +} + + +/// [Declarations] //// + + + +//// [declarationEmitTypeParameterNameShadowedInternally.d.ts] +export declare const foo: (x: T) => (y: T_1) => readonly [T, T_1]; +//# sourceMappingURL=declarationEmitTypeParameterNameShadowedInternally.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitTypeParameterNameShadowedInternally.d.ts.map] +{"version":3,"file":"declarationEmitTypeParameterNameShadowedInternally.d.ts","sourceRoot":"","sources":["declarationEmitTypeParameterNameShadowedInternally.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,CAAC,EAAG,CAAC,EAAE,CAAC,KAAG,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,SAAS,CAAC,CAAC,EAAE,GAAG,CAG/D,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiA8VD4oeDogVCkgPT4gPFRfMT4oeTogVF8xKSA9PiByZWFkb25seSBbVCwgVF8xXTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFR5cGVQYXJhbWV0ZXJOYW1lU2hhZG93ZWRJbnRlcm5hbGx5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VHlwZVBhcmFtZXRlck5hbWVTaGFkb3dlZEludGVybmFsbHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFR5cGVQYXJhbWV0ZXJOYW1lU2hhZG93ZWRJbnRlcm5hbGx5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSxHQUFHLEdBQUksQ0FBQyxFQUFHLENBQUMsRUFBRSxDQUFDLEtBQUcsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxFQUFFLEdBQUcsS0FBSyxTQUFTLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FHL0QsQ0FBQSJ9,ZXhwb3J0IGNvbnN0IGZvbyA9IDxULD4oeDogVCk6IDxUXzE+KHk6IFRfMSkgPT4gcmVhZG9ubHkgW1QsIFRfMV0gPT4gewoJY29uc3QgaW5uZXIgPSA8VCw+KHk6IFQpID0+IFt4LCB5XSBhcyBjb25zdDsKCXJldHVybiBpbm5lcjsKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUnknownImport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUnknownImport.d.ts new file mode 100644 index 0000000000000..8917fa3423566 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUnknownImport.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationEmitUnknownImport.ts] //// + +//// [declarationEmitUnknownImport.ts] +import Foo = SomeNonExistingName +export {Foo} + +/// [Declarations] //// + + + +//// [declarationEmitUnknownImport.d.ts] +import Foo = SomeNonExistingName; +export { Foo }; +//# sourceMappingURL=declarationEmitUnknownImport.d.ts.map +/// [Errors] //// + +declarationEmitUnknownImport.ts(1,1): error TS2303: Circular definition of import alias 'Foo'. +declarationEmitUnknownImport.ts(1,14): error TS2304: Cannot find name 'SomeNonExistingName'. +declarationEmitUnknownImport.ts(1,14): error TS2503: Cannot find namespace 'SomeNonExistingName'. +declarationEmitUnknownImport.ts(1,14): error TS4000: Import declaration 'Foo' is using private name 'SomeNonExistingName'. + + +==== declarationEmitUnknownImport.ts (4 errors) ==== + import Foo = SomeNonExistingName + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2303: Circular definition of import alias 'Foo'. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeNonExistingName'. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2503: Cannot find namespace 'SomeNonExistingName'. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS4000: Import declaration 'Foo' is using private name 'SomeNonExistingName'. + export {Foo} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingAlternativeContainingModules1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingAlternativeContainingModules1.d.ts.map new file mode 100644 index 0000000000000..0889d7d662258 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingAlternativeContainingModules1.d.ts.map @@ -0,0 +1,263 @@ +//// [tests/cases/compiler/declarationEmitUsingAlternativeContainingModules1.ts] //// + +//// [useQuery-CPqkvEsh.d.ts] +type QueryKey = ReadonlyArray; + +interface Register {} + +type DefaultError = Register extends { + defaultError: infer TError; +} + ? TError + : Error; + +type ShouldRetryFunction = ( + failureCount: number, + error: TError, +) => boolean; +type RetryValue = boolean | number | ShouldRetryFunction; + +type QueryFunctionContext< + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> = [TPageParam] extends [never] + ? { + queryKey: TQueryKey; + } + : { + queryKey: TQueryKey; + pageParam: TPageParam; + }; + +type QueryFunction< + T = unknown, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> = (context: QueryFunctionContext) => T | Promise; + +interface QueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> { + retry?: RetryValue; + queryFn?: QueryFunction; + queryKey?: TQueryKey; + initialData?: TData; + initialDataUpdatedAt?: number | (() => number | undefined); +} + +interface QueryObserverOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> extends QueryOptions< + TQueryFnData, + TError, + TQueryData, + TQueryKey, + TPageParam + > { + enabled?: boolean; + refetchInterval?: number; + select?: (data: TQueryData) => TData; +} + +type UseQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = { + [Property in keyof QueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >]: QueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >[Property]; +}; + +type UndefinedInitialQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = UseQueryOptions & { + initialData?: undefined; +}; + +interface QueryObserverBaseResult { + data: TData | undefined; + dataUpdatedAt: number; + error: TError | null; + errorUpdatedAt: number; + failureCount: number; + failureReason: TError | null; + errorUpdateCount: number; + isError: boolean; + isFetched: boolean; + isFetchedAfterMount: boolean; + isFetching: boolean; + isLoading: boolean; + isPending: boolean; + isLoadingError: boolean; + isInitialLoading: boolean; + isPaused: boolean; + isPlaceholderData: boolean; + isRefetchError: boolean; + isRefetching: boolean; + isStale: boolean; + isSuccess: boolean; +} + +interface QueryObserverSuccessResult + extends QueryObserverBaseResult { + data: TData; + error: null; + isError: false; + isPending: false; + isLoadingError: false; + isRefetchError: false; + isSuccess: true; + status: "success"; +} + +type DefinedQueryObserverResult< + TData = unknown, + TError = DefaultError, +> = QueryObserverSuccessResult; +type QueryObserverResult< + TData = unknown, + TError = DefaultError, +> = DefinedQueryObserverResult; + +type ToRef = { + value: T; +}; + +type UseBaseQueryReturnType< + TData, + TError, + Result = QueryObserverResult, +> = { + [K in keyof Result]: K extends + | "fetchNextPage" + | "fetchPreviousPage" + | "refetch" + ? Result[K] + : ToRef[K]>; +} & { + suspense: () => Promise; +}; + +type UseQueryReturnType = UseBaseQueryReturnType; + +declare function useQuery< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +>( + options: UndefinedInitialQueryOptions, +): UseQueryReturnType; + +export { type UseQueryReturnType, useQuery }; + +//// [index.d.ts] +export { UseQueryReturnType, useQuery } from './useQuery-CPqkvEsh.js'; + +//// [package.json] +{ + "name": "@tanstack/vue-query", + "type": "module", + "exports": { + ".": { + "import": { + "types": "./build/modern/index.d.ts", + "default": "./build/modern/index.js" + }, + "require": { + "types": "./build/modern/index.d.cts", + "default": "./build/modern/index.cjs" + } + } + } +} + +//// [index.mts] +import { useQuery } from '@tanstack/vue-query' + +const baseUrl = 'https://api.publicapis.org/' + +interface IEntry { + API: string + Description: string + Auth: string + HTTPS: boolean + Cors: string + Link: string + Category: string +} + +const testApi = { + getEntries: (): Promise => { + return fetch(baseUrl + 'entries') + .then((res) => res.json()) + .then((data) => data.entries) + .catch((err) => console.log(err)) + } +} + +const entryKeys = { + all: ['entries'] as const, + list: () => [...entryKeys.all, 'list'] as const +} + +export const useEntries = (): UseQueryReturnType => { + return useQuery({ + queryKey: entryKeys.list(), + queryFn: testApi.getEntries, + select: (data) => data.slice(0, 10) + }) +} + + +/// [Declarations] //// + + + +//// [src/index.d.mts] +interface IEntry { + API: string; + Description: string; + Auth: string; + HTTPS: boolean; + Cors: string; + Link: string; + Category: string; +} +export declare const useEntries: () => UseQueryReturnType; +export {}; +//# sourceMappingURL=index.d.mts.map + +/// [Declarations Maps] //// + + +//// [src/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAgBD,eAAO,MAAM,UAAU,QAAO,kBAAkB,CAAC,MAAM,EAAE,EAAE,KAAK,CAM/D,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIElFbnRyeSB7DQogICAgQVBJOiBzdHJpbmc7DQogICAgRGVzY3JpcHRpb246IHN0cmluZzsNCiAgICBBdXRoOiBzdHJpbmc7DQogICAgSFRUUFM6IGJvb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A9IHsKICBnZXRFbnRyaWVzOiAoKTogUHJvbWlzZTxJRW50cnlbXT4gPT4gewogICAgcmV0dXJuIGZldGNoKGJhc2VVcmwgKyAnZW50cmllcycpCiAgICAgIC50aGVuKChyZXMpID0+IHJlcy5qc29uKCkpCiAgICAgIC50aGVuKChkYXRhKSA9PiBkYXRhLmVudHJpZXMpCiAgICAgIC5jYXRjaCgoZXJyKSA9PiBjb25zb2xlLmxvZyhlcnIpKQogIH0KfQoKY29uc3QgZW50cnlLZXlzID0gewogIGFsbDogWydlbnRyaWVzJ10gYXMgY29uc3QsCiAgbGlzdDogKCkgPT4gWy4uLmVudHJ5S2V5cy5hbGwsICdsaXN0J10gYXMgY29uc3QKfQoKZXhwb3J0IGNvbnN0IHVzZUVudHJpZXMgPSAoKTogVXNlUXVlcnlSZXR1cm5UeXBlPElFbnRyeVtdLCBFcnJvcj4gPT4gewogIHJldHVybiB1c2VRdWVyeSh7CiAgICBxdWVyeUtleTogZW50cnlLZXlzLmxpc3QoKSwKICAgIHF1ZXJ5Rm46IHRlc3RBcGkuZ2V0RW50cmllcywKICAgIHNlbGVjdDogKGRhdGEpID0+IGRhdGEuc2xpY2UoMCwgMTApCiAgfSkKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingAlternativeContainingModules2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingAlternativeContainingModules2.d.ts.map new file mode 100644 index 0000000000000..7b238b473b310 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingAlternativeContainingModules2.d.ts.map @@ -0,0 +1,263 @@ +//// [tests/cases/compiler/declarationEmitUsingAlternativeContainingModules2.ts] //// + +//// [useQuery-CPqkvEsh.d.ts] +type QueryKey = ReadonlyArray; + +interface Register {} + +type DefaultError = Register extends { + defaultError: infer TError; +} + ? TError + : Error; + +type ShouldRetryFunction = ( + failureCount: number, + error: TError, +) => boolean; +type RetryValue = boolean | number | ShouldRetryFunction; + +type QueryFunctionContext< + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> = [TPageParam] extends [never] + ? { + queryKey: TQueryKey; + } + : { + queryKey: TQueryKey; + pageParam: TPageParam; + }; + +type QueryFunction< + T = unknown, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> = (context: QueryFunctionContext) => T | Promise; + +interface QueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> { + retry?: RetryValue; + queryFn?: QueryFunction; + queryKey?: TQueryKey; + initialData?: TData; + initialDataUpdatedAt?: number | (() => number | undefined); +} + +interface QueryObserverOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = never, +> extends QueryOptions< + TQueryFnData, + TError, + TQueryData, + TQueryKey, + TPageParam + > { + enabled?: boolean; + refetchInterval?: number; + select?: (data: TQueryData) => TData; +} + +type UseQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = { + [Property in keyof QueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >]: QueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >[Property]; +}; + +type UndefinedInitialQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = UseQueryOptions & { + initialData?: undefined; +}; + +interface QueryObserverBaseResult { + data: TData | undefined; + dataUpdatedAt: number; + error: TError | null; + errorUpdatedAt: number; + failureCount: number; + failureReason: TError | null; + errorUpdateCount: number; + isError: boolean; + isFetched: boolean; + isFetchedAfterMount: boolean; + isFetching: boolean; + isLoading: boolean; + isPending: boolean; + isLoadingError: boolean; + isInitialLoading: boolean; + isPaused: boolean; + isPlaceholderData: boolean; + isRefetchError: boolean; + isRefetching: boolean; + isStale: boolean; + isSuccess: boolean; +} + +interface QueryObserverSuccessResult + extends QueryObserverBaseResult { + data: TData; + error: null; + isError: false; + isPending: false; + isLoadingError: false; + isRefetchError: false; + isSuccess: true; + status: "success"; +} + +type DefinedQueryObserverResult< + TData = unknown, + TError = DefaultError, +> = QueryObserverSuccessResult; +type QueryObserverResult< + TData = unknown, + TError = DefaultError, +> = DefinedQueryObserverResult; + +type ToRef = { + value: T; +}; + +type UseBaseQueryReturnType< + TData, + TError, + Result = QueryObserverResult, +> = { + [K in keyof Result]: K extends + | "fetchNextPage" + | "fetchPreviousPage" + | "refetch" + ? Result[K] + : ToRef[K]>; +} & { + suspense: () => Promise; +}; + +type UseQueryReturnType = UseBaseQueryReturnType; + +declare function useQuery< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +>( + options: UndefinedInitialQueryOptions, +): UseQueryReturnType; + +export { type UseQueryReturnType as b, useQuery as u }; + +//// [index.d.ts] +export { b as UseQueryReturnType, u as useQuery } from './useQuery-CPqkvEsh.js'; + +//// [package.json] +{ + "name": "@tanstack/vue-query", + "type": "module", + "exports": { + ".": { + "import": { + "types": "./build/modern/index.d.ts", + "default": "./build/modern/index.js" + }, + "require": { + "types": "./build/modern/index.d.cts", + "default": "./build/modern/index.cjs" + } + } + } +} + +//// [index.mts] +import { useQuery } from '@tanstack/vue-query' + +const baseUrl = 'https://api.publicapis.org/' + +interface IEntry { + API: string + Description: string + Auth: string + HTTPS: boolean + Cors: string + Link: string + Category: string +} + +const testApi = { + getEntries: (): Promise => { + return fetch(baseUrl + 'entries') + .then((res) => res.json()) + .then((data) => data.entries) + .catch((err) => console.log(err)) + } +} + +const entryKeys = { + all: ['entries'] as const, + list: () => [...entryKeys.all, 'list'] as const +} + +export const useEntries = (): b => { + return useQuery({ + queryKey: entryKeys.list(), + queryFn: testApi.getEntries, + select: (data) => data.slice(0, 10) + }) +} + + +/// [Declarations] //// + + + +//// [src/index.d.mts] +interface IEntry { + API: string; + Description: string; + Auth: string; + HTTPS: boolean; + Cors: string; + Link: string; + Category: string; +} +export declare const useEntries: () => b; +export {}; +//# sourceMappingURL=index.d.mts.map + +/// [Declarations Maps] //// + + +//// [src/index.d.mts.map] +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAgBD,eAAO,MAAM,UAAU,QAAO,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,CAM9C,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIElFbnRyeSB7DQogICAgQVBJOiBzdHJpbmc7DQogICAgRGVzY3JpcHRpb246IHN0cmluZzsNCiAgICBBdXRoOiBzdHJpbmc7DQogICAgSFRUUFM6IGJvb2xlYW47DQogICAgQ29yczogc3RyaW5nOw0KICAgIExpbms6IHN0cmluZzsNCiAgICBDYXRlZ29yeTogc3RyaW5nOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3QgdXNlRW50cmllczogKCkgPT4gYjxJRW50cnlbXSwgRXJyb3I+Ow0KZXhwb3J0IHt9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC5tdHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUEsVUFBVSxNQUFNO0lBQ2QsR0FBRyxFQUFFLE1BQU0sQ0FBQTtJQUNYLFdBQVcsRUFBRSxN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XR1cm4gdXNlUXVlcnkoewogICAgcXVlcnlLZXk6IGVudHJ5S2V5cy5saXN0KCksCiAgICBxdWVyeUZuOiB0ZXN0QXBpLmdldEVudHJpZXMsCiAgICBzZWxlY3Q6IChkYXRhKSA9PiBkYXRhLnNsaWNlKDAsIDEwKQogIH0pCn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingTypeAlias1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingTypeAlias1.d.ts.map new file mode 100644 index 0000000000000..f5907231817ea --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingTypeAlias1.d.ts.map @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/declarationEmitUsingTypeAlias1.ts] //// + +//// [inner.d.ts] +export declare type Other = { other: string }; +export declare type SomeType = { arg: Other }; + +//// [index.d.ts] +export type OtherType = import('./inner').Other; +export type SomeType = import('./inner').SomeType; + +//// [package.json] +{ + "name": "some-dep", + "exports": { + ".": "./dist/index.js" + } +} + +//// [index.ts] +import { SomeType } from "some-dep"; + +export const foo = (thing: SomeType): SomeType => { + return thing; +}; + +export const bar = (thing: SomeType): Other => { + return thing.arg; +}; + +/// [Declarations] //// + + + +//// [src/index.d.ts] +import { SomeType } from "some-dep"; +export declare const foo: (thing: SomeType) => SomeType; +export declare const bar: (thing: SomeType) => Other; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [src/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,eAAO,MAAM,GAAG,GAAI,KAAK,EAAE,QAAQ,KAAG,QAErC,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,KAAK,EAAE,QAAQ,KAAG,KAErC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU29tZVR5cGUgfSBmcm9tICJzb21lLWRlcCI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmb286ICh0aGluZzogU29tZVR5cGUpID0+IFNvbWVUeXBlOw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgYmFyOiAodGhpbmc6IFNvbWVUeXBlKSA9PiBPdGhlcjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFFcEMsZUFBTyxNQUFNLEdBQUcsR0FBSSxLQUFLLEVBQUUsUUFBUSxLQUFHLFFBRXJDLENBQUM7QUFFRixlQUFPLE1BQU0sR0FBRyxHQUFJLEtBQUssRUFBRSxRQUFRLEtBQUcsS0FFckMsQ0FBQyJ9,aW1wb3J0IHsgU29tZVR5cGUgfSBmcm9tICJzb21lLWRlcCI7CgpleHBvcnQgY29uc3QgZm9vID0gKHRoaW5nOiBTb21lVHlwZSk6IFNvbWVUeXBlID0+IHsKICByZXR1cm4gdGhpbmc7Cn07CgpleHBvcnQgY29uc3QgYmFyID0gKHRoaW5nOiBTb21lVHlwZSk6IE90aGVyID0+IHsKICByZXR1cm4gdGhpbmcuYXJnOwp9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithDefaultAsComputedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithDefaultAsComputedName.d.ts new file mode 100644 index 0000000000000..8270d924da41d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithDefaultAsComputedName.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts] //// + +//// [other.ts] +type Experiment = { + name: Name; +}; +declare const createExperiment: ( + options: Experiment +) => Experiment; +const __default: Experiment<"foo"> = createExperiment({ + name: "foo" +}); +export default __default; + +//// [main.ts] +import other from "./other"; +export const obj = { + [other.name]: 1, +}; + +/// [Declarations] //// + + + +//// [main.d.ts] +import other from "./other"; +export declare const obj: { + [other.name]: number; +}; +//# sourceMappingURL=main.d.ts.map +//// [other.d.ts] +type Experiment = { + name: Name; +}; +declare const __default: Experiment<"foo">; +export default __default; +//# sourceMappingURL=other.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithDefaultAsComputedName2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithDefaultAsComputedName2.d.ts new file mode 100644 index 0000000000000..a3524e1978436 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithDefaultAsComputedName2.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts] //// + +//// [other.ts] +type Experiment = { + name: Name; +}; +declare const createExperiment: ( + options: Experiment +) => Experiment; +const __default: Experiment<"foo"> = createExperiment({ + name: "foo" +}); +export default __default; + +//// [main.ts] +import * as other2 from "./other"; +export const obj = { + [other2.default.name]: 1 +}; + +/// [Declarations] //// + + + +//// [main.d.ts] +import * as other2 from "./other"; +export declare const obj: { + [other2.default.name]: number; +}; +//# sourceMappingURL=main.d.ts.map +//// [other.d.ts] +type Experiment = { + name: Name; +}; +declare const __default: Experiment<"foo">; +export default __default; +//# sourceMappingURL=other.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts new file mode 100644 index 0000000000000..b733e43c79072 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -0,0 +1,71 @@ +//// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// + +//// [index.d.ts] +export function bar(): number; +//// [package.json] +{ + "main": "./lib", + "name": "csv-parse", + "types": [ + "./lib/index.d.ts", + "./lib/sync.d.ts" + ], + "version": "4.8.2" +} +//// [index.ts] +export interface MutableRefObject { + current: T; +} +export function useRef(current: T): MutableRefObject { + return { current }; +} +export const useCsvParser = () => { + const parserRef = useRef(null); + return parserRef; +}; + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export interface MutableRefObject { + current: T; +} +export declare function useRef(current: T): MutableRefObject; +export declare const useCsvParser: () => invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + +/p1/index.ts(7,29): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + + +==== /p1/node_modules/csv-parse/lib/index.d.ts (0 errors) ==== + export function bar(): number; +==== /p1/node_modules/csv-parse/package.json (0 errors) ==== + { + "main": "./lib", + "name": "csv-parse", + "types": [ + "./lib/index.d.ts", + "./lib/sync.d.ts" + ], + "version": "4.8.2" + } +==== /p1/index.ts (1 errors) ==== + export interface MutableRefObject { + current: T; + } + export function useRef(current: T): MutableRefObject { + return { current }; + } + export const useCsvParser = () => { + ~~~~~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 /p1/index.ts:7:14: Add a type annotation to the variable useCsvParser. +!!! related TS9030 /p1/index.ts:7:29: Add a return type to the function expression. + const parserRef = useRef(null); + return parserRef; + }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFileOverwriteError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFileOverwriteError.d.ts new file mode 100644 index 0000000000000..612ae9b0da7e1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFileOverwriteError.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationFileOverwriteError.ts] //// + +//// [a.d.ts] +declare class c { +} + +//// [a.ts] +class d { +} + +/// [Declarations] //// + + + +//// [a.d.ts] +declare class d { +} +//# sourceMappingURL=a.d.ts.map +/// [Errors] //// + +error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +==== a.d.ts (0 errors) ==== + declare class c { + } + +==== a.ts (0 errors) ==== + class d { + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsForFileShadowingGlobalNoError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsForFileShadowingGlobalNoError.d.ts new file mode 100644 index 0000000000000..ea6852b5a4342 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsForFileShadowingGlobalNoError.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts] //// + +//// [dom.ts] +export type DOMNode = Node; +//// [custom.ts] +export type Node = {}; +//// [index.ts] +import { Node } from './custom' +import { DOMNode } from './dom' + +type Constructor = new (...args: any[]) => any + +export const mixin = (Base: Constructor): { + new(...args: any[]): { + [x: string]: any + get(domNode: DOMNode): void + } +} => { + return class extends Base { + get(domNode: DOMNode) {} + } +} + +/// [Declarations] //// + + + +//// [custom.d.ts] +export type Node = {}; +//# sourceMappingURL=custom.d.ts.map +//// [dom.d.ts] +export type DOMNode = Node; +//# sourceMappingURL=dom.d.ts.map +//// [index.d.ts] +import { DOMNode } from './dom'; +type Constructor = new (...args: any[]) => any; +export declare const mixin: (Base: Constructor) => { + new (...args: any[]): { + [x: string]: any; + get(domNode: DOMNode): void; + }; +}; +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts new file mode 100644 index 0000000000000..74f9e381d77ba --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts @@ -0,0 +1,191 @@ +//// [tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts] //// + +//// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts] +// Note that both of the following have an `any` in their return type from where we bottom out the type printout +// for having too many instances of the same symbol nesting. + +// Slightly simplified repro from https://github.com/microsoft/TypeScript/issues/30732 so it's easier to read and debug +export type Key = keyof U; +export type Value, U> = U[K]; +export const updateIfChanged = (t: T): ((key: K) => (>(key: K_1) => (>>(key: K_2) => (>>>(key: K_3) => (>>>>(key: K_4) => (>>>>>(key: K_5) => (>>>>>>(key: K_6) => (>>>>>>>(key: K_7) => (>>>>>>>>(key: K_8) => (>>>>>>>>>(key: K_9) => (>>>>>>>>>>(key: K_10) => any & { + map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; + set: (newU: Value>>>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; + set: (newU: Value>>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; + set: (newU: Value>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; + set: (newU: Value>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; + set: (newU: Value>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>) => Value>>>>>) => T; + set: (newU: Value>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>) => Value>>>>) => T; + set: (newU: Value>>>>) => T; +}) & { + map: (updater: (u: Value>>>) => Value>>>) => T; + set: (newU: Value>>>) => T; +}) & { + map: (updater: (u: Value>>) => Value>>) => T; + set: (newU: Value>>) => T; +}) & { + map: (updater: (u: Value>) => Value>) => T; + set: (newU: Value>) => T; +}) & { + map: (updater: (u: Value) => Value) => T; + set: (newU: Value) => T; +}) & { + map: (updater: (u: T) => T) => T; + set: (newU: T) => T; +} => { + const reduce = (u: U, update: (u: U) => T) => { + const set = (newU: U) => Object.is(u, newU) ? t : update(newU); + return Object.assign( + >(key: K) => + reduce>(u[key as keyof U] as Value, (v: Value) => { + return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); + }), + { map: (updater: (u: U) => U) => set(updater(u)), set }); + }; + return reduce(t, (t: T) => t); +}; + +// example from https://github.com/microsoft/TypeScript/issues/31605 + +export const testRecFun = (parent: T): { + result: T; deeper: (child: U) => { + result: T & U; + deeper: (child: U_1) => { + result: T & U & U_1; + deeper: (child: U_2) => { + result: T & U & U_1 & U_2; + deeper: (child: U_3) => { + result: T & U & U_1 & U_2 & U_3; + deeper: (child: U_4) => { + result: T & U & U_1 & U_2 & U_3 & U_4; + deeper: (child: U_5) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; + deeper: (child: U_6) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; + deeper: (child: U_7) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; + deeper: (child: U_8) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; + deeper: (child: U_9) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; + deeper: (child: U_10) => any; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} => { + return { + result: parent, + deeper: (child: U) => + testRecFun({ ...parent, ...child }) + }; +} + + +let p1 = testRecFun({ one: '1' }) +void p1.result.one; +let p2 = p1.deeper({ two: '2' }) +void p2.result.one; +void p2.result.two; +let p3 = p2.deeper({ three: '3' }) +void p3.result.one; +void p3.result.two; +void p3.result.three; + + +/// [Declarations] //// + + + +//// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts] +export type Key = keyof U; +export type Value, U> = U[K]; +export declare const updateIfChanged: (t: T) => ((key: K) => (>(key: K_1) => (>>(key: K_2) => (>>>(key: K_3) => (>>>>(key: K_4) => (>>>>>(key: K_5) => (>>>>>>(key: K_6) => (>>>>>>>(key: K_7) => (>>>>>>>>(key: K_8) => (>>>>>>>>>(key: K_9) => (>>>>>>>>>>(key: K_10) => any & { + map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; + set: (newU: Value>>>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; + set: (newU: Value>>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; + set: (newU: Value>>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; + set: (newU: Value>>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; + set: (newU: Value>>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>>) => Value>>>>>) => T; + set: (newU: Value>>>>>) => T; +}) & { + map: (updater: (u: Value>>>>) => Value>>>>) => T; + set: (newU: Value>>>>) => T; +}) & { + map: (updater: (u: Value>>>) => Value>>>) => T; + set: (newU: Value>>>) => T; +}) & { + map: (updater: (u: Value>>) => Value>>) => T; + set: (newU: Value>>) => T; +}) & { + map: (updater: (u: Value>) => Value>) => T; + set: (newU: Value>) => T; +}) & { + map: (updater: (u: Value) => Value) => T; + set: (newU: Value) => T; +}) & { + map: (updater: (u: T) => T) => T; + set: (newU: T) => T; +}; +export declare const testRecFun: (parent: T) => { + result: T; + deeper: (child: U) => { + result: T & U; + deeper: (child: U_1) => { + result: T & U & U_1; + deeper: (child: U_2) => { + result: T & U & U_1 & U_2; + deeper: (child: U_3) => { + result: T & U & U_1 & U_2 & U_3; + deeper: (child: U_4) => { + result: T & U & U_1 & U_2 & U_3 & U_4; + deeper: (child: U_5) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5; + deeper: (child: U_6) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6; + deeper: (child: U_7) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7; + deeper: (child: U_8) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8; + deeper: (child: U_9) => { + result: T & U & U_1 & U_2 & U_3 & U_4 & U_5 & U_6 & U_7 & U_8 & U_9; + deeper: (child: U_10) => any; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; +//# sourceMappingURL=declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map new file mode 100644 index 0000000000000..ae35de26b6f01 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts] //// + +//// [defaultParameterAddsUndefinedWithStrictNullChecks.ts] +function f(addUndefined1: string = "J", addUndefined2?: number): number { + return addUndefined1.length + (addUndefined2 || 0); +} +function g(addUndefined: string = "J", addDefined: number): number { + return addUndefined.length + addDefined; +} +let total: number = f() + f('a', 1) + f('b') + f(undefined, 2); +total = g('c', 3) + g(undefined, 4); + +function foo1(x: string = "string", b: number): void { + x.length; +} + +function foo2(x: string = "string", b: number): void { + x.length; // ok, should be string +} + +function foo3(x: string | undefined = "string", b: number): void { + x.length; // ok, should be string + x = undefined; +} + +function foo4(x: string | undefined = undefined, b: number): void { + x; // should be string | undefined + x = undefined; +} + +type OptionalNullableString = string | null | undefined; +function allowsNull(val: OptionalNullableString = ""): void { + val = null; + val = 'string and null are both ok'; +} +allowsNull(null); // still allows passing null + + + +// .d.ts should have `string | undefined` for foo1, foo2, foo3 and foo4 +foo1(undefined, 1); +foo2(undefined, 1); +foo3(undefined, 1); +foo4(undefined, 1); + + +function removeUndefinedButNotFalse(x: boolean = true): false | undefined { + if (x === false) { + return x; + } +} + +declare const cond: boolean; +function removeNothing(y: boolean | undefined = cond ? true : undefined): boolean { + if (y !== undefined) { + if (y === false) { + return y; + } + } + return true; +} + + +/// [Declarations] //// + + + +//// [defaultParameterAddsUndefinedWithStrictNullChecks.d.ts] +declare function f(addUndefined1?: string, addUndefined2?: number): number; +declare function g(addUndefined: string | undefined, addDefined: number): number; +declare let total: number; +declare function foo1(x: string | undefined, b: number): void; +declare function foo2(x: string | undefined, b: number): void; +declare function foo3(x: string | undefined, b: number): void; +declare function foo4(x: string | undefined, b: number): void; +type OptionalNullableString = string | null | undefined; +declare function allowsNull(val?: OptionalNullableString): void; +declare function removeUndefinedButNotFalse(x?: boolean): false | undefined; +declare const cond: boolean; +declare function removeNothing(y?: boolean | undefined): boolean; +//# sourceMappingURL=defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map + +/// [Declarations Maps] //// + + +//// [defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map] +{"version":3,"file":"defaultParameterAddsUndefinedWithStrictNullChecks.d.ts","sourceRoot":"","sources":["defaultParameterAddsUndefinedWithStrictNullChecks.ts"],"names":[],"mappings":"AAAA,iBAAS,CAAC,CAAC,aAAa,GAAE,MAAY,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtE;AACD,iBAAS,CAAC,CAAC,YAAY,EAAE,MAAM,YAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjE;AACD,QAAA,IAAI,KAAK,E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gewogICAgdmFsID0gbnVsbDsKICAgIHZhbCA9ICdzdHJpbmcgYW5kIG51bGwgYXJlIGJvdGggb2snOwp9CmFsbG93c051bGwobnVsbCk7IC8vIHN0aWxsIGFsbG93cyBwYXNzaW5nIG51bGwKCgoKLy8gLmQudHMgc2hvdWxkIGhhdmUgYHN0cmluZyB8IHVuZGVmaW5lZGAgZm9yIGZvbzEsIGZvbzIsIGZvbzMgYW5kIGZvbzQKZm9vMSh1bmRlZmluZWQsIDEpOwpmb28yKHVuZGVmaW5lZCwgMSk7CmZvbzModW5kZWZpbmVkLCAxKTsKZm9vNCh1bmRlZmluZWQsIDEpOwoKCmZ1bmN0aW9uIHJlbW92ZVVuZGVmaW5lZEJ1dE5vdEZhbHNlKHg6IGJvb2xlYW4gPSB0cnVlKTogZmFsc2UgfCB1bmRlZmluZWQgewogICAgaWYgKHggPT09IGZhbHNlKSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICB9Cn0KCmRlY2xhcmUgY29uc3QgY29uZDogYm9vbGVhbjsKZnVuY3Rpb24gcmVtb3ZlTm90aGluZyh5OiBib29sZWFuIHwgdW5kZWZpbmVkID0gY29uZCA/IHRydWUgOiB1bmRlZmluZWQpOiBib29sZWFuIHsKICAgIGlmICh5ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICBpZiAoeSA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuIHk7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/definiteAssignmentAssertionsWithObjectShortHand.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/definiteAssignmentAssertionsWithObjectShortHand.d.ts new file mode 100644 index 0000000000000..31fc771fd38c9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/definiteAssignmentAssertionsWithObjectShortHand.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts] //// + +//// [definiteAssignmentAssertionsWithObjectShortHand.ts] +const a: string | undefined = 'ff'; +const foo: { + a: string; +} = { a! } + +const bar = { + a ? (): void { } +} + +/// [Declarations] //// + + + +//// [definiteAssignmentAssertionsWithObjectShortHand.d.ts] +declare const a: string | undefined; +declare const foo: { + a: string; +}; +declare const bar: { + a(): void; +}; +//# sourceMappingURL=definiteAssignmentAssertionsWithObjectShortHand.d.ts.map +/// [Errors] //// + +definiteAssignmentAssertionsWithObjectShortHand.ts(4,8): error TS1255: A definite assignment assertion '!' is not permitted in this context. +definiteAssignmentAssertionsWithObjectShortHand.ts(7,7): error TS1162: An object member cannot be declared optional. + + +==== definiteAssignmentAssertionsWithObjectShortHand.ts (2 errors) ==== + const a: string | undefined = 'ff'; + const foo: { + a: string; + } = { a! } + ~ +!!! error TS1255: A definite assignment assertion '!' is not permitted in this context. + + const bar = { + a ? (): void { } + ~ +!!! error TS1162: An object member cannot be declared optional. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts.map new file mode 100644 index 0000000000000..da5bd444af1a5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts.map @@ -0,0 +1,126 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts] //// + +//// [destructuringInFunctionType.ts] +interface a { a } +interface b { b } +interface c { c } + +type T1 = ([a, b, c]); +type F1 = ([a, b, c]: [ + any, + any, + any +]) => void; + +type T2 = ({ a }); +type F2 = ({ a }: { + a: any; +}) => void; + +type T3 = ([{ a: b }, { b: a }]); +type F3 = ([{ a: b }, { b: a }]: [ + { + a: any; + }, + { + b: any; + } +]) => void; + +type T4 = ([{ a: [b, c] }]); +type F4 = ([{ a: [b, c] }]: [ + { + a: [any, any]; + } +]) => void; + +type C1 = new ([{ a: [b, c] }]: [ + { + a: [any, any]; + } + ]) => void; + +var v1 = ([a, b, c]: [ + any, + any, + any + ]): string => "hello"; +var v2: ([a, b, c]: [ + any, + any, + any +]) => string; + + +/// [Declarations] //// + + + +//// [destructuringInFunctionType.d.ts] +interface a { + a: any; +} +interface b { + b: any; +} +interface c { + c: any; +} +type T1 = ([a, b, c]); +type F1 = ([a, b, c]: [ + any, + any, + any +]) => void; +type T2 = ({ + a: any; +}); +type F2 = ({ a }: { + a: any; +}) => void; +type T3 = ([{ + a: b; +}, { + b: a; +}]); +type F3 = ([{ a: b }, { b: a }]: [ + { + a: any; + }, + { + b: any; + } +]) => void; +type T4 = ([{ + a: [b, c]; +}]); +type F4 = ([{ a: [b, c] }]: [ + { + a: [any, any]; + } +]) => void; +type C1 = new ([{ a: [b, c] }]: [ + { + a: [any, any]; + } +]) => void; +declare var v1: ([a, b, c]: [ + any, + any, + any +]) => string; +declare var v2: ([a, b, c]: [ + any, + any, + any +]) => string; +//# sourceMappingURL=destructuringInFunctionType.d.ts.map + +/// [Declarations Maps] //// + + +//// [destructuringInFunctionType.d.ts.map] +{"version":3,"file":"destructuringInFunctionType.d.ts","sourceRoot":"","sources":["destructuringInFunctionType.ts"],"names":[],"mappings":"AAAA,UAAU,CAAC;IAAG,CAAC,MAAA;CAAE;AACjB,UAAU,CAAC;IAAG,CAAC,MAAA;CAAE;AACjB,UAAU,CAAC;IAAG,CAAC,MAAA;CAAE;AAEjB,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACtB,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;IAClB,GAAG;IACH,GAAG;IACH,GAAG;CACN,KAAK,IAAI,CAAC;AAEX,KAAK,EAAE,GAAG,CAAC;IAAE,CAAC,MAAA;CAAE,CAAC,CAAC;AAClB,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;IACd,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KaW50ZXJmYWNlIGMgeyBjIH0KCnR5cGUgVDEgPSAoW2EsIGIsIGNdKTsKdHlwZSBGMSA9IChbYSwgYiwgY106IFsKICAgIGFueSwKICAgIGFueSwKICAgIGFueQpdKSA9PiB2b2lkOwoKdHlwZSBUMiA9ICh7IGEgfSk7CnR5cGUgRjIgPSAoeyBhIH06IHsKICAgIGE6IGFueTsKfSkgPT4gdm9pZDsKCnR5cGUgVDMgPSAoW3sgYTogYiB9LCB7IGI6IGEgfV0pOwp0eXBlIEYzID0gKFt7IGE6IGIgfSwgeyBiOiBhIH1dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicatePropertiesInTypeAssertions01.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicatePropertiesInTypeAssertions01.d.ts new file mode 100644 index 0000000000000..419ede9acfd63 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicatePropertiesInTypeAssertions01.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts] //// + +//// [duplicatePropertiesInTypeAssertions01.ts] +let x = <{a: number; a: number}>{}; + +/// [Declarations] //// + + + +//// [duplicatePropertiesInTypeAssertions01.d.ts] +declare let x: { + a: number; + a: number; +}; +//# sourceMappingURL=duplicatePropertiesInTypeAssertions01.d.ts.map +/// [Errors] //// + +duplicatePropertiesInTypeAssertions01.ts(1,11): error TS2300: Duplicate identifier 'a'. +duplicatePropertiesInTypeAssertions01.ts(1,22): error TS2300: Duplicate identifier 'a'. + + +==== duplicatePropertiesInTypeAssertions01.ts (2 errors) ==== + let x = <{a: number; a: number}>{}; + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicatePropertiesInTypeAssertions02.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicatePropertiesInTypeAssertions02.d.ts new file mode 100644 index 0000000000000..51af49ce27466 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicatePropertiesInTypeAssertions02.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts] //// + +//// [duplicatePropertiesInTypeAssertions02.ts] +let x = {} as {a: number; a: number}; + +/// [Declarations] //// + + + +//// [duplicatePropertiesInTypeAssertions02.d.ts] +declare let x: { + a: number; + a: number; +}; +//# sourceMappingURL=duplicatePropertiesInTypeAssertions02.d.ts.map +/// [Errors] //// + +duplicatePropertiesInTypeAssertions02.ts(1,16): error TS2300: Duplicate identifier 'a'. +duplicatePropertiesInTypeAssertions02.ts(1,27): error TS2300: Duplicate identifier 'a'. + + +==== duplicatePropertiesInTypeAssertions02.ts (2 errors) ==== + let x = {} as {a: number; a: number}; + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNames.d.ts new file mode 100644 index 0000000000000..dfe5be6fdc3a9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNames.d.ts @@ -0,0 +1,197 @@ +//// [tests/cases/compiler/dynamicNames.ts] //// + +//// [module.ts] +export const c0 = "a"; +export const c1 = 1; +export const s0: unique symbol = Symbol(); +export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T2 extends T1 { +} +export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; +}; + +//// [main.ts] +import { c0, c1, s0, T0, T1, T2, T3 } from "./module"; +import * as M from "./module"; + +namespace N { + export const c2 = "a"; + export const c3 = 1; + export const s1: typeof s0 = s0; + + export interface T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T5 implements T4 { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + } + export declare class T6 extends T5 { + } + export declare type T7 = { + [N.c2]: number; + [N.c3]: string; + [N.s1]: boolean; + }; +} + +export const c4 = "a"; +export const c5 = 1; +export const s2: typeof s0 = s0; + +interface T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; +} +declare class T9 implements T8 { + [c4]: number; + [c5]: string; + [s2]: boolean; +} +declare class T10 extends T9 { +} +declare type T11 = { + [c4]: number; + [c5]: string; + [s2]: boolean; +}; + +interface T12 { + a: number; + 1: string; + [s2]: boolean; +} +declare class T13 implements T2 { + a: number; + 1: string; + [s2]: boolean; +} +declare class T14 extends T13 { +} +declare type T15 = { + a: number; + 1: string; + [s2]: boolean; +}; + +declare class C { + static a: number; + static 1: string; + static [s2]: boolean; +} + +let t0: T0; +let t1: T1; +let t2: T2; +let t3: T3; +let t0_1: M.T0; +let t1_1: M.T1; +let t2_1: M.T2; +let t3_1: M.T3; +let t4: N.T4; +let t5: N.T5; +let t6: N.T6; +let t7: N.T7; +let t8: T8; +let t9: T9; +let t10: T10; +let t11: T11; +let t12: T12; +let t13: T13; +let t14: T14; +let t15: T15; + +// assignability +t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2; +t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6; +t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0; +t0 = C; // static side + +// object literals +export const o1 = { + [c4]: 1, + [c5]: "a", + [s2]: true +}; + +// check element access types +export const o1_c4: number = o1[c4]; +export const o1_c5: string = o1[c5]; +export const o1_s2: boolean = o1[s2]; + +export const o2: T0 = o1; + +// recursive declarations +// (type parameter indirection courtesy of #20400) +declare const rI: RI<"a">; +rI.x +interface RI { + x: T; + [rI.x]: "b"; +} + +declare const rC: RC<"a">; +rC.x +declare class RC { + x: T; + [rC.x]: "b"; +} + + +/// [Declarations] //// + + + +//// [main.d.ts] +import { s0, T0 } from "./module"; +export declare const c4 = "a"; +export declare const c5 = 1; +export declare const s2: typeof s0; +export declare const o1: { + [c4]: number; + [c5]: string; + [s2]: boolean; +}; +export declare const o1_c4: number; +export declare const o1_c5: string; +export declare const o1_s2: boolean; +export declare const o2: T0; +//# sourceMappingURL=main.d.ts.map +//// [module.d.ts] +export declare const c0 = "a"; +export declare const c1 = 1; +export declare const s0: unique symbol; +export interface T0 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T1 implements T2 { + [c0]: number; + [c1]: string; + [s0]: boolean; +} +export declare class T2 extends T1 { +} +export declare type T3 = { + [c0]: number; + [c1]: string; + [s0]: boolean; +}; +//# sourceMappingURL=module.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNamesErrors.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNamesErrors.d.ts.map new file mode 100644 index 0000000000000..d62b34aeafca8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNamesErrors.d.ts.map @@ -0,0 +1,107 @@ +//// [tests/cases/compiler/dynamicNamesErrors.ts] //// + +//// [dynamicNamesErrors.ts] +const c0 = "1"; +const c1 = 1; + +interface T0 { + [c0]: number; + 1: number; +} + +interface T1 { + [c0]: number; +} + +interface T2 { + [c0]: string; +} + +interface T3 { + [c0]: number; + [c1]: string; +} + +let t1: T1; +let t2: T2; +t1 = t2; +t2 = t1; + +const x: unique symbol = Symbol(); +const y: unique symbol = Symbol(); +const z: unique symbol = Symbol(); +const w: unique symbol = Symbol(); + +export interface InterfaceMemberVisibility { + [x]: number; + [y](): number; +} + +export class ClassMemberVisibility { + static [x]: number; + static [y](): number { return 0; } + static get [z](): number { return 0; } + static set [w](value: number) { } + + [x]: number; + [y](): number { return 0; } + get [z](): number { return 0; } + set [w](value: number) { } +} + +export type ObjectTypeVisibility = { + [x]: number; + [y](): number; +}; + +export const ObjectLiteralVisibility = { + [x]: 0, + [y](): number { return 0; }, + get [z](): number { return 0; }, + set [w](value: number) { }, +}; + +/// [Declarations] //// + + + +//// [dynamicNamesErrors.d.ts] +declare const x: unique symbol; +declare const y: unique symbol; +declare const z: unique symbol; +declare const w: unique symbol; +export interface InterfaceMemberVisibility { + [x]: number; + [y](): number; +} +export declare class ClassMemberVisibility { + static [x]: number; + static [y](): number; + static get [z](): number; + static set [w](value: number); + [x]: number; + [y](): number; + get [z](): number; + set [w](value: number); +} +export type ObjectTypeVisibility = { + [x]: number; + [y](): number; +}; +export declare const ObjectLiteralVisibility: { + [x]: number; + [y](): number; + readonly [z]: number; + [w]: number; +}; +export {}; +//# sourceMappingURL=dynamicNamesErrors.d.ts.map + +/// [Declarations Maps] //// + + +//// [dynamicNamesErrors.d.ts.map] +{"version":3,"file":"dynamicNamesErrors.d.ts","sourceRoot":"","sources":["dynamicNamesErrors.ts"],"names":[],"mappings":"AA0BA,QAAA,MAAM,CAAC,EAAE,OAAO,MAAiB,CAAC;AAClC,QAAA,MAAM,CAAC,EAAE,OAAO,MAAiB,CAAC;AAClC,QAAA,MAAM,CAAC,EAAE,OAAO,MAAiB,CAAC;AAClC,QAAA,MAAM,CAAC,EAAE,OAAO,MAAiB,CAAC;AAElC,MAAM,WAAW,yBAAyB;IACtC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;CACjB;AAED,qBAAa,qBAAqB;IAC9B,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM;IACpB,MAAM,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAc;IACtC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,EAAK;IAEjC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,CAAC,IAAI,MAAM;IACb,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,CAAc;IAC/B,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,EAAK;CAC7B;AAED,MAAM,MAAM,oBAAoB,GAAG;IAC/B,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,uBAAuB;IAChC,CAAC,CAAC,CAAC;IACH,CAAC,CAAC,CAAC,IAAI,MAAM;aACT,CAAC,CAAC,CAAC,EAAI,MAAM;IACb,CAAC,CAAC,CAAC,EAAQ,MAAM;CACxB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiB1bmlxdWUgc3ltYm9sO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G51bWJlcjsKICAgIFt5XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgZ2V0IFt6XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0KfQoKZXhwb3J0IHR5cGUgT2JqZWN0VHlwZVZpc2liaWxpdHkgPSB7CiAgICBbeF06IG51bWJlcjsKICAgIFt5XSgpOiBudW1iZXI7Cn07CgpleHBvcnQgY29uc3QgT2JqZWN0TGl0ZXJhbFZpc2liaWxpdHkgPSB7CiAgICBbeF06IDAsCiAgICBbeV0oKTogbnVtYmVyIHsgcmV0dXJuIDA7IH0sCiAgICBnZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9LAogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0sCn07 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile.d.ts new file mode 100644 index 0000000000000..3ba23a08168c5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile.d.ts @@ -0,0 +1,137 @@ +//// [tests/cases/compiler/emitClassExpressionInDeclarationFile.ts] //// + +//// [emitClassExpressionInDeclarationFile.ts] +export var simpleExample = class { + static getTags() { } + tags() { } +} +export var circularReference = class C { + static getTags(c: C): C { return c } + tags(c: C): C { return c } +} + +// repro from #15066 +export class FooItem { + foo(): void { } + name?: string; +} + +export type Constructor = new(...args: any[]) => T; +export function WithTags>(Base: T): { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & T { + return class extends Base { + static getTags(): void { } + tags(): void { } + } +} + +const TestBase: { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & typeof FooItem = WithTags(FooItem); +export class Test extends TestBase {} + +const test = new Test(); + +Test.getTags() +test.tags(); + + +/// [Declarations] //// + + + +//// [emitClassExpressionInDeclarationFile.d.ts] +export declare var simpleExample: invalid; +export declare var circularReference: invalid; +export declare class FooItem { + foo(): void; + name?: string; +} +export type Constructor = new (...args: any[]) => T; +export declare function WithTags>(Base: T): { + new (...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & T; +declare const TestBase: { + new (...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & typeof FooItem; +export declare class Test extends TestBase { +} +export {}; +//# sourceMappingURL=emitClassExpressionInDeclarationFile.d.ts.map +/// [Errors] //// + +emitClassExpressionInDeclarationFile.ts(1,28): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. +emitClassExpressionInDeclarationFile.ts(5,38): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + + +==== emitClassExpressionInDeclarationFile.ts (2 errors) ==== + export var simpleExample = class { + ~~~~~ +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + static getTags() { } + tags() { } + } + export var circularReference = class C { + ~ +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + static getTags(c: C): C { return c } + tags(c: C): C { return c } + } + + // repro from #15066 + export class FooItem { + foo(): void { } + name?: string; + } + + export type Constructor = new(...args: any[]) => T; + export function WithTags>(Base: T): { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; + } & T { + return class extends Base { + static getTags(): void { } + tags(): void { } + } + } + + const TestBase: { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; + } & typeof FooItem = WithTags(FooItem); + export class Test extends TestBase {} + + const test = new Test(); + + Test.getTags() + test.tags(); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile2.d.ts new file mode 100644 index 0000000000000..115c7305af4b2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile2.d.ts @@ -0,0 +1,161 @@ +//// [tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts] //// + +//// [emitClassExpressionInDeclarationFile2.ts] +export var noPrivates = class { + static getTags() { } + tags() { } + private static ps = -1 + private p = 12 +} + +// altered repro from #15066 to add private property +export class FooItem { + foo(): void { } + name?: string; + private property = "capitalism" +} + +export type Constructor = new(...args: any[]) => T; +export function WithTags>(Base: T): { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; +} & T { + return class extends Base { + static getTags(): void { } + tags(): void { } + } +} + +const TestBase: { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; +} & typeof FooItem = WithTags(FooItem); +export class Test extends TestBase {} + +const test = new Test(); + +Test.getTags() +test.tags(); + + +/// [Declarations] //// + + + +//// [emitClassExpressionInDeclarationFile2.d.ts] +export declare var noPrivates: invalid; +export declare class FooItem { + foo(): void; + name?: string; + private property; +} +export type Constructor = new (...args: any[]) => T; +export declare function WithTags>(Base: T): { + new (...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; +} & T; +declare const TestBase: { + new (...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; +} & typeof FooItem; +export declare class Test extends TestBase { +} +export {}; +//# sourceMappingURL=emitClassExpressionInDeclarationFile2.d.ts.map +/// [Errors] //// + +emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'p' of exported class expression may not be private or protected. +emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'ps' of exported class expression may not be private or protected. +emitClassExpressionInDeclarationFile2.ts(1,25): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. +emitClassExpressionInDeclarationFile2.ts(25,5): error TS2322: Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; } & T'. + Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; }'. + Type '(Anonymous class) & FooItem' is not assignable to type '{ tags(): void; foo(): void; name?: string; property: string; }'. + Property 'property' is private in type '(Anonymous class) & FooItem' but not in type '{ tags(): void; foo(): void; name?: string; property: string; }'. +emitClassExpressionInDeclarationFile2.ts(40,27): error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members. + The intersection '{ tags(): void; foo(): void; name?: string; property: string; } & FooItem' was reduced to 'never' because property 'property' exists in multiple constituents and is private in some. +emitClassExpressionInDeclarationFile2.ts(45,6): error TS2339: Property 'tags' does not exist on type 'Test'. + + +==== emitClassExpressionInDeclarationFile2.ts (6 errors) ==== + export var noPrivates = class { + ~~~~~~~~~~ +!!! error TS4094: Property 'p' of exported class expression may not be private or protected. + ~~~~~~~~~~ +!!! error TS4094: Property 'ps' of exported class expression may not be private or protected. + ~~~~~ +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + static getTags() { } + tags() { } + private static ps = -1 + private p = 12 + } + + // altered repro from #15066 to add private property + export class FooItem { + foo(): void { } + name?: string; + private property = "capitalism" + } + + export type Constructor = new(...args: any[]) => T; + export function WithTags>(Base: T): { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; + } & T { + return class extends Base { + ~~~~~~ +!!! error TS2322: Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; } & T'. +!!! error TS2322: Type '{ new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T' is not assignable to type '{ new (...args: any[]): { tags(): void; foo(): void; name?: string; property: string; }; getTags(): void; }'. +!!! error TS2322: Type '(Anonymous class) & FooItem' is not assignable to type '{ tags(): void; foo(): void; name?: string; property: string; }'. +!!! error TS2322: Property 'property' is private in type '(Anonymous class) & FooItem' but not in type '{ tags(): void; foo(): void; name?: string; property: string; }'. + static getTags(): void { } + tags(): void { } + } + } + + const TestBase: { + new(...args: any[]): { + tags(): void; + foo(): void; + name?: string; + property: string; + }; + getTags(): void; + } & typeof FooItem = WithTags(FooItem); + export class Test extends TestBase {} + ~~~~~~~~ +!!! error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members. +!!! error TS2509: The intersection '{ tags(): void; foo(): void; name?: string; property: string; } & FooItem' was reduced to 'never' because property 'property' exists in multiple constituents and is private in some. + + const test = new Test(); + + Test.getTags() + test.tags(); + ~~~~ +!!! error TS2339: Property 'tags' does not exist on type 'Test'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts.map new file mode 100644 index 0000000000000..6ebe542c5aae6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts.map @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/emitMethodCalledNew.ts] //// + +//// [emitMethodCalledNew.ts] +// https://github.com/microsoft/TypeScript/issues/55075 + +export const a = { + new(x: number): number { return x + 1 } +} +export const b = { + "new"(x: number): number { return x + 1 } +} +export const c = { + ["new"](x: number): number { return x + 1 } +} + + +/// [Declarations] //// + + + +//// [emitMethodCalledNew.d.ts] +export declare const a: { + "new"(x: number): number; +}; +export declare const b: { + "new"(x: number): number; +}; +export declare const c: { + "new"(x: number): number; +}; +//# sourceMappingURL=emitMethodCalledNew.d.ts.map + +/// [Declarations Maps] //// + + +//// [emitMethodCalledNew.d.ts.map] +{"version":3,"file":"emitMethodCalledNew.d.ts","sourceRoot":"","sources":["emitMethodCalledNew.ts"],"names":[],"mappings":"AAEA,eAAO,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JldHVybiB4ICsgMSB9Cn0KZXhwb3J0IGNvbnN0IGIgPSB7CiAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyIHsgcmV0dXJuIHggKyAxIH0KfQpleHBvcnQgY29uc3QgYyA9IHsKICBbIm5ldyJdKHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0K + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion01.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion01.d.ts.map new file mode 100644 index 0000000000000..1b3b0673aa4df --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion01.d.ts.map @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts] //// + +//// [emptyTuplesTypeAssertion01.ts] +let x = <[]>[]; +let y: undefined = x[0]; + +/// [Declarations] //// + + + +//// [emptyTuplesTypeAssertion01.d.ts] +declare let x: []; +declare let y: undefined; +//# sourceMappingURL=emptyTuplesTypeAssertion01.d.ts.map + +/// [Declarations Maps] //// + + +//// [emptyTuplesTypeAssertion01.d.ts.map] +{"version":3,"file":"emptyTuplesTypeAssertion01.d.ts","sourceRoot":"","sources":["emptyTuplesTypeAssertion01.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,EAAI,EAAK,CAAC;AACf,QAAA,IAAI,CAAC,EAAE,SAAgB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgeDogW107DQpkZWNsYXJlIGxldCB5OiB1bmRlZmluZWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1lbXB0eVR1cGxlc1R5cGVBc3NlcnRpb24wMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlUdXBsZXNUeXBlQXNzZXJ0aW9uMDEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVtcHR5VHVwbGVzVHlwZUFzc2VydGlvbjAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxDQUFDLEVBQUksRUFBSyxDQUFDO0FBQ2YsUUFBQSxJQUFJLENBQUMsRUFBRSxTQUFnQixDQUFDIn0=,bGV0IHggPSA8W10+W107CmxldCB5OiB1bmRlZmluZWQgPSB4WzBdOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion02.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion02.d.ts.map new file mode 100644 index 0000000000000..51d4805c2e562 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion02.d.ts.map @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts] //// + +//// [emptyTuplesTypeAssertion02.ts] +let x = [] as []; +let y: undefined = x[0]; + +/// [Declarations] //// + + + +//// [emptyTuplesTypeAssertion02.d.ts] +declare let x: []; +declare let y: undefined; +//# sourceMappingURL=emptyTuplesTypeAssertion02.d.ts.map + +/// [Declarations Maps] //// + + +//// [emptyTuplesTypeAssertion02.d.ts.map] +{"version":3,"file":"emptyTuplesTypeAssertion02.d.ts","sourceRoot":"","sources":["emptyTuplesTypeAssertion02.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,EAAS,EAAE,CAAC;AACjB,QAAA,IAAI,CAAC,EAAE,SAAgB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgeDogW107DQpkZWNsYXJlIGxldCB5OiB1bmRlZmluZWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1lbXB0eVR1cGxlc1R5cGVBc3NlcnRpb24wMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlUdXBsZXNUeXBlQXNzZXJ0aW9uMDIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVtcHR5VHVwbGVzVHlwZUFzc2VydGlvbjAyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFFBQUEsSUFBSSxDQUFDLEVBQVMsRUFBRSxDQUFDO0FBQ2pCLFFBQUEsSUFBSSxDQUFDLEVBQUUsU0FBZ0IsQ0FBQyJ9,bGV0IHggPSBbXSBhcyBbXTsKbGV0IHk6IHVuZGVmaW5lZCA9IHhbMF07 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts new file mode 100644 index 0000000000000..45b1c4fa70455 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -0,0 +1,242 @@ +//// [tests/cases/conformance/enums/enumClassification.ts] //// + +//// [enumClassification.ts] +// An enum type where each member has no initializer or an initializer that specififes +// a numeric literal, a string literal, or a single identifier naming another member in +// the enum type is classified as a literal enum type. An enum type that doesn't adhere +// to this pattern is classified as a numeric enum type. + +// Examples of literal enum types + +enum E01 { + A +} + +enum E02 { + A = 123 +} + +enum E03 { + A = "hello" +} + +enum E04 { + A, + B, + C +} + +enum E05 { + A, + B = 10, + C +} + +enum E06 { + A = "one", + B = "two", + C = "three" +} + +enum E07 { + A, + B, + C = "hi", + D = 10, + E, + F = "bye" +} + +enum E08 { + A = 10, + B = "hello", + C = A, + D = B, + E = C, +} + +// Examples of numeric enum types with only constant members + +enum E10 {} + +enum E11 { + A = +0, + B, + C +} + +enum E12 { + A = 1 << 0, + B = 1 << 1, + C = 1 << 2 +} + +// Examples of numeric enum types with constant and computed members + +enum E20 { + A = "foo".length, + B = A + 1, + C = +"123", + D = Math.sin(1) +} + + +/// [Declarations] //// + + + +//// [enumClassification.d.ts] +declare enum E01 { + A = 0 +} +declare enum E02 { + A = 123 +} +declare enum E03 { + A = "hello" +} +declare enum E04 { + A = 0, + B = 1, + C = 2 +} +declare enum E05 { + A = 0, + B = 10, + C = 11 +} +declare enum E06 { + A = "one", + B = "two", + C = "three" +} +declare enum E07 { + A = 0, + B = 1, + C = "hi", + D = 10, + E = 11, + F = "bye" +} +declare enum E08 { + A = 10, + B = "hello", + C = 10, + D = "hello", + E = 10 +} +declare enum E10 { +} +declare enum E11 { + A = 0, + B = 1, + C = 2 +} +declare enum E12 { + A = 1, + B = 2, + C = 4 +} +declare enum E20 { + A, + B, + C, + D +} +//# sourceMappingURL=enumClassification.d.ts.map +/// [Errors] //// + +enumClassification.ts(74,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +enumClassification.ts(75,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +enumClassification.ts(76,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +enumClassification.ts(77,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + + +==== enumClassification.ts (4 errors) ==== + // An enum type where each member has no initializer or an initializer that specififes + // a numeric literal, a string literal, or a single identifier naming another member in + // the enum type is classified as a literal enum type. An enum type that doesn't adhere + // to this pattern is classified as a numeric enum type. + + // Examples of literal enum types + + enum E01 { + A + } + + enum E02 { + A = 123 + } + + enum E03 { + A = "hello" + } + + enum E04 { + A, + B, + C + } + + enum E05 { + A, + B = 10, + C + } + + enum E06 { + A = "one", + B = "two", + C = "three" + } + + enum E07 { + A, + B, + C = "hi", + D = 10, + E, + F = "bye" + } + + enum E08 { + A = 10, + B = "hello", + C = A, + D = B, + E = C, + } + + // Examples of numeric enum types with only constant members + + enum E10 {} + + enum E11 { + A = +0, + B, + C + } + + enum E12 { + A = 1 << 0, + B = 1 << 1, + C = 1 << 2 + } + + // Examples of numeric enum types with constant and computed members + + enum E20 { + A = "foo".length, + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + B = A + 1, + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + C = +"123", + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + D = Math.sin(1) + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts new file mode 100644 index 0000000000000..86b652c061cb7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -0,0 +1,131 @@ +//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts] //// + +//// [enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts] +enum T1 { + a = `1` +} + +enum T2 { + a = `1`, + b = "2", + c = 3 +} + +enum T3 { + a = `1` + `1` +} + +enum T4 { + a = `1`, + b = `1` + `1`, + c = `1` + "2", + d = "2" + `1`, + e = "2" + `1` + `1` +} + +enum T5 { + a = `1`, + b = `1` + `2`, + c = `1` + `2` + `3`, + d = 1 +} + +enum T6 { + a = 1, + b = `12`.length +} + +declare enum T7 { + a = `1`, + b = `1` + `1`, + c = "2" + `1` +} + + +/// [Declarations] //// + + + +//// [enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts] +declare enum T1 { + a = "1" +} +declare enum T2 { + a = "1", + b = "2", + c = 3 +} +declare enum T3 { + a = "11" +} +declare enum T4 { + a = "1", + b = "11", + c = "12", + d = "21", + e = "211" +} +declare enum T5 { + a = "1", + b = "12", + c = "123", + d = 1 +} +declare enum T6 { + a = 1, + b +} +declare enum T7 { + a = "1", + b = "11", + c = "21" +} +//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map +/// [Errors] //// + +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + + +==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (1 errors) ==== + enum T1 { + a = `1` + } + + enum T2 { + a = `1`, + b = "2", + c = 3 + } + + enum T3 { + a = `1` + `1` + } + + enum T4 { + a = `1`, + b = `1` + `1`, + c = `1` + "2", + d = "2" + `1`, + e = "2" + `1` + `1` + } + + enum T5 { + a = `1`, + b = `1` + `2`, + c = `1` + `2` + `3`, + d = 1 + } + + enum T6 { + a = 1, + b = `12`.length + ~ +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + } + + declare enum T7 { + a = `1`, + b = `1` + `1`, + c = "2" + `1` + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map new file mode 100644 index 0000000000000..4aa0c3d75938b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map @@ -0,0 +1,84 @@ +//// [tests/cases/compiler/es6ImportNamedImportWithExport.ts] //// + +//// [server.ts] +export var a = 10; +export var x: number = a; +export var m: number = a; +export var a1 = 10; +export var x1 = 10; +export var z1 = 10; +export var z2 = 10; +export var aaaa = 10; + +//// [client.ts] +export import { } from "./server"; +export import { a } from "./server"; +export var xxxx: number = a; +export import { a as b } from "./server"; +export var xxxx = b; +export import { x, a as y } from "./server"; +export var xxxx = x; +export var xxxx = y; +export import { x as z, } from "./server"; +export var xxxx = z; +export import { m, } from "./server"; +export var xxxx = m; +export import { a1, x1 } from "./server"; +export var xxxx = a1; +export var xxxx = x1; +export import { a1 as a11, x1 as x11 } from "./server"; +export var xxxx = a11; +export var xxxx = x11; +export import { z1 } from "./server"; +export var z111: number = z1; +export import { z2 as z3 } from "./server"; +export var z2: number = z3; // z2 shouldn't give redeclare error + +// Non referenced imports +export import { aaaa } from "./server"; +export import { aaaa as bbbb } from "./server"; + + +/// [Declarations] //// + + + +//// [client.d.ts] +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var xxxx: number; +export declare var z111: number; +export declare var z2: number; +//# sourceMappingURL=client.d.ts.map +//// [server.d.ts] +export declare var a: number; +export declare var x: number; +export declare var m: number; +export declare var a1: number; +export declare var x1: number; +export declare var z1: number; +export declare var z2: number; +export declare var aaaa: number; +//# sourceMappingURL=server.d.ts.map + +/// [Declarations Maps] //// + + +//// [client.d.ts.map] +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["client.ts"],"names":[],"mappings":"AAEA,eAAO,IAAI,IAAI,EAAE,MAAU,CAAC;AAE5B,eAAO,IAAI,IAAI,EAFE,MAEE,CAAC;AAEpB,eAAO,IAAI,IAAI,EAJE,MAIE,CAAC;AACpB,eAAO,IAAI,IAAI,EALE,MAKE,CAAC;AAEpB,eAAO,IAAI,IAAI,EAPE,MAOE,CAAC;AAEpB,eAAO,IAAI,IAAI,EATE,MASE,CAAC;AAEpB,eAAO,IAAI,IAAI,EAXE,MAWG,CAAC;AACrB,eAAO,IAAI,IAAI,EAZE,MAYG,CAAC;AAErB,eAAO,IAAI,IAAI,EAdE,MAcI,CAAC;AACtB,eAAO,IAAI,IAAI,EAfE,MAeI,CAAC;AAEtB,eAAO,IAAI,IAAI,EAAE,MAAW,CAAC;AAE7B,eAAO,IAAI,EAAE,EAAE,MAAW,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgeHh4eDogbnVtY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xhcmUgZXJyb3IKCi8vIE5vbiByZWZlcmVuY2VkIGltcG9ydHMKZXhwb3J0IGltcG9ydCB7IGFhYWEgfSBmcm9tICIuL3NlcnZlciI7CmV4cG9ydCBpbXBvcnQgeyBhYWFhIGFzIGJiYmIgfSBmcm9tICIuL3NlcnZlciI7Cg== + + +//// [server.d.ts.map] +{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["server.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,CAAC,QAAK,CAAC;AAClB,eAAO,IAAI,CAAC,EAAE,MAAU,CAAC;AACzB,eAAO,IAAI,CAAC,EAAE,MAAU,CAAC;AACzB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,EAAE,QAAK,CAAC;AACnB,eAAO,IAAI,IAAI,QAAK,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGE6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgbTogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIGExOiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgeDE6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB6MTogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIHoyOiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgYWFhYTogbnVtYmVyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c2VydmVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLENBQUMsUUFBSyxDQUFDO0FBQ2xCLGVBQU8sSUFBSSxDQUFDLEVBQUUsTUFBVSxDQUFDO0FBQ3pCLGVBQU8sSUFBSSxDQUFDLEVBQUUsTUFBVSxDQUFDO0FBQ3pCLGVBQU8sSUFBSSxFQUFFLFFBQUssQ0FBQztBQUNuQixlQUFPLElBQUksRUFBRSxRQUFLLENBQUM7QUFDbkIsZUFBTyxJQUFJLEVBQUUsUUFBSyxDQUFDO0FBQ25CLGVBQU8sSUFBSSxFQUFFLFFBQUssQ0FBQztBQUNuQixlQUFPLElBQUksSUFBSSxRQUFLLENBQUMifQ==,ZXhwb3J0IHZhciBhID0gMTA7CmV4cG9ydCB2YXIgeDogbnVtYmVyID0gYTsKZXhwb3J0IHZhciBtOiBudW1iZXIgPSBhOwpleHBvcnQgdmFyIGExID0gMTA7CmV4cG9ydCB2YXIgeDEgPSAxMDsKZXhwb3J0IHZhciB6MSA9IDEwOwpleHBvcnQgdmFyIHoyID0gMTA7CmV4cG9ydCB2YXIgYWFhYSA9IDEwOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exhaustiveSwitchStatements1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exhaustiveSwitchStatements1.d.ts.map new file mode 100644 index 0000000000000..0f81cd8fef3d5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exhaustiveSwitchStatements1.d.ts.map @@ -0,0 +1,342 @@ +//// [tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts] //// + +//// [exhaustiveSwitchStatements1.ts] +function f1(x: 1 | 2): string { + if (!!true) { + switch (x) { + case 1: return 'a'; + case 2: return 'b'; + } + x; // Unreachable + } + else { + throw 0; + } +} + +function f2(x: 1 | 2): void { + let z: number; + switch (x) { + case 1: z = 10; break; + case 2: z = 20; break; + } + z; // Definitely assigned +} + +function f3(x: 1 | 2): 10 | 20 { + switch (x) { + case 1: return 10; + case 2: return 20; + // Default considered reachable to allow defensive coding + default: throw new Error("Bad input"); + } +} + +// Repro from #11572 + +enum E { A, B } + +function f(e: E): number { + switch (e) { + case E.A: return 0 + case E.B: return 1 + } +} + +function g(e: E): number { + if (!true) + return -1 + else + switch (e) { + case E.A: return 0 + case E.B: return 1 + } +} + +// Repro from #12668 + +interface Square { kind: "square"; size: number; } + +interface Rectangle { kind: "rectangle"; width: number; height: number; } + +interface Circle { kind: "circle"; radius: number; } + +interface Triangle { kind: "triangle"; side: number; } + +type Shape = Square | Rectangle | Circle | Triangle; + +function area(s: Shape): number { + let area; + switch (s.kind) { + case "square": area = s.size * s.size; break; + case "rectangle": area = s.width * s.height; break; + case "circle": area = Math.PI * s.radius * s.radius; break; + case "triangle": area = Math.sqrt(3) / 4 * s.side * s.side; break; + } + return area; +} + +function areaWrapped(s: Shape): number { + let area; + area = (() => { + switch (s.kind) { + case "square": return s.size * s.size; + case "rectangle": return s.width * s.height; + case "circle": return Math.PI * s.radius * s.radius; + case "triangle": return Math.sqrt(3) / 4 * s.side * s.side; + } + })(); + return area; +} + +// Repro from #13241 + +enum MyEnum { + A, + B +} + +function thisGivesError(e: MyEnum): string { + let s: string; + switch (e) { + case MyEnum.A: s = "it was A"; break; + case MyEnum.B: s = "it was B"; break; + } + return s; +} + +function good1(e: MyEnum): string { + let s: string; + switch (e) { + case MyEnum.A: s = "it was A"; break; + case MyEnum.B: s = "it was B"; break; + default: s = "it was something else"; break; + } + return s; +} + +function good2(e: MyEnum): string { + switch (e) { + case MyEnum.A: return "it was A"; + case MyEnum.B: return "it was B"; + } +} + +// Repro from #18362 + +enum Level { + One, + Two, +} + +const doSomethingWithLevel = (level: Level): Level => { + let next: Level; + switch (level) { + case Level.One: + next = Level.Two; + break; + case Level.Two: + next = Level.One; + break; + } + return next; +}; + +// Repro from #20409 + +interface Square2 { + kind: "square"; + size: number; +} + +interface Circle2 { + kind: "circle"; + radius: number; +} + +type Shape2 = Square2 | Circle2; + +function withDefault(s1: Shape2, s2: Shape2): string { + switch (s1.kind) { + case "square": + return "1"; + case "circle": + switch (s2.kind) { + case "square": + return "2"; + case "circle": + return "3"; + default: + return "never"; + } + } +} + +function withoutDefault(s1: Shape2, s2: Shape2): string { + switch (s1.kind) { + case "square": + return "1"; + case "circle": + switch (s2.kind) { + case "square": + return "2"; + case "circle": + return "3"; + } + } +} + +// Repro from #20823 + +function test4(value: 1 | 2): string { + let x: string; + switch (value) { + case 1: x = "one"; break; + case 2: x = "two"; break; + } + return x; +} + +// Repro from #34661 + +enum Animal { DOG, CAT } + +declare const zoo: { animal: Animal } | undefined; + +function expression(): Animal { + switch (zoo?.animal ?? Animal.DOG) { + case Animal.DOG: return Animal.DOG + case Animal.CAT: return Animal.CAT + } +} + +// Repro from #34840 + +function foo(): void { + const foo: number | undefined = 0; + while (true) { + const stats = foo; + switch (stats) { + case 1: break; + case 2: break; + } + } +} + +// Repro from #35070 + +type O = { + a: number, + b: number +}; +type K = keyof O | 'c'; +function ff(o: O, k: K): number { + switch(k) { + case 'c': + k = 'a'; + } + k === 'c'; // Error + return o[k]; +} + +// Repro from #35431 +type A = { kind: "abc" } | { kind: "def" }; + +function f35431(a: A): void { + switch (a.kind) { + case "abc": + case "def": return; + default: + a!.kind; // Error expected + } +} + +/// [Declarations] //// + + + +//// [exhaustiveSwitchStatements1.d.ts] +declare function f1(x: 1 | 2): string; +declare function f2(x: 1 | 2): void; +declare function f3(x: 1 | 2): 10 | 20; +declare enum E { + A = 0, + B = 1 +} +declare function f(e: E): number; +declare function g(e: E): number; +interface Square { + kind: "square"; + size: number; +} +interface Rectangle { + kind: "rectangle"; + width: number; + height: number; +} +interface Circle { + kind: "circle"; + radius: number; +} +interface Triangle { + kind: "triangle"; + side: number; +} +type Shape = Square | Rectangle | Circle | Triangle; +declare function area(s: Shape): number; +declare function areaWrapped(s: Shape): number; +declare enum MyEnum { + A = 0, + B = 1 +} +declare function thisGivesError(e: MyEnum): string; +declare function good1(e: MyEnum): string; +declare function good2(e: MyEnum): string; +declare enum Level { + One = 0, + Two = 1 +} +declare const doSomethingWithLevel: (level: Level) => Level; +interface Square2 { + kind: "square"; + size: number; +} +interface Circle2 { + kind: "circle"; + radius: number; +} +type Shape2 = Square2 | Circle2; +declare function withDefault(s1: Shape2, s2: Shape2): string; +declare function withoutDefault(s1: Shape2, s2: Shape2): string; +declare function test4(value: 1 | 2): string; +declare enum Animal { + DOG = 0, + CAT = 1 +} +declare const zoo: { + animal: Animal; +} | undefined; +declare function expression(): Animal; +declare function foo(): void; +type O = { + a: number; + b: number; +}; +type K = keyof O | 'c'; +declare function ff(o: O, k: K): number; +type A = { + kind: "abc"; +} | { + kind: "def"; +}; +declare function f35431(a: A): void; +//# sourceMappingURL=exhaustiveSwitchStatements1.d.ts.map + +/// [Declarations Maps] //// + + +//// [exhaustiveSwitchStatements1.d.ts.map] +{"version":3,"file":"exhaustiveSwitchStatements1.d.ts","sourceRoot":"","sources":["exhaustiveSwitchStatements1.ts"],"names":[],"mappings":"AAAA,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CAW5B;AAED,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAO1B;AAED,iBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAO7B;AAID,aAAK,CAAC;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;AAEf,iBAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAKvB;AAED,iBAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAQvB;AAID,UAAU,MAAM;IAAG,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE;AAElD,UAAU,SAAS;IAAG,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAAE;AAEzE,UAAU,MAAM;IAAG,IAAI,EA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IjsKICAgIHJhZGl1czogbnVtYmVyOwp9Cgp0eXBlIFNoYXBlMiA9IFNxdWFyZTIgfCBDaXJjbGUyOwoKZnVuY3Rpb24gd2l0aERlZmF1bHQoczE6IFNoYXBlMiwgczI6IFNoYXBlMik6IHN0cmluZyB7CiAgICBzd2l0Y2ggKHMxLmtpbmQpIHsKICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICByZXR1cm4gIjEiOwogICAgICAgIGNhc2UgImNpcmNsZSI6CiAgICAgICAgICAgIHN3aXRjaCAoczIua2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAic3F1YXJlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjIiOwogICAgICAgICAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjMiOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIm5ldmVyIjsKICAgICAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiB3aXRob3V0RGVmYXVsdChzMTogU2hhcGUyLCBzMjogU2hhcGUyKTogc3RyaW5nIHsKICAgIHN3aXRjaCAoczEua2luZCkgewogICAgICAgIGNhc2UgInNxdWFyZSI6CiAgICAgICAgICAgIHJldHVybiAiMSI7CiAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgc3dpdGNoIChzMi5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMiI7CiAgICAgICAgICAgICAgICBjYXNlICJjaXJjbGUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMyI7CiAgICAgICAgICAgIH0KICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMjA4MjMKCmZ1bmN0aW9uIHRlc3Q0KHZhbHVlOiAxIHwgMik6IHN0cmluZyB7CiAgICBsZXQgeDogc3RyaW5nOwogICAgc3dpdGNoICh2YWx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Qp0eXBlIEEgPSB7IGtpbmQ6ICJhYmMiIH0gfCB7IGtpbmQ6ICJkZWYiIH07CgpmdW5jdGlvbiBmMzU0MzEoYTogQSk6IHZvaWQgewogIHN3aXRjaCAoYS5raW5kKSB7CiAgICBjYXNlICJhYmMiOgogICAgY2FzZSAiZGVmIjogcmV0dXJuOwogICAgZGVmYXVsdDoKICAgICAgYSEua2luZDsgLy8gRXJyb3IgZXhwZWN0ZWQKICB9Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionBlockShadowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionBlockShadowing.d.ts new file mode 100644 index 0000000000000..e269072c2e2fd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionBlockShadowing.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/expandoFunctionBlockShadowing.ts] //// + +//// [expandoFunctionBlockShadowing.ts] +// https://github.com/microsoft/TypeScript/issues/56538 + +export function X(): void {} +if (Math.random()) { + const X: { test?: any } = {}; + X.test = 1; +} + +export function Y(): void {} +Y.test = "foo"; +const aliasTopY = Y; +if (Math.random()) { + const Y = function Y() {} + Y.test = 42; + + const topYcheck: { (): void; test: string } = aliasTopY; + const blockYcheck: { (): void; test: number } = Y; +} + +/// [Declarations] //// + + + +//// [expandoFunctionBlockShadowing.d.ts] +export declare function X(): void; +export declare function Y(): void; +//# sourceMappingURL=expandoFunctionBlockShadowing.d.ts.map +/// [Errors] //// + +expandoFunctionBlockShadowing.ts(10,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== expandoFunctionBlockShadowing.ts (1 errors) ==== + // https://github.com/microsoft/TypeScript/issues/56538 + + export function X(): void {} + if (Math.random()) { + const X: { test?: any } = {}; + X.test = 1; + } + + export function Y(): void {} + Y.test = "foo"; + ~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + const aliasTopY = Y; + if (Math.random()) { + const Y = function Y() {} + Y.test = 42; + + const topYcheck: { (): void; test: string } = aliasTopY; + const blockYcheck: { (): void; test: number } = Y; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts new file mode 100644 index 0000000000000..7558306dd7510 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts @@ -0,0 +1,192 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +//// [expandoFunctionNestedAssigments.ts] +function Foo(): void { + +} +let d: number = (Foo.inVariableInit = 1); + + +function bar(p: number = (Foo.inNestedFunction = 1)): void { + +} + +(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + +if(Foo.fromIf = 1) { + Foo.inIf = 1; +} + +while(Foo.fromWhileCondition = 1) { + Foo.fromWhileBody = 1; + { + Foo.fromWhileBodyNested = 1; + } +} + +do { + Foo.fromDoBody = 1; + { + Foo.fromDoBodyNested = 1; + } +} while(Foo.fromDoCondition = 1); + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + Foo.fromForBody = 1; + { + Foo.fromForBodyNested = 1; + } +} + +for(let f of (Foo.forOf = []) ){ + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } +} + + +for(let f in (Foo.forIn = []) ){ + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; + } +} + +/// [Declarations] //// + + + +//// [expandoFunctionNestedAssigments.d.ts] +declare function Foo(): void; +declare let d: number; +declare function bar(p?: number): void; +//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map +/// [Errors] //// + +expandoFunctionNestedAssigments.ts(4,18): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(7,31): error TS2339: Property 'inNestedFunction' does not exist on type 'typeof Foo'. +expandoFunctionNestedAssigments.ts(11,2): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(11,30): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(11,46): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(13,4): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(14,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(17,7): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(18,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(20,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(25,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(27,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(29,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(31,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(31,23): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(31,45): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(32,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(34,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(38,15): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(39,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(41,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(46,15): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(47,5): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionNestedAssigments.ts(49,9): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== expandoFunctionNestedAssigments.ts (24 errors) ==== + function Foo(): void { + + } + let d: number = (Foo.inVariableInit = 1); + ~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + + function bar(p: number = (Foo.inNestedFunction = 1)): void { + ~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'inNestedFunction' does not exist on type 'typeof Foo'. + + } + + (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + if(Foo.fromIf = 1) { + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.inIf = 1; + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + + while(Foo.fromWhileCondition = 1) { + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.fromWhileBody = 1; + ~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromWhileBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } + + do { + Foo.fromDoBody = 1; + ~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromDoBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } while(Foo.fromDoCondition = 1); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.fromForBody = 1; + ~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromForBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } + + for(let f of (Foo.forOf = []) ){ + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.fromForOfBody = 1; + ~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromForOfBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } + + + for(let f in (Foo.forIn = []) ){ + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo.fromForInBody = 1; + ~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + { + Foo.fromForInBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentMembersVisibleInAugmentation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentMembersVisibleInAugmentation.d.ts new file mode 100644 index 0000000000000..870b86cfedb6c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentMembersVisibleInAugmentation.d.ts @@ -0,0 +1,62 @@ +//// [tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts] //// + +//// [index.d.ts] +export = foo; +declare namespace foo { + export type T = number; +} + +//// [a.ts] +import * as foo from "foo"; +declare module "foo" { + export function f(): T; // OK +} + +//// [b.ts] +import * as foo from "foo"; +declare module "foo" { + export function g(): foo.T; // OK +} + + +/// [Declarations] //// + + + +//// [/a.d.ts] +declare module "foo" { + function f(): T; +} +export {}; +//# sourceMappingURL=a.d.ts.map +//// [/b.d.ts] +import * as foo from "foo"; +declare module "foo" { + function g(): foo.T; +} +//# sourceMappingURL=b.d.ts.map +/// [Errors] //// + +/a.ts(3,26): error TS4060: Return type of exported function has or is using private name 'T'. + + +==== /node_modules/foo/index.d.ts (0 errors) ==== + export = foo; + declare namespace foo { + export type T = number; + } + +==== /a.ts (1 errors) ==== + import * as foo from "foo"; + declare module "foo" { + export function f(): T; // OK + ~ +!!! error TS4060: Return type of exported function has or is using private name 'T'. + } + +==== /b.ts (0 errors) ==== + import * as foo from "foo"; + declare module "foo" { + export function g(): foo.T; // OK + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts new file mode 100644 index 0000000000000..8d5c44bda1bb4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts] //// + +//// [exportDefaultNamespace.ts] +export default function someFunc(): string { + return 'hello!'; +} + +someFunc.someProp = 'yo'; + + +/// [Declarations] //// + + + +//// [exportDefaultNamespace.d.ts] +export default function someFunc(): string; +//# sourceMappingURL=exportDefaultNamespace.d.ts.map +/// [Errors] //// + +exportDefaultNamespace.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== exportDefaultNamespace.ts (1 errors) ==== + export default function someFunc(): string { + return 'hello!'; + } + + someFunc.someProp = 'yo'; + ~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/fakeInfinity2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/fakeInfinity2.d.ts new file mode 100644 index 0000000000000..17d2dcf3421f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/fakeInfinity2.d.ts @@ -0,0 +1,58 @@ +//// [tests/cases/compiler/fakeInfinity2.ts] //// + +//// [fakeInfinity2.ts] +export enum Foo { + A = 1e999, + B = -1e999, +} + +namespace X { + type A = 1e999; + type B = 2e999; + + export function f(): A { + throw new Error() + } +} + +export const m: Infinity = X.f(); + + +/// [Declarations] //// + + + +//// [fakeInfinity2.d.ts] +export declare enum Foo { + A = Infinity, + B = -Infinity +} +export declare const m: Infinity; +//# sourceMappingURL=fakeInfinity2.d.ts.map +/// [Errors] //// + +fakeInfinity2.ts(15,17): error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? +fakeInfinity2.ts(15,17): error TS4025: Exported variable 'm' has or is using private name 'Infinity'. + + +==== fakeInfinity2.ts (2 errors) ==== + export enum Foo { + A = 1e999, + B = -1e999, + } + + namespace X { + type A = 1e999; + type B = 2e999; + + export function f(): A { + throw new Error() + } + } + + export const m: Infinity = X.f(); + ~~~~~~~~ +!!! error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? + ~~~~~~~~ +!!! error TS4025: Exported variable 'm' has or is using private name 'Infinity'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/fakeInfinity3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/fakeInfinity3.d.ts new file mode 100644 index 0000000000000..0bbccabccc7d0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/fakeInfinity3.d.ts @@ -0,0 +1,63 @@ +//// [tests/cases/compiler/fakeInfinity3.ts] //// + +//// [fakeInfinity3.ts] +export enum Foo { + A = 1e999, + B = -1e999, +} + +namespace X { + type A = 1e999; + type B = 2e999; + + export function f(): A { + throw new Error() + } +} + +export const m: Infinity = X.f(); + +export const Infinity = "oops"; + + +/// [Declarations] //// + + + +//// [fakeInfinity3.d.ts] +export declare enum Foo { + A = Infinity, + B = -Infinity +} +export declare const m: Infinity; +export declare const Infinity = "oops"; +//# sourceMappingURL=fakeInfinity3.d.ts.map +/// [Errors] //// + +fakeInfinity3.ts(15,17): error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? +fakeInfinity3.ts(15,17): error TS4025: Exported variable 'm' has or is using private name 'Infinity'. + + +==== fakeInfinity3.ts (2 errors) ==== + export enum Foo { + A = 1e999, + B = -1e999, + } + + namespace X { + type A = 1e999; + type B = 2e999; + + export function f(): A { + throw new Error() + } + } + + export const m: Infinity = X.f(); + ~~~~~~~~ +!!! error TS2749: 'Infinity' refers to a value, but is being used as a type here. Did you mean 'typeof Infinity'? + ~~~~~~~~ +!!! error TS4025: Exported variable 'm' has or is using private name 'Infinity'. + + export const Infinity = "oops"; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/flatArrayNoExcessiveStackDepth.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/flatArrayNoExcessiveStackDepth.d.ts.map new file mode 100644 index 0000000000000..25c978fa149a6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/flatArrayNoExcessiveStackDepth.d.ts.map @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts] //// + +//// [flatArrayNoExcessiveStackDepth.ts] +// Repro from #43493 + +declare const foo: unknown[]; +const bar: string[] = foo.flatMap(bar => bar as Foo); + +interface Foo extends Array {} + +// Repros from comments in #43249 + +const repro_43249 = (value: unknown): void => { + if (typeof value !== "string") { + throw new Error("No"); + } + const match = value.match(/anything/) || []; + const [, extracted] = match; +}; + +function f(x: FlatArray, y: FlatArray): void { + x = y; + y = x; // Error +} + + +/// [Declarations] //// + + + +//// [flatArrayNoExcessiveStackDepth.d.ts] +declare const foo: unknown[]; +declare const bar: string[]; +interface Foo extends Array { +} +declare const repro_43249: (value: unknown) => void; +declare function f(x: FlatArray, y: FlatArray): void; +//# sourceMappingURL=flatArrayNoExcessiveStackDepth.d.ts.map + +/// [Declarations Maps] //// + + +//// [flatArrayNoExcessiveStackDepth.d.ts.map] +{"version":3,"file":"flatArrayNoExcessiveStackDepth.d.ts","sourceRoot":"","sources":["flatArrayNoExcessiveStackDepth.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,MAAM,EAAmC,CAAC;AAErD,UAAU,GAAI,SAAQ,KAAK,CAAC,MAAM,CAAC;CAAG;AAItC,QAAA,MAAM,WAAW,GAAI,KAAK,EAAE,OAAO,KAAG,IAMrC,CAAC;AAEF,iBAAS,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,EAA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QUFDLEVBQUUsU0FBUyxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUMsR0FBRyxJQUFJLENBR3BGIn0=,Ly8gUmVwcm8gZnJvbSAjNDM0OTMKCmRlY2xhcmUgY29uc3QgZm9vOiB1bmtub3duW107CmNvbnN0IGJhcjogc3RyaW5nW10gPSBmb28uZmxhdE1hcChiYXIgPT4gYmFyIGFzIEZvbyk7CgppbnRlcmZhY2UgRm9vIGV4dGVuZHMgQXJyYXk8c3RyaW5nPiB7fQoKLy8gUmVwcm9zIGZyb20gY29tbWVudHMgaW4gIzQzMjQ5Cgpjb25zdCByZXByb180MzI0OSA9ICh2YWx1ZTogdW5rbm93bik6IHZvaWQgPT4gewogICAgaWYgKHR5cGVvZiB2YWx1ZSAhPT0gInN0cmluZyIpIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIk5vIik7CiAgICB9CiAgICBjb25zdCBtYXRjaCA9IHZhbHVlLm1hdGNoKC9hbnl0aGluZy8pIHx8IFtdOwogICAgY29uc3QgWywgZXh0cmFjdGVkXSA9IG1hdGNoOwp9OwoKZnVuY3Rpb24gZjxBcnIsIEQgZXh0ZW5kcyBudW1iZXI+KHg6IEZsYXRBcnJheTxBcnIsIGFueT4sIHk6IEZsYXRBcnJheTxBcnIsIEQ+KTogdm9pZCB7CiAgICB4ID0geTsKICAgIHkgPSB4OyAgLy8gRXJyb3IKfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericContextualTypes1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericContextualTypes1.d.ts.map new file mode 100644 index 0000000000000..77f623b3e4fbc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericContextualTypes1.d.ts.map @@ -0,0 +1,101 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts] //// + +//// [genericContextualTypes1.ts] +type Box = { value: T }; + +declare function wrap(f: (a: A) => B): (a: A) => B; + +declare function compose(f: (a: A) => B, g: (b: B) => C): (a: A) => C; + +declare function list(a: T): T[]; + +declare function unlist(a: T[]): T; + +declare function box(x: V): Box; + +declare function unbox(x: Box): W; + +declare function map(a: T[], f: (x: T) => U): U[]; + +declare function identity(x: T): T; + +declare function zip(a: A, b: B): [A, B]; + +declare function flip(f: (x: X, y: Y) => Z): (y: Y, x: X) => Z; + +const f00: (x: A) => A[] = list; +const f01: (x: A) => A[] = x => [x]; +const f02: (x: A) => A[] = wrap(list); +const f03: (x: A) => A[] = wrap(x => [x]); + +const f10: (x: T) => Box = compose(a => list(a), b => box(b)); +const f11: (x: T) => Box = compose(list, box); +const f12: (x: Box) => T = compose(a => unbox(a), b => unlist(b)); +const f13: (x: Box) => T = compose(unbox, unlist); + +const arrayMap = (f: (x: T) => U): (a: T[]) => U[] => (a: T[]) => a.map(f); +const arrayFilter = (f: (x: T) => boolean): (a: T[]) => T[] => (a: T[]) => a.filter(f); + +const f20: (a: string[]) => number[] = arrayMap(x => x.length); +const f21: (a: A[]) => A[][] = arrayMap(x => [x]); +const f22: (a: A[]) => A[] = arrayMap(identity); +const f23: (a: A[]) => Box[] = arrayMap(value => ({ value })); + +const f30: (a: string[]) => string[] = arrayFilter(x => x.length > 10); +const f31: >(a: T[]) => T[] = arrayFilter(x => x.value > 10); + +const f40: (b: B, a: A) => [A, B] = flip(zip); + +// Repro from #16293 + +type fn = (a: A) => A; +const fn: fn = a => a; + + +/// [Declarations] //// + + + +//// [genericContextualTypes1.d.ts] +type Box = { + value: T; +}; +declare function wrap(f: (a: A) => B): (a: A) => B; +declare function compose(f: (a: A) => B, g: (b: B) => C): (a: A) => C; +declare function list(a: T): T[]; +declare function unlist(a: T[]): T; +declare function box(x: V): Box; +declare function unbox(x: Box): W; +declare function map(a: T[], f: (x: T) => U): U[]; +declare function identity(x: T): T; +declare function zip(a: A, b: B): [A, B]; +declare function flip(f: (x: X, y: Y) => Z): (y: Y, x: X) => Z; +declare const f00: (x: A) => A[]; +declare const f01: (x: A) => A[]; +declare const f02: (x: A) => A[]; +declare const f03: (x: A) => A[]; +declare const f10: (x: T) => Box; +declare const f11: (x: T) => Box; +declare const f12: (x: Box) => T; +declare const f13: (x: Box) => T; +declare const arrayMap: (f: (x: T) => U) => (a: T[]) => U[]; +declare const arrayFilter: (f: (x: T) => boolean) => (a: T[]) => T[]; +declare const f20: (a: string[]) => number[]; +declare const f21: (a: A[]) => A[][]; +declare const f22: (a: A[]) => A[]; +declare const f23: (a: A[]) => Box[]; +declare const f30: (a: string[]) => string[]; +declare const f31: >(a: T[]) => T[]; +declare const f40: (b: B, a: A) => [A, B]; +type fn = (a: A) => A; +declare const fn: fn; +//# sourceMappingURL=genericContextualTypes1.d.ts.map + +/// [Declarations Maps] //// + + +//// [genericContextualTypes1.d.ts.map] +{"version":3,"file":"genericContextualTypes1.d.ts","sourceRoot":"","sources":["genericContextualTypes1.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAE3B,OAAO,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEzD,OAAO,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAE/E,OAAO,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;AAEpC,OAAO,UAAU,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;AAEtC,OAAO,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAA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ID0+IHVuYm94KGEpLCBiID0+IHVubGlzdChiKSk7CmNvbnN0IGYxMzogPFQ+KHg6IEJveDxUW10+KSA9PiBUID0gY29tcG9zZSh1bmJveCwgdW5saXN0KTsKCmNvbnN0IGFycmF5TWFwID0gPFQsIFU+KGY6ICh4OiBUKSA9PiBVKTogKGE6IFRbXSkgPT4gVVtdID0+IChhOiBUW10pID0+IGEubWFwKGYpOwpjb25zdCBhcnJheUZpbHRlciA9IDxUPihmOiAoeDogVCkgPT4gYm9vbGVhbik6IChhOiBUW10pID0+IFRbXSA9PiAoYTogVFtdKSA9PiBhLmZpbHRlcihmKTsKCmNvbnN0IGYyMDogKGE6IHN0cmluZ1tdKSA9PiBudW1iZXJbXSA9IGFycmF5TWFwKHggPT4geC5sZW5ndGgpOwpjb25zdCBmMjE6IDxBPihhOiBBW10pID0+IEFbXVtdID0gYXJyYXlNYXAoeCA9PiBbeF0pOwpjb25zdCBmMjI6IDxBPihhOiBBW10pID0+IEFbXSA9IGFycmF5TWFwKGlkZW50aXR5KTsKY29uc3QgZjIzOiA8QT4oYTogQVtdKSA9PiBCb3g8QT5bXSA9IGFycmF5TWFwKHZhbHVlID0+ICh7IHZhbHVlIH0pKTsKCmNvbnN0IGYzMDogKGE6IHN0cmluZ1tdKSA9PiBzdHJpbmdbXSA9IGFycmF5RmlsdGVyKHggPT4geC5sZW5ndGggPiAxMCk7CmNvbnN0IGYzMTogPFQgZXh0ZW5kcyBCb3g8bnVtYmVyPj4oYTogVFtdKSA9PiBUW10gPSBhcnJheUZpbHRlcih4ID0+IHgudmFsdWUgPiAxMCk7Cgpjb25zdCBmNDA6IDxBLCBCPihiOiBCLCBhOiBBKSA9PiBbQSwgQl0gPSBmbGlwKHppcCk7CgovLyBSZXBybyBmcm9tICMxNjI5MwoKdHlwZSBmbiA9IDxBPihhOiBBKSA9PiBBOwpjb25zdCBmbjogZm4gPSBhID0+IGE7Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericDefaultsErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericDefaultsErrors.d.ts new file mode 100644 index 0000000000000..58034e99a30fc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericDefaultsErrors.d.ts @@ -0,0 +1,214 @@ +//// [tests/cases/compiler/genericDefaultsErrors.ts] //// + +//// [genericDefaultsErrors.ts] +declare const x: any; + +declare function f03(): void; // error +declare function f04(): void; // error +declare function f05(): void; // error +declare function f06(): void; // error + +declare function f11(): void; +f11(); // ok +f11<1>(); // error +f11<1, 2>(); // ok +f11<1, 2, 3>(); // ok +f11<1, 2, 3, 4>(); // error + +declare function f12(a?: U): void; +f12(); // ok +f12("a"); // error + +interface i00 { } // ok +interface i00 { } // error + +interface i01 { } // ok +interface i01 { } // error + +interface i04 { } // error +interface i05 { } // error +interface i06 { } // error +interface i07 { } // error +interface i08 { } // error + +interface i09 { } +type i09t00 = i09; // error +type i09t01 = i09<1>; // error +type i09t02 = i09<1, 2>; // ok +type i09t03 = i09<1, 2, 3>; // ok +type i09t04 = i09<1, 2, 3, 4>; // error + +interface i10 { x: T; } // error +interface i10 {} + +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference {} + +/// [Declarations] //// + + + +//// [genericDefaultsErrors.d.ts] +declare const x: any; +declare function f03(): void; +declare function f04(): void; +declare function f05(): void; +declare function f06(): void; +declare function f11(): void; +declare function f12(a?: U): void; +interface i00 { +} +interface i00 { +} +interface i01 { +} +interface i01 { +} +interface i04 { +} +interface i05 { +} +interface i06 { +} +interface i07 { +} +interface i08 { +} +interface i09 { +} +type i09t00 = i09; +type i09t01 = i09<1>; +type i09t02 = i09<1, 2>; +type i09t03 = i09<1, 2, 3>; +type i09t04 = i09<1, 2, 3, 4>; +interface i10 { + x: T; +} +interface i10 { +} +interface SelfReference { +} +//# sourceMappingURL=genericDefaultsErrors.d.ts.map +/// [Errors] //// + +genericDefaultsErrors.ts(3,41): error TS2344: Type 'number' does not satisfy the constraint 'string'. +genericDefaultsErrors.ts(4,59): error TS2344: Type 'T' does not satisfy the constraint 'number'. + Type 'string' is not assignable to type 'number'. +genericDefaultsErrors.ts(5,44): error TS2344: Type 'T' does not satisfy the constraint 'number'. +genericDefaultsErrors.ts(6,39): error TS2344: Type 'number' does not satisfy the constraint 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +genericDefaultsErrors.ts(10,5): error TS2558: Expected 2-3 type arguments, but got 1. +genericDefaultsErrors.ts(13,5): error TS2558: Expected 2-3 type arguments, but got 4. +genericDefaultsErrors.ts(17,13): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +genericDefaultsErrors.ts(19,11): error TS2428: All declarations of 'i00' must have identical type parameters. +genericDefaultsErrors.ts(20,11): error TS2428: All declarations of 'i00' must have identical type parameters. +genericDefaultsErrors.ts(22,11): error TS2428: All declarations of 'i01' must have identical type parameters. +genericDefaultsErrors.ts(23,11): error TS2428: All declarations of 'i01' must have identical type parameters. +genericDefaultsErrors.ts(25,27): error TS2706: Required type parameters may not follow optional type parameters. +genericDefaultsErrors.ts(26,34): error TS2344: Type 'number' does not satisfy the constraint 'string'. +genericDefaultsErrors.ts(27,52): error TS2344: Type 'T' does not satisfy the constraint 'number'. + Type 'string' is not assignable to type 'number'. +genericDefaultsErrors.ts(28,37): error TS2344: Type 'T' does not satisfy the constraint 'number'. +genericDefaultsErrors.ts(29,32): error TS2344: Type 'number' does not satisfy the constraint 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. +genericDefaultsErrors.ts(32,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +genericDefaultsErrors.ts(33,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +genericDefaultsErrors.ts(36,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +genericDefaultsErrors.ts(38,20): error TS2304: Cannot find name 'T'. +genericDefaultsErrors.ts(38,20): error TS4033: Property 'x' of exported interface has or is using private name 'T'. +genericDefaultsErrors.ts(42,29): error TS2716: Type parameter 'T' has a circular default. + + +==== genericDefaultsErrors.ts (22 errors) ==== + declare const x: any; + + declare function f03(): void; // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. + declare function f04(): void; // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' is not assignable to type 'number'. + declare function f05(): void; // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! related TS2208 genericDefaultsErrors.ts:5:22: This type parameter might need an `extends number` constraint. + declare function f06(): void; // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'T'. +!!! error TS2344: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + declare function f11(): void; + f11(); // ok + f11<1>(); // error + ~ +!!! error TS2558: Expected 2-3 type arguments, but got 1. + f11<1, 2>(); // ok + f11<1, 2, 3>(); // ok + f11<1, 2, 3, 4>(); // error + ~~~~~~~~~~ +!!! error TS2558: Expected 2-3 type arguments, but got 4. + + declare function f12(a?: U): void; + f12(); // ok + f12("a"); // error + ~~~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + + interface i00 { } // ok + ~~~ +!!! error TS2428: All declarations of 'i00' must have identical type parameters. + interface i00 { } // error + ~~~ +!!! error TS2428: All declarations of 'i00' must have identical type parameters. + + interface i01 { } // ok + ~~~ +!!! error TS2428: All declarations of 'i01' must have identical type parameters. + interface i01 { } // error + ~~~ +!!! error TS2428: All declarations of 'i01' must have identical type parameters. + + interface i04 { } // error + ~ +!!! error TS2706: Required type parameters may not follow optional type parameters. + interface i05 { } // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. + interface i06 { } // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' is not assignable to type 'number'. + interface i07 { } // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! related TS2208 genericDefaultsErrors.ts:28:15: This type parameter might need an `extends number` constraint. + interface i08 { } // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'T'. +!!! error TS2344: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. + + interface i09 { } + type i09t00 = i09; // error + ~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + type i09t01 = i09<1>; // error + ~~~~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + type i09t02 = i09<1, 2>; // ok + type i09t03 = i09<1, 2, 3>; // ok + type i09t04 = i09<1, 2, 3, 4>; // error + ~~~~~~~~~~~~~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + + interface i10 { x: T; } // error + ~ +!!! error TS2304: Cannot find name 'T'. + ~ +!!! error TS4033: Property 'x' of exported interface has or is using private name 'T'. + interface i10 {} + + // https://github.com/Microsoft/TypeScript/issues/16221 + interface SelfReference {} + ~~~~~~~~~~~~~ +!!! error TS2716: Type parameter 'T' has a circular default. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/giant.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/giant.d.ts new file mode 100644 index 0000000000000..1fe858bd7fdc0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/giant.d.ts @@ -0,0 +1,2412 @@ +//// [tests/cases/compiler/giant.ts] //// + +//// [giant.ts] +/* + Prefixes + p -> public + r -> private + i -> import + e -> export + a -> ambient + t -> static + s -> set + g -> get + + MAX DEPTH 3 LEVELS +*/ +var V; +function F() { }; +class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() +} +interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; +} +module M { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + export declare module eaM { + var V; + function F() { }; + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + export class eC { } + export interface eI { } + export module eM { } + } +} +export var eV: any; +export function eF(): void { }; +export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + public get pgF(): any + public psF(param:any): void { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + static set tsF(param:any) + static tgF(): void { } + static get tgF(): any +} +export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; +} +export module eM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + public get pgF() + public psF(param:any) { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + static tF() { } + static tsF(param:any) { } + static set tsF(param:any) + static tgF() { } + static get tgF() + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + export declare class eaC { }; + export declare module eaM { }; + } + export var eV: any; + export function eF(): void { }; + export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + public get pgF(): any + public psF(param:any): void { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + static set tsF(param:any) + static tgF(): void { } + static get tgF(): any + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV: any; + export function eF(): void { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV: any; + export declare function eaF(): void { }; + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV: any; + export declare function eaF(): void { }; + export declare class eaC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + public get pgF(): any + public psF(param:any): void { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + static set tsF(param:any) + static tgF(): void { } + static get tgF(): any + } + export declare module eaM { + var V: any; + function F(): void { }; + class C { } + interface I { } + module M { } + export var eV: any; + export function eF(): void { }; + export class eC { } + export interface eI { } + export module eM { } + } +} +export declare var eaV: any; +export declare function eaF(): void { }; +export declare class eaC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + public get pgF(): any + public psF(param:any): void { } + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + static set tsF(param:any) + static tgF(): void { } + static get tgF(): any +} +export declare module eaM { + var V: any; + function F(): void { }; + class C { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + static tV: any; + static tF(): void { } + } + interface I { + //Call Signature + (); + (): number; + (p: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + } + module M { + var V: any; + function F(): void { }; + class C { } + interface I { } + module M { } + export var eV: any; + export function eF(): void { }; + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV: any + export declare function eaF(): void { }; + export declare class eaC { } + export declare module eaM { } + } + export var eV: any; + export function eF(): void { }; + export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + static tV: any + static tF(): void { } + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + [p1: string]; + [p2: string, p3: number]; + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + } + export module eM { + var V: any; + function F(): void { }; + class C { } + module M { } + export var eV: any; + export function eF(): void { }; + export class eC { } + export interface eI { } + export module eM { } + } +} + +/// [Declarations] //// + + + +//// [giant.d.ts] +export declare var eV: any; +export declare function eF(): void; +export declare class eC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF; + pgF(): void; + get pgF(): any; + psF(param: any): void; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: any; + static tF(): void; + static tsF(param: any): void; + static set tsF(param: any); + static tgF(): void; + static get tgF(): any; +} +export interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; +} +export declare namespace eM { + var eV: any; + function eF(): void; + class eC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF; + pgF(): void; + get pgF(): any; + psF(param: any): void; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: any; + static tF(): void; + static tsF(param: any): void; + static set tsF(param: any); + static tgF(): void; + static get tgF(): any; + } + interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + namespace eM { + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + namespace eM { } + var eaV: any; + function eaF(): void; + class eaC { + } + namespace eaM { } + } + var eaV: any; + function eaF(): void; + class eaC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF; + pgF(): void; + get pgF(): any; + psF(param: any): void; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: any; + static tF(): void; + static tsF(param: any): void; + static set tsF(param: any); + static tgF(): void; + static get tgF(): any; + } + namespace eaM { + var V: any; + function F(): void; + class C { + } + interface I { + } + namespace M { } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + namespace eM { } + } +} +export declare var eaV: any; +export declare function eaF(): void; +export declare class eaC { + constructor(); + pV: any; + private rV; + pF(): void; + private rF; + pgF(): void; + get pgF(): any; + psF(param: any): void; + set psF(param: any); + private rgF; + private get rgF(); + private rsF; + private set rsF(value); + static tV: any; + static tF(): void; + static tsF(param: any): void; + static set tsF(param: any); + static tgF(): void; + static get tgF(): any; +} +export declare namespace eaM { + var V: any; + function F(): void; + class C { + constructor(); + pV: any; + private rV; + pF(): void; + static tV: any; + static tF(): void; + } + interface I { + (): any; + (): number; + (p: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + namespace M { + var V: any; + function F(): void; + class C { + } + interface I { + } + namespace M { } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + namespace eM { } + var eaV: any; + function eaF(): void; + class eaC { + } + namespace eaM { } + } + var eV: any; + function eF(): void; + class eC { + constructor(); + pV: any; + private rV; + pF(): void; + static tV: any; + static tF(): void; + } + interface eI { + (): any; + (): number; + (p: any): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; + new (): any; + new (): number; + new (p: string): any; + new (p2?: string): any; + new (...p3: any[]): any; + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7?(pa1: any, pa2: any): void; + } + namespace eM { + var V: any; + function F(): void; + class C { + } + namespace M { } + var eV: any; + function eF(): void; + class eC { + } + interface eI { + } + namespace eM { } + } +} +//# sourceMappingURL=giant.d.ts.map +/// [Errors] //// + +giant.ts(22,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(23,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(23,20): error TS1005: '{' expected. +giant.ts(24,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(25,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(25,29): error TS1005: '{' expected. +giant.ts(26,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(27,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(27,21): error TS1005: '{' expected. +giant.ts(28,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(29,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(29,30): error TS1005: '{' expected. +giant.ts(32,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(33,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(33,29): error TS1005: '{' expected. +giant.ts(34,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(35,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(35,20): error TS1005: '{' expected. +giant.ts(60,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(60,6): error TS2304: Cannot find name 'p'. +giant.ts(61,5): error TS1021: An index signature must have a type annotation. +giant.ts(62,6): error TS1096: An index signature must have exactly one parameter. +giant.ts(75,5): error TS2386: Overload signatures must all be optional or required. +giant.ts(86,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(87,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(87,24): error TS1005: '{' expected. +giant.ts(88,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(89,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(89,33): error TS1005: '{' expected. +giant.ts(90,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(91,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(91,25): error TS1005: '{' expected. +giant.ts(92,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(93,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(93,34): error TS1005: '{' expected. +giant.ts(96,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(97,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(97,33): error TS1005: '{' expected. +giant.ts(98,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(99,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(99,24): error TS1005: '{' expected. +giant.ts(124,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(124,10): error TS2304: Cannot find name 'p'. +giant.ts(125,9): error TS1021: An index signature must have a type annotation. +giant.ts(126,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(139,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(153,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(165,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(166,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(166,24): error TS1005: '{' expected. +giant.ts(167,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(168,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(168,33): error TS1005: '{' expected. +giant.ts(169,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(170,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(170,25): error TS1005: '{' expected. +giant.ts(171,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(172,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(172,34): error TS1005: '{' expected. +giant.ts(175,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(176,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(176,33): error TS1005: '{' expected. +giant.ts(177,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(178,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(178,24): error TS1005: '{' expected. +giant.ts(203,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(203,10): error TS2304: Cannot find name 'p'. +giant.ts(204,9): error TS1021: An index signature must have a type annotation. +giant.ts(205,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(218,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(232,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(237,35): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(239,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(242,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(243,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(244,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(244,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(245,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(246,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(246,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(247,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(248,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(248,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(249,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(250,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(250,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(251,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(253,21): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(254,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(254,31): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(255,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(256,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(256,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(257,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(261,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(261,25): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(266,30): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(280,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(281,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(281,25): error TS1005: '{' expected. +giant.ts(282,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(283,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(283,29): error TS1005: '{' expected. +giant.ts(284,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(285,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(285,21): error TS1005: '{' expected. +giant.ts(286,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(287,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(287,30): error TS1005: '{' expected. +giant.ts(290,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(291,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(291,29): error TS1005: '{' expected. +giant.ts(292,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(293,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(293,25): error TS1005: '{' expected. +giant.ts(318,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(318,6): error TS2304: Cannot find name 'p'. +giant.ts(319,5): error TS1021: An index signature must have a type annotation. +giant.ts(320,6): error TS1096: An index signature must have exactly one parameter. +giant.ts(333,5): error TS2386: Overload signatures must all be optional or required. +giant.ts(344,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(345,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(345,24): error TS1005: '{' expected. +giant.ts(346,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(347,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(347,33): error TS1005: '{' expected. +giant.ts(348,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(349,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(349,25): error TS1005: '{' expected. +giant.ts(350,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(351,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(351,34): error TS1005: '{' expected. +giant.ts(354,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(355,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(355,33): error TS1005: '{' expected. +giant.ts(356,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(357,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(357,24): error TS1005: '{' expected. +giant.ts(382,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(382,10): error TS2304: Cannot find name 'p'. +giant.ts(383,9): error TS1021: An index signature must have a type annotation. +giant.ts(384,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(397,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(411,39): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(423,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(424,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(424,29): error TS1005: '{' expected. +giant.ts(425,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(426,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(426,33): error TS1005: '{' expected. +giant.ts(427,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(428,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(428,25): error TS1005: '{' expected. +giant.ts(429,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(430,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(430,34): error TS1005: '{' expected. +giant.ts(433,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(434,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(434,33): error TS1005: '{' expected. +giant.ts(435,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(436,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(436,29): error TS1005: '{' expected. +giant.ts(461,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(461,10): error TS2304: Cannot find name 'p'. +giant.ts(462,9): error TS1021: An index signature must have a type annotation. +giant.ts(463,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(476,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(490,45): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(495,41): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(497,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(500,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(501,22): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(502,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(502,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(503,20): error TS2300: Duplicate identifier 'pgF'. +giant.ts(504,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(504,37): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(505,20): error TS2300: Duplicate identifier 'psF'. +giant.ts(506,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(506,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(507,21): error TS2300: Duplicate identifier 'rgF'. +giant.ts(508,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(508,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(509,21): error TS2300: Duplicate identifier 'rsF'. +giant.ts(511,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(512,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(512,37): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(513,20): error TS2300: Duplicate identifier 'tsF'. +giant.ts(514,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(514,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(515,20): error TS2300: Duplicate identifier 'tgF'. +giant.ts(519,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(519,31): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(524,36): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(531,37): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(533,20): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(536,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(537,18): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(538,12): error TS2300: Duplicate identifier 'pgF'. +giant.ts(538,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(539,16): error TS2300: Duplicate identifier 'pgF'. +giant.ts(540,12): error TS2300: Duplicate identifier 'psF'. +giant.ts(540,33): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(541,16): error TS2300: Duplicate identifier 'psF'. +giant.ts(542,13): error TS2300: Duplicate identifier 'rgF'. +giant.ts(542,19): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(543,17): error TS2300: Duplicate identifier 'rgF'. +giant.ts(544,13): error TS2300: Duplicate identifier 'rsF'. +giant.ts(544,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(545,17): error TS2300: Duplicate identifier 'rsF'. +giant.ts(547,23): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(548,12): error TS2300: Duplicate identifier 'tsF'. +giant.ts(548,33): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(549,16): error TS2300: Duplicate identifier 'tsF'. +giant.ts(550,12): error TS2300: Duplicate identifier 'tgF'. +giant.ts(550,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(551,16): error TS2300: Duplicate identifier 'tgF'. +giant.ts(555,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(555,27): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(557,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(560,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(562,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(586,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(586,10): error TS2304: Cannot find name 'p'. +giant.ts(587,9): error TS1021: An index signature must have a type annotation. +giant.ts(588,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(601,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(605,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(605,31): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(610,36): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(614,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(615,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(615,45): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(616,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(617,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +giant.ts(620,32): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(622,24): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(625,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(627,27): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(652,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +giant.ts(652,10): error TS2304: Cannot find name 'p'. +giant.ts(653,9): error TS1021: An index signature must have a type annotation. +giant.ts(654,10): error TS1096: An index signature must have exactly one parameter. +giant.ts(667,9): error TS2386: Overload signatures must all be optional or required. +giant.ts(671,28): error TS1183: An implementation cannot be declared in ambient contexts. +giant.ts(671,31): error TS1036: Statements are not allowed in ambient contexts. +giant.ts(675,36): error TS1183: An implementation cannot be declared in ambient contexts. + + +==== giant.ts (247 errors) ==== + /* + Prefixes + p -> public + r -> private + i -> import + e -> export + a -> ambient + t -> static + s -> set + g -> get + + MAX DEPTH 3 LEVELS + */ + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export var eV; + export function eF() { }; + export class eC { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV; + private rV; + public pF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV; + static tF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + } + export declare module eaM { + var V; + function F() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV; + export function eF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } + export var eV: any; + export function eF(): void { }; + export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V; + function F() { }; + class C { + constructor () { } + public pV; + private rV; + public pF() { } + private rF() { } + public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF() + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV; + static tF() { } + static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF() + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + interface I { + //Call Signature + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + export function eF() { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + export declare function eaF() { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export var eV: any; + export function eF(): void { }; + export class eC { + constructor () { } + public pV: any; + private rV; + public pF(): void { } + private rF() { } + public pgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public get pgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. + public psF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. + static tV: any; + static tF(): void { } + static tsF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. + static tgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + static get tgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV: any; + export function eF(): void { }; + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV: any; + export declare function eaF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV: any; + export declare function eaF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV: any; + private rV; + public pF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public psF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV: any; + static tF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + } + export declare module eaM { + var V: any; + function F(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV: any; + export function eF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } + export declare var eaV: any; + export declare function eaF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV: any; + private rV; + public pF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private rF() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public get pgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + public psF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public set psF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + private rgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private get rgF() + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. + private rsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + private set rsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. + static tV: any; + static tF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tsF(param:any): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + static tgF(): void { } + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static get tgF(): any + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + } + export declare module eaM { + var V: any; + function F(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV: any; + private rV; + public pF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tV: any; + static tF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + interface I { + //Call Signature + (); + (): number; + (p: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + module M { + var V: any; + function F(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + interface I { } + module M { } + export var eV: any; + export function eF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV: any + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + export declare function eaF(): void { }; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export declare class eaC { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + export declare module eaM { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + } + export var eV: any; + export function eF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { + constructor () { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + public pV: any; + private rV; + public pF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static tV: any + static tF(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + export interface eI { + //Call Signature + (); + (): number; + (p: any); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + //(p8?: string, ...p9: any[]); + //(p10:string, p8?: string, ...p9: any[]); + + //Construct Signature + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + //Index Signature + [p]; + ~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'p'. + [p1: string]; + ~~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + [p2: string, p3: number]; + ~~ +!!! error TS1096: An index signature must have exactly one parameter. + + //Property Signature + p; + p1?; + p2?: string; + + //Function Signature + p3(); + p4? (); + p5? (): void; + p6(pa1: any): void; + p7(pa1: any, pa2: any): void; + p7? (pa1: any, pa2: any): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. + } + export module eM { + var V: any; + function F(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + class C { } + module M { } + export var eV: any; + export function eF(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + export class eC { } + export interface eI { } + export module eM { } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/hugeDeclarationOutputGetsTruncatedWithError.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/hugeDeclarationOutputGetsTruncatedWithError.d.ts new file mode 100644 index 0000000000000..7bdbcd99e0af1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/hugeDeclarationOutputGetsTruncatedWithError.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts] //// + +//// [hugeDeclarationOutputGetsTruncatedWithError.ts] +type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; + +type manyprops = `${props}${props}`; + +export const c = null as any as {[K in manyprops]: {[K2 in manyprops]: `${K}.${K2}`}}; + +/// [Declarations] //// + + + +//// [hugeDeclarationOutputGetsTruncatedWithError.d.ts] +type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; +type manyprops = `${props}${props}`; +export declare const c: { + [K in manyprops]: { + [K2 in manyprops]: `${K}.${K2}`; + }; +}; +export {}; +//# sourceMappingURL=hugeDeclarationOutputGetsTruncatedWithError.d.ts.map +/// [Errors] //// + +hugeDeclarationOutputGetsTruncatedWithError.ts(5,14): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. + + +==== hugeDeclarationOutputGetsTruncatedWithError.ts (1 errors) ==== + type props = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"; + + type manyprops = `${props}${props}`; + + export const c = null as any as {[K in manyprops]: {[K2 in manyprops]: `${K}.${K2}`}}; + ~ +!!! error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/importTypeGenericArrowTypeParenthesized.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/importTypeGenericArrowTypeParenthesized.d.ts new file mode 100644 index 0000000000000..fe71a5c4fd7d3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/importTypeGenericArrowTypeParenthesized.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/importTypeGenericArrowTypeParenthesized.ts] //// + +//// [module.d.ts] +declare module "module" { + export interface Modifier { } + + export function fn(x: T): Modifier; +} +//// [index.ts] +import { Modifier, fn } from "module"; + +export const fail1: Modifier<((x: T) => T)> = fn((x: T): T => x); +export const fail2: Modifier<((x: T) => T)> = fn(function(x: T): T { + return x; +}); + +export const works1: Modifier<(x: number) => number> = fn((x: number) => x); +type MakeItWork = (x: T) => T; +export const works2: Modifier = fn(x => x); + + +/// [Declarations] //// + + + +//// [index.d.ts] +import { Modifier } from "module"; +export declare const fail1: Modifier<((x: T) => T)>; +export declare const fail2: Modifier<((x: T) => T)>; +export declare const works1: Modifier<(x: number) => number>; +type MakeItWork = (x: T) => T; +export declare const works2: Modifier; +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/indexSignatures1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/indexSignatures1.d.ts.map new file mode 100644 index 0000000000000..07d8cf63547b1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/indexSignatures1.d.ts.map @@ -0,0 +1,548 @@ +//// [tests/cases/conformance/types/members/indexSignatures1.ts] //// + +//// [indexSignatures1.ts] +// Symbol index signature checking + +const sym: unique symbol = Symbol(); + +function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [sym]: number }): void { + x = z; + y = z; // Error +} + +// Overlapping index signatures + +function gg1(x: { [key: `a${string}`]: string, [key: `${string}a`]: string }, y: { [key: `a${string}a`]: string }): void { + x = y; + y = x; +} + +interface IX { [key: `a${string}`]: string, [key: `${string}a`]: string } +interface IY { [key: `a${string}a`]: string } + +function gg2(x: IX, y: IY): void { + x = y; // Error + y = x; +} + +// Intersection of multiple applicable index signatures + +declare let combo: { [x: `foo-${string}`]: 'a' | 'b' } & { [x: `${string}-bar`]: 'b' | 'c' }; +const x1: "a" | "b" = combo['foo-test']; // 'a' | 'b' +const x2: "b" | "c" = combo['test-bar']; // 'b' | 'c' +const x3: "b" = combo['foo-test-bar']; // 'b' (('a' | 'b') & ('b' | 'c')) + +declare var str: string; + +const x4: "a" | "b" = combo[`foo-${str}`]; +const x5: "b" | "c" = combo[`${str}-bar`]; +const x6: "b" = combo[`foo-${str}-bar`]; + +declare let combo2: { [x: `${string}xxx${string}` & `${string}yyy${string}`]: string }; + +const x7: string = combo2['axxxbyyyc']; +const x8: string = combo2['ayyyxxxbc']; +const x9: any = combo2['axxxbbbyc']; // Error + +// Property access on template pattern index signature + +declare let dom: { [x: `data${string}`]: string }; +const y1: string = dom['data123']; +const y2: string = dom.data123; + +// Excess property checking for template pattern index signature + +dom = { data123: 'hello' }; +dom = { date123: 'hello' }; // Error + +// Contextual typing by index signature with template literal pattern + +type Funcs = { + [key: `s${string}`]: (x: string) => void, + [key: `n${string}`]: (x: number) => void, +} + +const funcs: Funcs = { + sfoo: x => x.length, // x: string + nfoo: x => x * 2, // n: number +} + +// Duplicate index signature checking + +type Duplicates = { + [key: string | number]: any; // Error + [key: number | symbol]: any; // Error + [key: symbol | `foo${string}`]: any; // Error + [key: `foo${string}`]: any; // Error +} + +// Conflicting index signature checking + +type Conflicting = { + [key: `a${string}`]: 'a'; + [key: `${string}a`]: 'b'; + [key: `a${string}a`]: 'c'; // Error +} + +// Invalid index signatures + +type Invalid = { + [key: 'a' | 'b' | 'c']: string; // Error + [key: T | number]: string; // Error + [key: Error]: string; // Error + [key: T & string]: string; // Error +} + +// Intersections in index signatures + +type Tag1 = { __tag1__: void }; +type Tag2 = { __tag2__: void }; + +type TaggedString1 = string & Tag1; +type TaggedString2 = string & Tag2; + +declare let s0: string; +declare let s1: TaggedString1; +declare let s2: TaggedString2; +declare let s3: TaggedString1 | TaggedString2; +declare let s4: TaggedString1 & TaggedString2; + +interface I1 { [key: TaggedString1]: string } +interface I2 { [key: TaggedString2]: string } +interface I3 { [key: TaggedString1 | TaggedString2]: string } +interface I4 { [key: TaggedString1 & TaggedString2]: string } + +declare let i1: I1; +declare let i2: I2; +declare let i3: I3; +declare let i4: I4; + +i1[s0]; // Error +i1[s1]; +i1[s2]; // Error +i1[s3]; // Error +i1[s4]; + +i2[s0]; // Error +i2[s1]; // Error +i2[s2]; +i2[s3]; // Error +i2[s4]; + +i3[s0]; // Error +i3[s1]; +i3[s2]; +i3[s3]; +i3[s4]; + +i4[s0]; // Error +i4[s1]; // Error +i4[s2]; // Error +i4[s3]; // Error +i4[s4]; + +i1 = i2; // Error +i1 = i3; +i1 = i4; // Error + +i2 = i1; // Error +i2 = i3; +i2 = i4; // Error + +i3 = i1; // Error +i3 = i2; // Error +i3 = i4; // Error + +i4 = i1; +i4 = i2; +i4 = i3; + +declare let o1: { [key: TaggedString1]: string }; +declare let o2: { [key: TaggedString2]: string }; +declare let o3: { [key: TaggedString1 | TaggedString2]: string }; +declare let o4: { [key: TaggedString1 & TaggedString2]: string }; + +o1[s0]; // Error +o1[s1]; +o1[s2]; // Error +o1[s3]; // Error +o1[s4]; + +o2[s0]; // Error +o2[s1]; // Error +o2[s2]; +o2[s3]; // Error +o2[s4]; + +o3[s0]; // Error +o3[s1]; +o3[s2]; +o3[s3]; +o3[s4]; + +o4[s0]; // Error +o4[s1]; // Error +o4[s2]; // Error +o4[s3]; // Error +o4[s4]; + +o1 = o2; +o1 = o3; +o1 = o4; + +o2 = o1; +o2 = o3; +o2 = o4; + +o3 = o1; +o3 = o2; +o3 = o4; + +o4 = o1; +o4 = o2; +o4 = o3; + +// Index signatures inferred from computed property names + +const obj10: { + [x: string]: 0 | 1; + x: 0; +} = { + ['x']: 0 as const, + ['a' + 'b']: 1 as const, +}; + +const obj11: { + [x: number]: 2 | 3; + 1: 2; +} = { + [1]: 2 as const, + [1 + 2]: 3 as const, +}; + +const obj12: { + [x: symbol]: 4 | 5; + [sym]: 4; +} = { + [sym]: 4 as const, + [Symbol()]: 5 as const, +}; + +const obj13: { + [x: string]: 0 | 2 | 1 | 3; + [x: number]: 2 | 3; + [x: symbol]: 4 | 5; + x: 0; + 1: 2; + [sym]: 4; +} = { + ['x']: 0 as const, + ['a' + 'b']: 1 as const, + [1]: 2 as const, + [1 + 2]: 3 as const, + [sym]: 4 as const, + [Symbol()]: 5 as const, +}; + +// Repros from #1863 + +const system: unique symbol = Symbol('system'); +const SomeSytePlugin: unique symbol = Symbol('SomeSytePlugin'); + +interface Plugs { + [key: symbol]: (...args: any) => unknown; +} + +const plugins = { + "user": {} as Plugs, + [system]: {} as Plugs +}; + +plugins[system][SomeSytePlugin] = () => console.log('awsome'); +plugins[system][SomeSytePlugin](); + +var theAnswer: symbol = Symbol('secret'); +var obj = {} as Record; +obj[theAnswer] = 42; + +// Repro from #26470 + +const directive: unique symbol = Symbol('directive'); +declare function foo(options: { [x in string]: (arg: TArg) => TRet } & { [directive]?: TDir }): void; + +let case1: void = foo({ + [directive]: (x: string) => 'str', + addOne: (x: number) => x + 1, + double: (x: number) => x + x, +}); + +let case2: void = foo({ + addOne: (x: number) => x + 1, + double: (x: number) => x + x, + [directive]: (x: string) => 'str', +}); + +let case3: void = foo({ + [directive]: 'str', + addOne: (x: number) => x + 1, + double: (x: number) => x + x, +}); + +// Repros from #42192 + +type Pseudo = `&:${string}`; + +const AmIPseudo1: Pseudo = '&:test'; +const AmIPseudo: Pseudo = '&'; // Error + +type PseudoDeclaration = { [key in Pseudo]: string }; + +const test: PseudoDeclaration = { 'someKey' : 'someValue' }; // Error + +type FieldPattern = `/${string}`; + +const path1: FieldPattern = '/one'; +const path2: FieldPattern = 'two'; // Error + +type PathsObject = { [P in FieldPattern]: object; }; +const pathObject: PathsObject = 123; // Error + +type IdType = `${number}-${number}-${number}-${number}` +const id: IdType = '0000-0000-0000-0001'; + +type A = Record; + +const a: A = { [id]: 'test' } + +let aid: string = a[id]; + +// Repro from #44793 + +interface AA { + a?: string; + b?: number; + [key: symbol]: string; +} + +const aa: AA = { [sym]: '123' }; + +const obj1: { [key: symbol]: string } = { [sym]: 'hello '}; +const obj2: { [key: string]: string } = { [sym]: 'hello '}; // Permitted for backwards compatibility +const obj3: { [key: number]: string } = { [sym]: 'hello '}; // Error + +// Repro from #45772 + +type Id = string & { __tag: 'id '}; +type Rec1 = { [key: Id]: number }; +type Rec2 = Record; + +type K1 = keyof Rec1; // Id +type K2 = keyof Rec2; // Id + + +/// [Declarations] //// + + + +//// [indexSignatures1.d.ts] +declare const sym: unique symbol; +declare function gg3(x: { + [key: string]: string; +}, y: { + [key: symbol]: string; +}, z: { + [sym]: number; +}): void; +declare function gg1(x: { + [key: `a${string}`]: string; + [key: `${string}a`]: string; +}, y: { + [key: `a${string}a`]: string; +}): void; +interface IX { + [key: `a${string}`]: string; + [key: `${string}a`]: string; +} +interface IY { + [key: `a${string}a`]: string; +} +declare function gg2(x: IX, y: IY): void; +declare let combo: { + [x: `foo-${string}`]: 'a' | 'b'; +} & { + [x: `${string}-bar`]: 'b' | 'c'; +}; +declare const x1: "a" | "b"; +declare const x2: "b" | "c"; +declare const x3: "b"; +declare var str: string; +declare const x4: "a" | "b"; +declare const x5: "b" | "c"; +declare const x6: "b"; +declare let combo2: { + [x: `${string}xxx${string}` & `${string}yyy${string}`]: string; +}; +declare const x7: string; +declare const x8: string; +declare const x9: any; +declare let dom: { + [x: `data${string}`]: string; +}; +declare const y1: string; +declare const y2: string; +type Funcs = { + [key: `s${string}`]: (x: string) => void; + [key: `n${string}`]: (x: number) => void; +}; +declare const funcs: Funcs; +type Duplicates = { + [key: string | number]: any; + [key: number | symbol]: any; + [key: symbol | `foo${string}`]: any; + [key: `foo${string}`]: any; +}; +type Conflicting = { + [key: `a${string}`]: 'a'; + [key: `${string}a`]: 'b'; + [key: `a${string}a`]: 'c'; +}; +type Invalid = { + [key: 'a' | 'b' | 'c']: string; + [key: T | number]: string; + [key: Error]: string; + [key: T & string]: string; +}; +type Tag1 = { + __tag1__: void; +}; +type Tag2 = { + __tag2__: void; +}; +type TaggedString1 = string & Tag1; +type TaggedString2 = string & Tag2; +declare let s0: string; +declare let s1: TaggedString1; +declare let s2: TaggedString2; +declare let s3: TaggedString1 | TaggedString2; +declare let s4: TaggedString1 & TaggedString2; +interface I1 { + [key: TaggedString1]: string; +} +interface I2 { + [key: TaggedString2]: string; +} +interface I3 { + [key: TaggedString1 | TaggedString2]: string; +} +interface I4 { + [key: TaggedString1 & TaggedString2]: string; +} +declare let i1: I1; +declare let i2: I2; +declare let i3: I3; +declare let i4: I4; +declare let o1: { + [key: TaggedString1]: string; +}; +declare let o2: { + [key: TaggedString2]: string; +}; +declare let o3: { + [key: TaggedString1 | TaggedString2]: string; +}; +declare let o4: { + [key: TaggedString1 & TaggedString2]: string; +}; +declare const obj10: { + [x: string]: 0 | 1; + x: 0; +}; +declare const obj11: { + [x: number]: 2 | 3; + 1: 2; +}; +declare const obj12: { + [x: symbol]: 4 | 5; + [sym]: 4; +}; +declare const obj13: { + [x: string]: 0 | 2 | 1 | 3; + [x: number]: 2 | 3; + [x: symbol]: 4 | 5; + x: 0; + 1: 2; + [sym]: 4; +}; +declare const system: unique symbol; +declare const SomeSytePlugin: unique symbol; +interface Plugs { + [key: symbol]: (...args: any) => unknown; +} +declare const plugins: { + user: Plugs; + [system]: Plugs; +}; +declare var theAnswer: symbol; +declare var obj: Record; +declare const directive: unique symbol; +declare function foo(options: { + [x in string]: (arg: TArg) => TRet; +} & { + [directive]?: TDir; +}): void; +declare let case1: void; +declare let case2: void; +declare let case3: void; +type Pseudo = `&:${string}`; +declare const AmIPseudo1: Pseudo; +declare const AmIPseudo: Pseudo; +type PseudoDeclaration = { + [key in Pseudo]: string; +}; +declare const test: PseudoDeclaration; +type FieldPattern = `/${string}`; +declare const path1: FieldPattern; +declare const path2: FieldPattern; +type PathsObject = { + [P in FieldPattern]: object; +}; +declare const pathObject: PathsObject; +type IdType = `${number}-${number}-${number}-${number}`; +declare const id: IdType; +type A = Record; +declare const a: A; +declare let aid: string; +interface AA { + a?: string; + b?: number; + [key: symbol]: string; +} +declare const aa: AA; +declare const obj1: { + [key: symbol]: string; +}; +declare const obj2: { + [key: string]: string; +}; +declare const obj3: { + [key: number]: string; +}; +type Id = string & { + __tag: 'id '; +}; +type Rec1 = { + [key: Id]: number; +}; +type Rec2 = Record; +type K1 = keyof Rec1; +type K2 = keyof Rec2; +//# sourceMappingURL=indexSignatures1.d.ts.map + +/// [Declarations Maps] //// + + +//// [indexSignatures1.d.ts.map] +{"version":3,"file":"indexSignatures1.d.ts","sourceRoot":"","sources":["indexSignatures1.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG,EAAE,OAAO,MAAiB,CAAC;AAEpC,iBAAS,GAAG,CAAC,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAGnG;AAID,iBAAS,GAAG,CAAC,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,IAAI,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAGvH;AAED,UAAU,EAAE;IAAG,CAAC,GAAG,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE;AACzE,UAAU,EAAE;IAAG,CAAC,GAAG,EAAE,IAAI,MAAM,GAAG,GAAG,MAAM,CAAA;CAAE;AAE7C,iBAAS,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,GAAG,IAAI,CAG/B;AAID,OAAO,CAAC,IAAI,KAAK,EAAE;IAAE,CAAC,CAAC,EAAE,OAAO,MAAM,EAAE,GAAG,GAAG,GAAG,GAAG,CAAA;CAAE,GAAG;IAAE,CAAC,CAAC,EAAE,GAAG,MAAM,MAAM,GAAG,GAAG,GAAG,GAA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AnfTsKdHlwZSBSZWMxID0geyBba2V5OiBJZF06IG51bWJlciB9Owp0eXBlIFJlYzIgPSBSZWNvcmQ8SWQsIG51bWJlcj47Cgp0eXBlIEsxID0ga2V5b2YgUmVjMTsgIC8vIElkCnR5cGUgSzIgPSBrZXlvZiBSZWMyOyAgLy8gSWQK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/inferTypes1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/inferTypes1.d.ts new file mode 100644 index 0000000000000..1b6e0905b84a4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/inferTypes1.d.ts @@ -0,0 +1,645 @@ +//// [tests/cases/conformance/types/conditional/inferTypes1.ts] //// + +//// [inferTypes1.ts] +type Unpacked = + T extends (infer U)[] ? U : + T extends (...args: any[]) => infer U ? U : + T extends Promise ? U : + T; + +type T00 = Unpacked; // string +type T01 = Unpacked; // string +type T02 = Unpacked<() => string>; // string +type T03 = Unpacked>; // string +type T04 = Unpacked[]>>; // string +type T05 = Unpacked; // any +type T06 = Unpacked; // never + +function f1(s: string): { + a: number; + b: string; +} { + return { a: 1, b: s }; +} + +class C { + x = 0; + y = 0; +} + +abstract class Abstract { + x = 0; + y = 0; +} + +type T10 = ReturnType<() => string>; // string +type T11 = ReturnType<(s: string) => void>; // void +type T12 = ReturnType<(() => T)>; // {} +type T13 = ReturnType<(() => T)>; // number[] +type T14 = ReturnType; // { a: number, b: string } +type T15 = ReturnType; // any +type T16 = ReturnType; // never +type T17 = ReturnType; // Error +type T18 = ReturnType; // Error +type T19 = ReturnType<(x: string, ...args: T) => T[]>; // T[] + +type U10 = InstanceType; // C +type U11 = InstanceType; // any +type U12 = InstanceType; // never +type U13 = InstanceType; // Error +type U14 = InstanceType; // Error +type U15 = InstanceType; // Abstract +type U16 = InstanceType T[]>; // T[] +type U17 = InstanceType T[]>; // T[] + +type ArgumentType any> = T extends (a: infer A) => any ? A : any; + +type T20 = ArgumentType<() => void>; // {} +type T21 = ArgumentType<(x: string) => number>; // string +type T22 = ArgumentType<(x?: string) => number>; // string | undefined +type T23 = ArgumentType<(...args: string[]) => number>; // string +type T24 = ArgumentType<(x: string, y: string) => number>; // Error +type T25 = ArgumentType; // Error +type T26 = ArgumentType; // any +type T27 = ArgumentType; // never + +type X1 = T extends { x: infer X, y: infer Y } ? [X, Y] : any; + +type T30 = X1<{ x: any, y: any }>; // [any, any] +type T31 = X1<{ x: number, y: string }>; // [number, string] +type T32 = X1<{ x: number, y: string, z: boolean }>; // [number, string] + +type X2 = T extends { a: infer U, b: infer U } ? U : never; + +type T40 = X2<{}>; // never +type T41 = X2<{ a: string }>; // never +type T42 = X2<{ a: string, b: string }>; // string +type T43 = X2<{ a: number, b: string }>; // string | number +type T44 = X2<{ a: number, b: string, c: boolean }>; // string | number + +type X3 = T extends { a: (x: infer U) => void, b: (x: infer U) => void } ? U : never; + +type T50 = X3<{}>; // never +type T51 = X3<{ a: (x: string) => void }>; // never +type T52 = X3<{ a: (x: string) => void, b: (x: string) => void }>; // string +type T53 = X3<{ a: (x: number) => void, b: (x: string) => void }>; // never +type T54 = X3<{ a: (x: number) => void, b: () => void }>; // number + +type T60 = infer U; // Error +type T61 = (infer A) extends infer B ? infer C : infer D; // Error +type T62 = U extends (infer U)[] ? U : U; // Error +type T63 = T extends ((infer A) extends infer B ? infer C : infer D) ? string : number; + +type T70 = { x: T }; +type T71 = T extends T70 ? T70 : never; + +type T72 = { y: T }; +type T73 = T extends T72 ? T70 : never; // Error + +type T74 = { x: T, y: U }; +type T75 = T extends T74 ? T70 | T72 | T74 : never; + +type T76 = { x: T }; +type T77 = T extends T76 ? T76 : never; +type T78 = T extends T76 ? T76 : never; + +type Foo = [T, U]; +type Bar = T extends Foo ? Foo : never; + +type T90 = Bar<[string, string]>; // [string, string] +type T91 = Bar<[string, "a"]>; // [string, "a"] +type T92 = Bar<[string, "a"] & { x: string }>; // [string, "a"] +type T93 = Bar<["a", string]>; // never +type T94 = Bar<[number, number]>; // never + +// Example from #21496 + +type JsonifiedObject = { [K in keyof T]: Jsonified }; + +type Jsonified = + T extends string | number | boolean | null ? T + : T extends undefined | Function ? never // undefined and functions are removed + : T extends { toJSON(): infer R } ? R // toJSON is called if it exists (e.g. Date) + : T extends object ? JsonifiedObject + : "what is this"; + +type Example = { + str: "literalstring", + fn: () => void, + date: Date, + customClass: MyClass, + obj: { + prop: "property", + clz: MyClass, + nested: { attr: Date } + }, +} + +declare class MyClass { + toJSON(): "correct"; +} + +type JsonifiedExample = Jsonified; +declare let ex: JsonifiedExample; +const z1: "correct" = ex.customClass; +const z2: string = ex.obj.nested.attr; + +// Repros from #21631 + +type A1> = [T, U]; +type B1 = S extends A1 ? [T, U] : never; + +type A2 = [T, U]; +type B2 = S extends A2 ? [T, U] : never; +type C2 = S extends A2 ? [T, U] : never; + +// Repro from #21735 + +type A = T extends string ? { [P in T]: void; } : T; +type B = string extends T ? { [P in T]: void; } : T; // Error + +// Repro from #22302 + +type MatchingKeys = + K extends keyof T ? T[K] extends U ? K : never : never; + +type VoidKeys = MatchingKeys; + +interface test { + a: 1, + b: void +} + +type T80 = MatchingKeys; +type T81 = VoidKeys; + +// Repro from #22221 + +type MustBeString = T; +type EnsureIsString = T extends MustBeString ? U : never; + +type Test1 = EnsureIsString<"hello">; // "hello" +type Test2 = EnsureIsString<42>; // never + +// Repros from #26856 + +function invoker (key: K, ...args: A): any>>(obj: T) => ReturnType { + return any>> (obj: T): ReturnType => obj[key](...args) +} + +const result: number = invoker('test', true)({ test: (a: boolean) => 123 }) + +type Foo2 = ReturnType<(...args: A) => string>; + + +/// [Declarations] //// + + + +//// [inferTypes1.d.ts] +type Unpacked = T extends (infer U)[] ? U : T extends (...args: any[]) => infer U ? U : T extends Promise ? U : T; +type T00 = Unpacked; +type T01 = Unpacked; +type T02 = Unpacked<() => string>; +type T03 = Unpacked>; +type T04 = Unpacked[]>>; +type T05 = Unpacked; +type T06 = Unpacked; +declare function f1(s: string): { + a: number; + b: string; +}; +declare class C { + x: number; + y: number; +} +declare abstract class Abstract { + x: number; + y: number; +} +type T10 = ReturnType<() => string>; +type T11 = ReturnType<(s: string) => void>; +type T12 = ReturnType<(() => T)>; +type T13 = ReturnType<(() => T)>; +type T14 = ReturnType; +type T15 = ReturnType; +type T16 = ReturnType; +type T17 = ReturnType; +type T18 = ReturnType; +type T19 = ReturnType<(x: string, ...args: T) => T[]>; +type U10 = InstanceType; +type U11 = InstanceType; +type U12 = InstanceType; +type U13 = InstanceType; +type U14 = InstanceType; +type U15 = InstanceType; +type U16 = InstanceType T[]>; +type U17 = InstanceType T[]>; +type ArgumentType any> = T extends (a: infer A) => any ? A : any; +type T20 = ArgumentType<() => void>; +type T21 = ArgumentType<(x: string) => number>; +type T22 = ArgumentType<(x?: string) => number>; +type T23 = ArgumentType<(...args: string[]) => number>; +type T24 = ArgumentType<(x: string, y: string) => number>; +type T25 = ArgumentType; +type T26 = ArgumentType; +type T27 = ArgumentType; +type X1 = T extends { + x: infer X; + y: infer Y; +} ? [X, Y] : any; +type T30 = X1<{ + x: any; + y: any; +}>; +type T31 = X1<{ + x: number; + y: string; +}>; +type T32 = X1<{ + x: number; + y: string; + z: boolean; +}>; +type X2 = T extends { + a: infer U; + b: infer U; +} ? U : never; +type T40 = X2<{}>; +type T41 = X2<{ + a: string; +}>; +type T42 = X2<{ + a: string; + b: string; +}>; +type T43 = X2<{ + a: number; + b: string; +}>; +type T44 = X2<{ + a: number; + b: string; + c: boolean; +}>; +type X3 = T extends { + a: (x: infer U) => void; + b: (x: infer U) => void; +} ? U : never; +type T50 = X3<{}>; +type T51 = X3<{ + a: (x: string) => void; +}>; +type T52 = X3<{ + a: (x: string) => void; + b: (x: string) => void; +}>; +type T53 = X3<{ + a: (x: number) => void; + b: (x: string) => void; +}>; +type T54 = X3<{ + a: (x: number) => void; + b: () => void; +}>; +type T60 = infer U; +type T61 = (infer A) extends infer B ? infer C : infer D; +type T62 = U extends (infer U)[] ? U : U; +type T63 = T extends ((infer A) extends infer B ? infer C : infer D) ? string : number; +type T70 = { + x: T; +}; +type T71 = T extends T70 ? T70 : never; +type T72 = { + y: T; +}; +type T73 = T extends T72 ? T70 : never; +type T74 = { + x: T; + y: U; +}; +type T75 = T extends T74 ? T70 | T72 | T74 : never; +type T76 = { + x: T; +}; +type T77 = T extends T76 ? T76 : never; +type T78 = T extends T76 ? T76 : never; +type Foo = [T, U]; +type Bar = T extends Foo ? Foo : never; +type T90 = Bar<[string, string]>; +type T91 = Bar<[string, "a"]>; +type T92 = Bar<[string, "a"] & { + x: string; +}>; +type T93 = Bar<["a", string]>; +type T94 = Bar<[number, number]>; +type JsonifiedObject = { + [K in keyof T]: Jsonified; +}; +type Jsonified = T extends string | number | boolean | null ? T : T extends undefined | Function ? never : T extends { + toJSON(): infer R; +} ? R : T extends object ? JsonifiedObject : "what is this"; +type Example = { + str: "literalstring"; + fn: () => void; + date: Date; + customClass: MyClass; + obj: { + prop: "property"; + clz: MyClass; + nested: { + attr: Date; + }; + }; +}; +declare class MyClass { + toJSON(): "correct"; +} +type JsonifiedExample = Jsonified; +declare let ex: JsonifiedExample; +declare const z1: "correct"; +declare const z2: string; +type A1> = [T, U]; +type B1 = S extends A1 ? [T, U] : never; +type A2 = [T, U]; +type B2 = S extends A2 ? [T, U] : never; +type C2 = S extends A2 ? [T, U] : never; +type A = T extends string ? { + [P in T]: void; +} : T; +type B = string extends T ? { + [P in T]: void; +} : T; +type MatchingKeys = K extends keyof T ? T[K] extends U ? K : never : never; +type VoidKeys = MatchingKeys; +interface test { + a: 1; + b: void; +} +type T80 = MatchingKeys; +type T81 = VoidKeys; +type MustBeString = T; +type EnsureIsString = T extends MustBeString ? U : never; +type Test1 = EnsureIsString<"hello">; +type Test2 = EnsureIsString<42>; +declare function invoker(key: K, ...args: A): any>>(obj: T) => ReturnType; +declare const result: number; +type Foo2 = ReturnType<(...args: A) => string>; +//# sourceMappingURL=inferTypes1.d.ts.map +/// [Errors] //// + +inferTypes1.ts(39,23): error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'. +inferTypes1.ts(40,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. + Type 'Function' provides no match for the signature '(...args: any): any'. +inferTypes1.ts(46,25): error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'. +inferTypes1.ts(47,25): error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'. + Type 'Function' provides no match for the signature 'new (...args: any): any'. +inferTypes1.ts(58,25): error TS2344: Type '(x: string, y: string) => number' does not satisfy the constraint '(x: any) => any'. + Target signature provides too few arguments. Expected 2 or more, but got 1. +inferTypes1.ts(59,25): error TS2344: Type 'Function' does not satisfy the constraint '(x: any) => any'. + Type 'Function' provides no match for the signature '(x: any): any'. +inferTypes1.ts(85,12): error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. +inferTypes1.ts(86,16): error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. +inferTypes1.ts(86,43): error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. +inferTypes1.ts(86,53): error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. +inferTypes1.ts(87,15): error TS2304: Cannot find name 'U'. +inferTypes1.ts(87,15): error TS4081: Exported type alias 'T62' has or is using private name 'U'. +inferTypes1.ts(87,43): error TS2304: Cannot find name 'U'. +inferTypes1.ts(87,43): error TS4081: Exported type alias 'T62' has or is using private name 'U'. +inferTypes1.ts(94,44): error TS2344: Type 'U' does not satisfy the constraint 'string'. + Type 'number' is not assignable to type 'string'. +inferTypes1.ts(156,40): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'. + + +==== inferTypes1.ts (16 errors) ==== + type Unpacked = + T extends (infer U)[] ? U : + T extends (...args: any[]) => infer U ? U : + T extends Promise ? U : + T; + + type T00 = Unpacked; // string + type T01 = Unpacked; // string + type T02 = Unpacked<() => string>; // string + type T03 = Unpacked>; // string + type T04 = Unpacked[]>>; // string + type T05 = Unpacked; // any + type T06 = Unpacked; // never + + function f1(s: string): { + a: number; + b: string; + } { + return { a: 1, b: s }; + } + + class C { + x = 0; + y = 0; + } + + abstract class Abstract { + x = 0; + y = 0; + } + + type T10 = ReturnType<() => string>; // string + type T11 = ReturnType<(s: string) => void>; // void + type T12 = ReturnType<(() => T)>; // {} + type T13 = ReturnType<(() => T)>; // number[] + type T14 = ReturnType; // { a: number, b: string } + type T15 = ReturnType; // any + type T16 = ReturnType; // never + type T17 = ReturnType; // Error + ~~~~~~ +!!! error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'. + type T18 = ReturnType; // Error + ~~~~~~~~ +!!! error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. +!!! error TS2344: Type 'Function' provides no match for the signature '(...args: any): any'. + type T19 = ReturnType<(x: string, ...args: T) => T[]>; // T[] + + type U10 = InstanceType; // C + type U11 = InstanceType; // any + type U12 = InstanceType; // never + type U13 = InstanceType; // Error + ~~~~~~ +!!! error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'. + type U14 = InstanceType; // Error + ~~~~~~~~ +!!! error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'. +!!! error TS2344: Type 'Function' provides no match for the signature 'new (...args: any): any'. + type U15 = InstanceType; // Abstract + type U16 = InstanceType T[]>; // T[] + type U17 = InstanceType T[]>; // T[] + + type ArgumentType any> = T extends (a: infer A) => any ? A : any; + + type T20 = ArgumentType<() => void>; // {} + type T21 = ArgumentType<(x: string) => number>; // string + type T22 = ArgumentType<(x?: string) => number>; // string | undefined + type T23 = ArgumentType<(...args: string[]) => number>; // string + type T24 = ArgumentType<(x: string, y: string) => number>; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2344: Type '(x: string, y: string) => number' does not satisfy the constraint '(x: any) => any'. +!!! error TS2344: Target signature provides too few arguments. Expected 2 or more, but got 1. + type T25 = ArgumentType; // Error + ~~~~~~~~ +!!! error TS2344: Type 'Function' does not satisfy the constraint '(x: any) => any'. +!!! error TS2344: Type 'Function' provides no match for the signature '(x: any): any'. + type T26 = ArgumentType; // any + type T27 = ArgumentType; // never + + type X1 = T extends { x: infer X, y: infer Y } ? [X, Y] : any; + + type T30 = X1<{ x: any, y: any }>; // [any, any] + type T31 = X1<{ x: number, y: string }>; // [number, string] + type T32 = X1<{ x: number, y: string, z: boolean }>; // [number, string] + + type X2 = T extends { a: infer U, b: infer U } ? U : never; + + type T40 = X2<{}>; // never + type T41 = X2<{ a: string }>; // never + type T42 = X2<{ a: string, b: string }>; // string + type T43 = X2<{ a: number, b: string }>; // string | number + type T44 = X2<{ a: number, b: string, c: boolean }>; // string | number + + type X3 = T extends { a: (x: infer U) => void, b: (x: infer U) => void } ? U : never; + + type T50 = X3<{}>; // never + type T51 = X3<{ a: (x: string) => void }>; // never + type T52 = X3<{ a: (x: string) => void, b: (x: string) => void }>; // string + type T53 = X3<{ a: (x: number) => void, b: (x: string) => void }>; // never + type T54 = X3<{ a: (x: number) => void, b: () => void }>; // number + + type T60 = infer U; // Error + ~~~~~~~ +!!! error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. + type T61 = (infer A) extends infer B ? infer C : infer D; // Error + ~~~~~~~ +!!! error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. + ~~~~~~~ +!!! error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. + ~~~~~~~ +!!! error TS1338: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. + type T62 = U extends (infer U)[] ? U : U; // Error + ~ +!!! error TS2304: Cannot find name 'U'. + ~ +!!! error TS4081: Exported type alias 'T62' has or is using private name 'U'. + ~ +!!! error TS2304: Cannot find name 'U'. + ~ +!!! error TS4081: Exported type alias 'T62' has or is using private name 'U'. + type T63 = T extends ((infer A) extends infer B ? infer C : infer D) ? string : number; + + type T70 = { x: T }; + type T71 = T extends T70 ? T70 : never; + + type T72 = { y: T }; + type T73 = T extends T72 ? T70 : never; // Error + ~ +!!! error TS2344: Type 'U' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' is not assignable to type 'string'. + + type T74 = { x: T, y: U }; + type T75 = T extends T74 ? T70 | T72 | T74 : never; + + type T76 = { x: T }; + type T77 = T extends T76 ? T76 : never; + type T78 = T extends T76 ? T76 : never; + + type Foo = [T, U]; + type Bar = T extends Foo ? Foo : never; + + type T90 = Bar<[string, string]>; // [string, string] + type T91 = Bar<[string, "a"]>; // [string, "a"] + type T92 = Bar<[string, "a"] & { x: string }>; // [string, "a"] + type T93 = Bar<["a", string]>; // never + type T94 = Bar<[number, number]>; // never + + // Example from #21496 + + type JsonifiedObject = { [K in keyof T]: Jsonified }; + + type Jsonified = + T extends string | number | boolean | null ? T + : T extends undefined | Function ? never // undefined and functions are removed + : T extends { toJSON(): infer R } ? R // toJSON is called if it exists (e.g. Date) + : T extends object ? JsonifiedObject + : "what is this"; + + type Example = { + str: "literalstring", + fn: () => void, + date: Date, + customClass: MyClass, + obj: { + prop: "property", + clz: MyClass, + nested: { attr: Date } + }, + } + + declare class MyClass { + toJSON(): "correct"; + } + + type JsonifiedExample = Jsonified; + declare let ex: JsonifiedExample; + const z1: "correct" = ex.customClass; + const z2: string = ex.obj.nested.attr; + + // Repros from #21631 + + type A1> = [T, U]; + type B1 = S extends A1 ? [T, U] : never; + + type A2 = [T, U]; + type B2 = S extends A2 ? [T, U] : never; + type C2 = S extends A2 ? [T, U] : never; + + // Repro from #21735 + + type A = T extends string ? { [P in T]: void; } : T; + type B = string extends T ? { [P in T]: void; } : T; // Error + ~ +!!! error TS2322: Type 'T' is not assignable to type 'string | number | symbol'. +!!! related TS2208 inferTypes1.ts:156:8: This type parameter might need an `extends string | number | symbol` constraint. + + // Repro from #22302 + + type MatchingKeys = + K extends keyof T ? T[K] extends U ? K : never : never; + + type VoidKeys = MatchingKeys; + + interface test { + a: 1, + b: void + } + + type T80 = MatchingKeys; + type T81 = VoidKeys; + + // Repro from #22221 + + type MustBeString = T; + type EnsureIsString = T extends MustBeString ? U : never; + + type Test1 = EnsureIsString<"hello">; // "hello" + type Test2 = EnsureIsString<42>; // never + + // Repros from #26856 + + function invoker (key: K, ...args: A): any>>(obj: T) => ReturnType { + return any>> (obj: T): ReturnType => obj[key](...args) + } + + const result: number = invoker('test', true)({ test: (a: boolean) => 123 }) + + type Foo2 = ReturnType<(...args: A) => string>; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/inferTypesInvalidExtendsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/inferTypesInvalidExtendsDeclaration.d.ts new file mode 100644 index 0000000000000..62ca67127aaf8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/inferTypesInvalidExtendsDeclaration.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/types/conditional/inferTypesInvalidExtendsDeclaration.ts] //// + +//// [inferTypesInvalidExtendsDeclaration.ts] +type Test = T extends infer A extends B ? number : string; + + +/// [Declarations] //// + + + +//// [inferTypesInvalidExtendsDeclaration.d.ts] +type Test = T extends infer A extends B ? number : string; +//# sourceMappingURL=inferTypesInvalidExtendsDeclaration.d.ts.map +/// [Errors] //// + +inferTypesInvalidExtendsDeclaration.ts(1,42): error TS2304: Cannot find name 'B'. +inferTypesInvalidExtendsDeclaration.ts(1,42): error TS4085: Extends clause for inferred type 'A' has or is using private name 'B'. + + +==== inferTypesInvalidExtendsDeclaration.ts (2 errors) ==== + type Test = T extends infer A extends B ? number : string; + ~ +!!! error TS2304: Cannot find name 'B'. + ~ +!!! error TS4085: Extends clause for inferred type 'A' has or is using private name 'B'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/intraExpressionInferences.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/intraExpressionInferences.d.ts.map new file mode 100644 index 0000000000000..4636785801d25 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/intraExpressionInferences.d.ts.map @@ -0,0 +1,509 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts] //// + +//// [intraExpressionInferences.ts] +// Repros from #47599 + +declare function callIt(obj: { + produce: (n: number) => T, + consume: (x: T) => void +}): void; + +callIt({ + produce: () => 0, + consume: n => n.toFixed() +}); + +callIt({ + produce: _a => 0, + consume: n => n.toFixed(), +}); + +callIt({ + produce() { + return 0; + }, + consume: n => n.toFixed() +}); + +declare function callItT(obj: [(n: number) => T, (x: T) => void]): void; + +callItT([() => 0, n => n.toFixed()]); +callItT([_a => 0, n => n.toFixed()]); + +// Repro from #25092 + +interface MyInterface { + retrieveGeneric: (parameter: string) => T, + operateWithGeneric: (generic: T) => string +} + +const inferTypeFn = (generic: MyInterface): MyInterface => generic; + +const myGeneric: MyInterface = inferTypeFn({ + retrieveGeneric: parameter => 5, + operateWithGeneric: generic => generic.toFixed() +}); + +// Repro #38623 + +function make(o: { mutations: M, action: (m: M) => void }): void { } + +make({ + mutations: { + foo() { } + }, + action: (a) => { a.foo() } +}); + +// Repro from #38845 + +declare function foo(options: { a: A, b: (a: A) => void }): void; + +foo({ + a: () => { return 42 }, + b(a) {}, +}); + +foo({ + a: function () { return 42 }, + b(a) {}, +}); + +foo({ + a() { return 42 }, + b(a) {}, +}); + +// Repro from #38872 + +type Chain = { + a(): R1, + b(a: R1): R2; + c(b: R2): void; +}; + +function test(foo: Chain): void {} + +test({ + a: () => 0, + b: (a) => 'a', + c: (b) => { + const x: string = b; + } +}); + +test({ + a: () => 0, + b: (a) => a, + c: (b) => { + const x: number = b; + } +}); + +// Repro from #41712 + +class Wrapper { + public value?: T; +} + +type WrappedMap = Record; +type Unwrap = { + [K in keyof D]: D[K] extends Wrapper ? T : never; +}; + +type MappingComponent = { + setup(): { inputs: I; outputs: O }; + map?: (inputs: Unwrap) => Unwrap; +}; + +declare function createMappingComponent(def: MappingComponent): void; + +createMappingComponent({ + setup() { + return { + inputs: { + num: new Wrapper(), + str: new Wrapper() + }, + outputs: { + bool: new Wrapper(), + str: new Wrapper() + } + }; + }, + map(inputs) { + return { + bool: inputs.nonexistent, + str: inputs.num, // Causes error + } + } +}); + +// Repro from #48279 + +function simplified(props: { generator: () => T, receiver: (t: T) => any }): void {} + +function whatIWant(props: { generator: (bob: any) => T, receiver: (t: T) => any }): void {} + +function nonObject(generator: (bob: any) => T, receiver: (t: T) => any): void {} + +simplified({ generator: () => 123, receiver: (t) => console.log(t + 2) }) +whatIWant({ generator: (bob) => bob ? 1 : 2, receiver: (t) => console.log(t + 2) }) +nonObject((bob) => bob ? 1 : 2, (t) => console.log(t + 2)) + +// Repro from #48466 + +interface Opts { + fetch: (params: TParams, foo: number) => TDone, + map: (data: TDone) => TMapped +} + +function example(options: Opts): (params: TParams) => TMapped { + return (params: TParams) => { + const data = options.fetch(params, 123) + return options.map(data) + } +} + +interface Params { + one: number + two: string +} + +example({ + fetch: (params: Params) => 123, + map: (number) => String(number) +}); + +example({ + fetch: (params: Params, foo: number) => 123, + map: (number) => String(number) +}); + +example({ + fetch: (params: Params, foo) => 123, + map: (number) => String(number) +}); + +// Repro from #45255 + +declare const branch: + (_: { test: T, if: (t: T) => t is U, then: (u: U) => void }) => void + +declare const x: "a" | "b" + +branch({ + test: x, + if: (t): t is "a" => t === "a", + then: u => { + let test1: "a" = u + } +}) + +interface Props { + a: (x: string) => T; + b: (arg: T) => void; +} + +declare function Foo(props: Props): null; + +Foo({ + ...{ + a: (x) => 10, + b: (arg) => { + arg.toString(); + }, + }, +}); + +declare function nested(arg: { + prop: { + produce: (arg1: number) => T; + consume: (arg2: T) => void; + }; +}): T; + +const resNested: number[] = nested({ + prop: { + produce: (a) => [a], + consume: (arg) => arg.join(","), + }, +}); + +declare function twoConsumers(arg: { + a: (arg: string) => T; + consume1: (arg1: T) => void; + consume2: (arg2: T) => void; +}): T; + +const resTwoConsumers: string[] = twoConsumers({ + a: (arg) => [arg], + consume1: (arg1) => {}, + consume2: (arg2) => {}, +}); + +declare function multipleProducersBeforeConsumers(arg: { + a: (arg: string) => T; + b: (arg: string) => T2; + consume1: (arg1: T) => void; + consume2: (arg2: T2) => void; +}): [T, T2]; + +const resMultipleProducersBeforeConsumers: [ + string[], + number +] = multipleProducersBeforeConsumers({ + a: (arg) => [arg], + b: (arg) => Number(arg), + consume1: (arg1) => {}, + consume2: (arg2) => {}, +}); + +declare function withConditionalExpression(arg: { + a: (arg1: string) => T; + b: (arg2: T) => T2; + c: (arg2: T2) => T3; +}): [T, T2, T3]; + +const resWithConditionalExpression: [ + string[], + "first" | "two", + boolean +] = withConditionalExpression({ + a: (arg) => [arg], + b: Math.random() ? (arg) => "first" as const : (arg) => "two" as const, + c: (arg) => Boolean(arg), +}); + +declare function onion(arg: { + a: (arg1: string) => T; + nested: { + b: (arg2: T) => T2; + nested2: { + c: (arg2: T2) => T3; + }; + }; +}): [T, T2, T3]; + +const resOnion: [ + string[], + string, + boolean +] = onion({ + a: (arg) => [arg], + nested: { + b: (arg) => arg.join(","), + nested2: { + c: (arg) => Boolean(arg), + }, + }, +}); + +declare function onion2(arg: { + a: (arg1: string) => T; + nested: { + b: (arg2: T) => T2; + c: (arg3: T) => T3; + nested2: { + d: (arg4: T3) => T4; + }; + }; +}): [T, T2, T3, T4]; + +const resOnion2: [ + string[], + string, + number, + boolean +] = onion2({ + a: (arg) => [arg], + nested: { + b: (arg) => arg.join(","), + c: (arg) => Number(arg), + nested2: { + d: (arg) => Boolean(arg), + }, + }, +}); + +declare function distant(args: { + foo: { + bar: { + baz: { + producer: (arg: string) => T; + }; + }; + }; + consumer: (val: T) => unknown; +}): T; + +const distantRes: number = distant({ + foo: { + bar: { + baz: { + producer: (arg) => 1, + }, + }, + }, + consumer: (val) => {}, +}); + + +/// [Declarations] //// + + + +//// [intraExpressionInferences.d.ts] +declare function callIt(obj: { + produce: (n: number) => T; + consume: (x: T) => void; +}): void; +declare function callItT(obj: [(n: number) => T, (x: T) => void]): void; +interface MyInterface { + retrieveGeneric: (parameter: string) => T; + operateWithGeneric: (generic: T) => string; +} +declare const inferTypeFn: (generic: MyInterface) => MyInterface; +declare const myGeneric: MyInterface; +declare function make(o: { + mutations: M; + action: (m: M) => void; +}): void; +declare function foo(options: { + a: A; + b: (a: A) => void; +}): void; +type Chain = { + a(): R1; + b(a: R1): R2; + c(b: R2): void; +}; +declare function test(foo: Chain): void; +declare class Wrapper { + value?: T; +} +type WrappedMap = Record; +type Unwrap = { + [K in keyof D]: D[K] extends Wrapper ? T : never; +}; +type MappingComponent = { + setup(): { + inputs: I; + outputs: O; + }; + map?: (inputs: Unwrap) => Unwrap; +}; +declare function createMappingComponent(def: MappingComponent): void; +declare function simplified(props: { + generator: () => T; + receiver: (t: T) => any; +}): void; +declare function whatIWant(props: { + generator: (bob: any) => T; + receiver: (t: T) => any; +}): void; +declare function nonObject(generator: (bob: any) => T, receiver: (t: T) => any): void; +interface Opts { + fetch: (params: TParams, foo: number) => TDone; + map: (data: TDone) => TMapped; +} +declare function example(options: Opts): (params: TParams) => TMapped; +interface Params { + one: number; + two: string; +} +declare const branch: (_: { + test: T; + if: (t: T) => t is U; + then: (u: U) => void; +}) => void; +declare const x: "a" | "b"; +interface Props { + a: (x: string) => T; + b: (arg: T) => void; +} +declare function Foo(props: Props): null; +declare function nested(arg: { + prop: { + produce: (arg1: number) => T; + consume: (arg2: T) => void; + }; +}): T; +declare const resNested: number[]; +declare function twoConsumers(arg: { + a: (arg: string) => T; + consume1: (arg1: T) => void; + consume2: (arg2: T) => void; +}): T; +declare const resTwoConsumers: string[]; +declare function multipleProducersBeforeConsumers(arg: { + a: (arg: string) => T; + b: (arg: string) => T2; + consume1: (arg1: T) => void; + consume2: (arg2: T2) => void; +}): [T, T2]; +declare const resMultipleProducersBeforeConsumers: [ + string[], + number +]; +declare function withConditionalExpression(arg: { + a: (arg1: string) => T; + b: (arg2: T) => T2; + c: (arg2: T2) => T3; +}): [T, T2, T3]; +declare const resWithConditionalExpression: [ + string[], + "first" | "two", + boolean +]; +declare function onion(arg: { + a: (arg1: string) => T; + nested: { + b: (arg2: T) => T2; + nested2: { + c: (arg2: T2) => T3; + }; + }; +}): [T, T2, T3]; +declare const resOnion: [ + string[], + string, + boolean +]; +declare function onion2(arg: { + a: (arg1: string) => T; + nested: { + b: (arg2: T) => T2; + c: (arg3: T) => T3; + nested2: { + d: (arg4: T3) => T4; + }; + }; +}): [T, T2, T3, T4]; +declare const resOnion2: [ + string[], + string, + number, + boolean +]; +declare function distant(args: { + foo: { + bar: { + baz: { + producer: (arg: string) => T; + }; + }; + }; + consumer: (val: T) => unknown; +}): T; +declare const distantRes: number; +//# sourceMappingURL=intraExpressionInferences.d.ts.map + +/// [Declarations Maps] //// + + +//// [intraExpressionInferences.d.ts.map] +{"version":3,"file":"intraExpressionInferences.d.ts","sourceRoot":"","sources":["intraExpressionInferences.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE;IAC5B,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;IAC1B,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;CAC1B,GAAG,IAAI,CAAC;AAmBT,OAAO,UAAU,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;AAO3E,UAAU,WAAW,CAAC,CAAC;IACnB,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,CAAC,CAAC;IAC1C,kBAAkB,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,MAAM,CAAA;CAC7C;AAED,QAAA,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,KAAG,WAAW,CAAC,CAAC,CAAY,CAAC;AAE5E,QAAA,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAGjC,CAAC;AAIH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gfSwKfSk7CgpkZWNsYXJlIGZ1bmN0aW9uIG9uaW9uMjxULCBUMiwgVDMsIFQ0Pihhcmc6IHsKICBhOiAoYXJnMTogc3RyaW5nKSA9PiBUOwogIG5lc3RlZDogewogICAgYjogKGFyZzI6IFQpID0+IFQyOwogICAgYzogKGFyZzM6IFQpID0+IFQzOwogICAgbmVzdGVkMjogewogICAgICBkOiAoYXJnNDogVDMpID0+IFQ0OwogICAgfTsKICB9Owp9KTogW1QsIFQyLCBUMywgVDRdOwoKY29uc3QgcmVzT25pb24yOiBbCiAgICBzdHJpbmdbXSwKICAgIHN0cmluZywKICAgIG51bWJlciwKICAgIGJvb2xlYW4KXSA9IG9uaW9uMih7CiAgYTogKGFyZykgPT4gW2FyZ10sCiAgbmVzdGVkOiB7CiAgICBiOiAoYXJnKSA9PiBhcmcuam9pbigiLCIpLAogICAgYzogKGFyZykgPT4gTnVtYmVyKGFyZyksCiAgICBuZXN0ZWQyOiB7CiAgICAgIGQ6IChhcmcpID0+IEJvb2xlYW4oYXJnKSwKICAgIH0sCiAgfSwKfSk7CgpkZWNsYXJlIGZ1bmN0aW9uIGRpc3RhbnQ8VD4oYXJnczogewogIGZvbzogewogICAgYmFyOiB7CiAgICAgIGJhejogewogICAgICAgIHByb2R1Y2VyOiAoYXJnOiBzdHJpbmcpID0+IFQ7CiAgICAgIH07CiAgICB9OwogIH07CiAgY29uc3VtZXI6ICh2YWw6IFQpID0+IHVua25vd247Cn0pOiBUOwoKY29uc3QgZGlzdGFudFJlczogbnVtYmVyID0gZGlzdGFudCh7CiAgZm9vOiB7CiAgICBiYXI6IHsKICAgICAgYmF6OiB7CiAgICAgICAgcHJvZHVjZXI6IChhcmcpID0+IDEsCiAgICAgIH0sCiAgICB9LAogIH0sCiAgY29uc3VtZXI6ICh2YWwpID0+IHt9LAp9KTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/intrinsics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/intrinsics.d.ts new file mode 100644 index 0000000000000..356b2c3a76e16 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/intrinsics.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/intrinsics.ts] //// + +//// [intrinsics.ts] +var hasOwnProperty: hasOwnProperty; // Error + +module m1 { + export var __proto__: any; + interface __proto__ {} + + class C { } +} + +__proto__ = 0; // Error, __proto__ not defined +m1.__proto__ = 0; + +class Foo<__proto__> { } +var foo: (__proto__: number) => void; + +/// [Declarations] //// + + + +//// [intrinsics.d.ts] +declare var hasOwnProperty: hasOwnProperty; +declare namespace m1 { + var __proto__: any; +} +declare class Foo<__proto__> { +} +declare var foo: (__proto__: number) => void; +//# sourceMappingURL=intrinsics.d.ts.map +/// [Errors] //// + +intrinsics.ts(1,21): error TS2749: 'hasOwnProperty' refers to a value, but is being used as a type here. Did you mean 'typeof hasOwnProperty'? +intrinsics.ts(1,21): error TS4025: Exported variable 'hasOwnProperty' has or is using private name 'hasOwnProperty'. +intrinsics.ts(10,1): error TS2304: Cannot find name '__proto__'. + + +==== intrinsics.ts (3 errors) ==== + var hasOwnProperty: hasOwnProperty; // Error + ~~~~~~~~~~~~~~ +!!! error TS2749: 'hasOwnProperty' refers to a value, but is being used as a type here. Did you mean 'typeof hasOwnProperty'? + ~~~~~~~~~~~~~~ +!!! error TS4025: Exported variable 'hasOwnProperty' has or is using private name 'hasOwnProperty'. + + module m1 { + export var __proto__: any; + interface __proto__ {} + + class C { } + } + + __proto__ = 0; // Error, __proto__ not defined + ~~~~~~~~~ +!!! error TS2304: Cannot find name '__proto__'. + m1.__proto__ = 0; + + class Foo<__proto__> { } + var foo: (__proto__: number) => void; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationBinderSignatures.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationBinderSignatures.d.ts.map new file mode 100644 index 0000000000000..53b35dbdcd1a7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationBinderSignatures.d.ts.map @@ -0,0 +1,178 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderSignatures.ts] //// + +//// [isolatedDeclarationBinderSignatures.ts] +type N = "not used"; +const N = "not used" +export type F = () => N; + +export const fn = (): N => { + return null!; +} +export const fn2 = (p: N): void => { + return null! +} + + +export module M1 { + export type N = T extends T? N : never; + export function N(): typeof N { + return N + } +} + +export module M2 { + export interface N { + child: N + m(): N; + get X(): N + set X(value: N); + } +} + +export module M3 { + export interface N { + [n: string]: N + } +} +export module M3 { + export class N { child: N } + export function fn(): N { + return new N(); + } +} +export module M4 { + export module N { + export function fn(): typeof N { + return N; + } + } +} + + +export const fn3 = function (p: N): void { + +} + +export const fn4 = function (): { name: N } { + return null!; +} + +export interface I { + (): N; + new (): N + m(): N; +} + +export interface I2 { + [n: string]: N +} + +export interface I1 { + (): N; + new (): N + m(): N; +} + + +export interface I { + (): N; + new (): N + m(): N; +} + +export class C { + constructor(n: N) { + + } + m(): N { + return null!; + } + get N(): N { return null! } + set N(value) { } +} + +export class C2 { + m(): N { + return null!; + } +} + + + +/// [Declarations] //// + + + +//// [isolatedDeclarationBinderSignatures.d.ts] +export type F = () => N; +export declare const fn: () => N; +export declare const fn2: (p: N) => void; +export declare namespace M1 { + type N = T extends T ? N : never; + function N(): typeof N; +} +export declare namespace M2 { + interface N { + child: N; + m(): N; + get X(): N; + set X(value: N); + } +} +export declare namespace M3 { + interface N { + [n: string]: N; + } +} +export declare namespace M3 { + class N { + child: N; + } + function fn(): N; +} +export declare namespace M4 { + namespace N { + function fn(): typeof N; + } +} +export declare const fn3: (p: N) => void; +export declare const fn4: () => { + name: N; +}; +export interface I { + (): N; + new (): N; + m(): N; +} +export interface I2 { + [n: string]: N; +} +export interface I1 { + (): N; + new (): N; + m(): N; +} +export interface I { + (): N; + new (): N; + m(): N; +} +export declare class C { + constructor(n: N); + m(): N; + get N(): N; + set N(value: N); +} +export declare class C2 { + m(): N; +} +//# sourceMappingURL=isolatedDeclarationBinderSignatures.d.ts.map + +/// [Declarations Maps] //// + + +//// [isolatedDeclarationBinderSignatures.d.ts.map] +{"version":3,"file":"isolatedDeclarationBinderSignatures.d.ts","sourceRoot":"","sources":["isolatedDeclarationBinderSignatures.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;AAE3B,eAAO,MAAM,EAAE,GAAI,CAAC,OAAK,CAExB,CAAA;AACD,eAAO,MAAM,GAAG,GAAI,CAAC,EAAE,CAAC,EAAG,CAAC,KAAG,IAE9B,CAAA;AAGD,yBAAc,EAAE,CAAC;IACb,KAAY,CAAC,CAAC,CAAC,IAAK,CAAC,SAAS,CAAC,GAAE,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC9C,SAAgB,CAAC,IAAI,OAAO,CAAC,CAE5B;CACJ;AAED,yBAAc,EAAE,CAAC;IACb,UAAiB,CAAC;QACd,KAAK,EAAE,CAAC,CAAA;QACR,CAAC,IAAI,CAAC,CAAC;QACP,IAAI,CAAC,IAAI,CAAC,CAAA;QACV,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE;KACnB;CACJ;AAED,yBAAc,EAAE,CAAC;IACb,UAAiB,CAAC;QACd,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAA;KACjB;CACJ;AACD,yBAAc,EAAE,CAAC;IACb,MAAa,CAAC;QAAG,KAAK,EAAE,CAAC,CAAA;KAAE;IAC3B,SAAgB,EAAE,IAAI,CAAC,CAEtB;CACJ;AACD,yBAAc,EAAE,CAAC;IACb,UAAc,CAAC,CAAC;QACZ,SAAgB,EAAE,IAAI,OAAO,CAAC,CAE7B;KACJ;CACJ;AAGD,eAAO,MAAM,GAAG,GAAa,CAAC,EAAE,CAAC,EAAE,CAAC,KAAG,IAEtC,CAAA;AAED,eAAO,MAAM,GAAG,GAAa,CAAC,OAAK;IAAE,IA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ICAgIH0KfQpleHBvcnQgbW9kdWxlIE00IHsKICAgIGV4cG9ydCBtb2R1bGUgTiB7CiAgICAgICAgZXhwb3J0IGZ1bmN0aW9uIGZuKCk6IHR5cGVvZiBOIHsKICAgICAgICAgICAgcmV0dXJuIE47CiAgICAgICAgfQogICAgfQp9CgoKZXhwb3J0IGNvbnN0IGZuMyA9IGZ1bmN0aW9uIDxOPihwOiBOKTogdm9pZCB7CiAgICAKfQoKZXhwb3J0IGNvbnN0IGZuNCA9IGZ1bmN0aW9uIDxOPigpOiB7IG5hbWU6IE4gfSB7CiAgICByZXR1cm4gbnVsbCE7Cn0KCmV4cG9ydCBpbnRlcmZhY2UgSTxOPiB7CiAgICAoKTogTjsKICAgIG5ldyAoKTogTgogICAgbSgpOiBOOwp9CgpleHBvcnQgaW50ZXJmYWNlIEkyPE4+IHsKICAgIFtuOiBzdHJpbmddOiBOCn0KCmV4cG9ydCBpbnRlcmZhY2UgSTEgewogICAgPE4+KCk6IE47CiAgICBuZXcgPE4+KCk6IE4KICAgIG08Tj4oKTogTjsKfQoKCmV4cG9ydCBpbnRlcmZhY2UgSTxOPiB7CiAgICAoKTogTjsKICAgIG5ldyAoKTogTgogICAgbSgpOiBOOwp9CgpleHBvcnQgY2xhc3MgQzxOPiB7CiAgICBjb25zdHJ1Y3RvcihuOiBOKSB7CgogICAgfQogICAgbSgpOiBOIHsKICAgICAgICByZXR1cm4gbnVsbCE7CiAgICB9CiAgICBnZXQgTigpOiBOIHsgcmV0dXJuIG51bGwhIH0KICAgIHNldCBOKHZhbHVlKSB7IH0KfQoKZXhwb3J0IGNsYXNzIEMyIHsKICAgIG08Tj4oKTogTiB7CiAgICAgICAgcmV0dXJuIG51bGwhOwogICAgfQp9Cgo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrors.d.ts new file mode 100644 index 0000000000000..d10fe78248290 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrors.d.ts @@ -0,0 +1,57 @@ +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +//// [isolatedDeclarationErrors.ts] +function errorOnAssignmentBelowDecl(): void {} +errorOnAssignmentBelowDecl.a = ""; + +const errorOnAssignmentBelow: { + (): void; + a: string; +} = (): void => {} +errorOnAssignmentBelow.a = ""; + +const errorOnMissingReturn: { + (): void; + a: string; +} = (): void => {} +errorOnMissingReturn.a = ""; + + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrors.d.ts] +declare function errorOnAssignmentBelowDecl(): void; +declare const errorOnAssignmentBelow: { + (): void; + a: string; +}; +declare const errorOnMissingReturn: { + (): void; + a: string; +}; +//# sourceMappingURL=isolatedDeclarationErrors.d.ts.map +/// [Errors] //// + +isolatedDeclarationErrors.ts(2,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== isolatedDeclarationErrors.ts (1 errors) ==== + function errorOnAssignmentBelowDecl(): void {} + errorOnAssignmentBelowDecl.a = ""; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + const errorOnAssignmentBelow: { + (): void; + a: string; + } = (): void => {} + errorOnAssignmentBelow.a = ""; + + const errorOnMissingReturn: { + (): void; + a: string; + } = (): void => {} + errorOnMissingReturn.a = ""; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts new file mode 100644 index 0000000000000..9775b1125a00d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts @@ -0,0 +1,190 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +//// [isolatedDeclarationErrorsClasses.ts] +export class Cls { + + field: number = 1 + 1; + method(): void {} + + methodOk(): void {} + + methodParams(p: any): void {} + methodParams2(p: number = 1 + 1): void {} + + get getOnly(): number { return 0 } + set setOnly(value: any) { } + + get getSetBad(): number { return 0 } + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } +} + +let noAnnotationStringName: string = "noAnnotationStringName"; +let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + +const noAnnotationLiteralName = "noAnnotationLiteralName"; +const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + +export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName](): void { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName](): number { return 0;} + + set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + +} + +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsClasses.d.ts] +export declare class Cls { + field: number; + method(): void; + methodOk(): void; + methodParams(p: any): void; + methodParams2(p?: number): void; + get getOnly(): number; + set setOnly(value: any); + get getSetBad(): number; + set getSetBad(value: number); + get getSetOk(): number; + set getSetOk(value: number); + get getSetOk2(): number; + set getSetOk2(value: number); + get getSetOk3(): number; + set getSetOk3(value: number); +} +declare let noAnnotationStringName: string; +declare let noParamAnnotationStringName: string; +declare const noAnnotationLiteralName = "noAnnotationLiteralName"; +declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; +export declare class C { + [missing]: number; + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; + get [noAnnotationStringName](): number; + set [noParamAnnotationStringName](value: invalid); +} +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](): any; +} +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsClasses.ts(36,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. +isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(48,39): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + + +==== isolatedDeclarationErrorsClasses.ts (9 errors) ==== + export class Cls { + + field: number = 1 + 1; + method(): void {} + + methodOk(): void {} + + methodParams(p: any): void {} + methodParams2(p: number = 1 + 1): void {} + + get getOnly(): number { return 0 } + set setOnly(value: any) { } + + get getSetBad(): number { return 0 } + set getSetBad(value) { } + + get getSetOk(): number { return 0 } + set getSetOk(value) { } + + get getSetOk2() { return 0 } + set getSetOk2(value: number) { } + + get getSetOk3(): number { return 0 } + set getSetOk3(value: number) { } + } + + let noAnnotationStringName: string = "noAnnotationStringName"; + let noParamAnnotationStringName: string = "noParamAnnotationStringName"; + + const noAnnotationLiteralName = "noAnnotationLiteralName"; + const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; + + export class C { + + // Should not be reported as an isolated declaration error + [missing] = 1; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~ +!!! error TS2304: Cannot find name 'missing'. + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName](): void { } + + [noParamAnnotationStringName](v): void { } + ~ +!!! error TS7006: Parameter 'v' implicitly has an 'any' type. + + get [noAnnotationStringName](): number { return 0;} + + set [noParamAnnotationStringName](value) { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. + ~~~~~ +!!! error TS7006: Parameter 'value' implicitly has an 'any' type. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:48:9: Add a type to parameter of the set accessor declaration. + + [("A" + "B") as "AB"] = 1; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + } + + export interface I { + [noAnnotationStringName]: 10; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. + [noAnnotationLiteralName](); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsExpandoFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsExpandoFunctions.d.ts new file mode 100644 index 0000000000000..6e61f3422c646 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsExpandoFunctions.d.ts @@ -0,0 +1,54 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts] //// + +//// [isolatedDeclarationErrorsExpandoFunctions.ts] +export function foo(): void {} + +foo.apply = () => {} +foo.call = ()=> {} +foo.bind = ()=> {} +foo.caller = ()=> {} +foo.toString = ()=> {} +foo.length = 10 +foo.length = 10 + + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsExpandoFunctions.d.ts] +export declare function foo(): void; + +/// [Errors] //// + +isolatedDeclarationErrorsExpandoFunctions.ts(3,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(4,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(5,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(6,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(7,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationErrorsExpandoFunctions.ts(8,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== isolatedDeclarationErrorsExpandoFunctions.ts (6 errors) ==== + export function foo(): void {} + + foo.apply = () => {} + ~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.call = ()=> {} + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.bind = ()=> {} + ~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.caller = ()=> {} + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.toString = ()=> {} + ~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.length = 10 + ~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.length = 10 + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts new file mode 100644 index 0000000000000..77a9a83229bf5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts @@ -0,0 +1,360 @@ +//// [tests/cases/compiler/isolatedDeclarationErrorsObjects.ts] //// + +//// [isolatedDeclarationErrorsObjects.ts] +export let o = { + a: 1, + b: "" +} + +export let oBad: { + a: number; +} = { + a: Math.random(), +} +export const V = 1; +export let oBad2: { + a: { + b: number; + }; + c: { + d: number; + e: number; + }; +} = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } +} + +export let oWithMethods: { + method(): void; + okMethod(): void; + a: number; + bad(): void; + e: number; +} = { + method(): void { }, + okMethod(): void { }, + a: 1, + bad(): void { }, + e: V, +} +export let oWithMethodsNested = { + foo: { + method(): void { }, + a: 1, + okMethod(): void { }, + bad(): void { } + } +} + + + +export let oWithAccessor = { + get singleGetterBad(): number { return 0 }, + set singleSetterBad(value: any) { }, + + get getSetBad(): number { return 0 }, + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, +} + +function prop(v: T): T { return v } + +const s: unique symbol = Symbol(); +const str: string = ""; +enum E { + V = 10, +} +export const oWithComputedProperties: { + [x: string]: number; + [x: number]: number; + 1: number; + 2: number; + [s]: number; + [E.V]: number; +} = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, +} + +const part = { a: 1 }; + +export const oWithSpread: { + c: number; + part: { + a: number; + }; + a: number; + b: number; +} = { + b: 1, + ...part, + c: 1, + part, +} + + +export const oWithSpread: { + [x: string]: number | { + a: number; + }; + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; +} = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, +} + + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrorsObjects.d.ts] +export declare let o: { + a: number; + b: string; +}; +export declare let oBad: { + a: number; +}; +export declare const V = 1; +export declare let oBad2: { + a: { + b: number; + }; + c: { + d: number; + e: number; + }; +}; +export declare let oWithMethods: { + method(): void; + okMethod(): void; + a: number; + bad(): void; + e: number; +}; +export declare let oWithMethodsNested: { + foo: { + method(): void; + a: number; + okMethod(): void; + bad(): void; + }; +}; +export declare let oWithAccessor: { + readonly singleGetterBad: number; + singleSetterBad: any; + getSetBad: number; + getSetOk: number; + getSetOk2: number; + get getSetOk3(): number; + set getSetOk3(value: number); +}; +declare const s: unique symbol; +declare enum E { + V = 10 +} +export declare const oWithComputedProperties: { + [x: string]: number; + [x: number]: number; + 1: number; + 2: number; + [s]: number; + [E.V]: number; +}; +export declare const oWithSpread: { + c: number; + part: { + a: number; + }; + a: number; + b: number; +}; +export declare const oWithSpread: { + [x: string]: number | { + a: number; + }; + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; +}; +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsObjects.ts(96,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(111,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + + +==== isolatedDeclarationErrorsObjects.ts (2 errors) ==== + export let o = { + a: 1, + b: "" + } + + export let oBad: { + a: number; + } = { + a: Math.random(), + } + export const V = 1; + export let oBad2: { + a: { + b: number; + }; + c: { + d: number; + e: number; + }; + } = { + a: { + b: Math.random(), + }, + c: { + d: 1, + e: V, + } + } + + export let oWithMethods: { + method(): void; + okMethod(): void; + a: number; + bad(): void; + e: number; + } = { + method(): void { }, + okMethod(): void { }, + a: 1, + bad(): void { }, + e: V, + } + export let oWithMethodsNested = { + foo: { + method(): void { }, + a: 1, + okMethod(): void { }, + bad(): void { } + } + } + + + + export let oWithAccessor = { + get singleGetterBad(): number { return 0 }, + set singleSetterBad(value: any) { }, + + get getSetBad(): number { return 0 }, + set getSetBad(value) { }, + + get getSetOk(): number { return 0 }, + set getSetOk(value) { }, + + get getSetOk2() { return 0 }, + set getSetOk2(value: number) { }, + + get getSetOk3(): number { return 0 }, + set getSetOk3(value: number) { }, + } + + function prop(v: T): T { return v } + + const s: unique symbol = Symbol(); + const str: string = ""; + enum E { + V = 10, + } + export const oWithComputedProperties: { + [x: string]: number; + [x: number]: number; + 1: number; + 2: number; + [s]: number; + [E.V]: number; + } = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, + [str]: 0, + } + + const part = { a: 1 }; + + export const oWithSpread: { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + c: number; + part: { + a: number; + }; + a: number; + b: number; + } = { + b: 1, + ...part, + c: 1, + part, + } + + + export const oWithSpread: { + ~~~~~~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + [x: string]: number | { + a: number; + }; + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; + } = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + [str]: 0, + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationLazySymbols.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationLazySymbols.d.ts new file mode 100644 index 0000000000000..d6d0fe041e302 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationLazySymbols.d.ts @@ -0,0 +1,87 @@ +//// [tests/cases/compiler/isolatedDeclarationLazySymbols.ts] //// + +//// [isolatedDeclarationLazySymbols.ts] +export function foo(): void { + +} + +const o = { + ["prop.inner"]: "a", + prop: { + inner: "b", + } +} as const + +foo[o["prop.inner"]] ="A"; +foo[o.prop.inner] = "B"; + +export class Foo { + [o["prop.inner"]] ="A" + [o.prop.inner] = "B" +} + +export let oo: { + a: string; + [o.prop.inner]: string; +} = { + [o['prop.inner']]:"A", + [o.prop.inner]: "B", +} + +/// [Declarations] //// + + + +//// [isolatedDeclarationLazySymbols.d.ts] +export declare function foo(): void; +declare const o: { + readonly "prop.inner": "a"; + readonly prop: { + readonly inner: "b"; + }; +}; +export declare class Foo { +} +export declare let oo: { + a: string; + [o.prop.inner]: string; +}; +export {}; +//# sourceMappingURL=isolatedDeclarationLazySymbols.d.ts.map +/// [Errors] //// + +isolatedDeclarationLazySymbols.ts(13,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +isolatedDeclarationLazySymbols.ts(16,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +==== isolatedDeclarationLazySymbols.ts (2 errors) ==== + export function foo(): void { + + } + + const o = { + ["prop.inner"]: "a", + prop: { + inner: "b", + } + } as const + + foo[o["prop.inner"]] ="A"; + foo[o.prop.inner] = "B"; + ~~~~~~~~~~~~~~~~~ +!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + export class Foo { + [o["prop.inner"]] ="A" + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [o.prop.inner] = "B" + } + + export let oo: { + a: string; + [o.prop.inner]: string; + } = { + [o['prop.inner']]:"A", + [o.prop.inner]: "B", + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isomorphicMappedTypeInference.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isomorphicMappedTypeInference.d.ts.map new file mode 100644 index 0000000000000..4a905ca79d304 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isomorphicMappedTypeInference.d.ts.map @@ -0,0 +1,329 @@ +//// [tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts] //// + +//// [isomorphicMappedTypeInference.ts] +type Box = { + value: T; +} + +type Boxified = { + [P in keyof T]: Box; +} + +function box(x: T): Box { + return { value: x }; +} + +function unbox(x: Box): T { + return x.value; +} + +function boxify(obj: T): Boxified { + let result = {} as Boxified; + for (let k in obj) { + result[k] = box(obj[k]); + } + return result; +} + +function unboxify(obj: Boxified): T { + let result = {} as T; + for (let k in obj) { + result[k] = unbox(obj[k]); + } + return result; +} + +function assignBoxified(obj: Boxified, values: T): void { + for (let k in values) { + obj[k].value = values[k]; + } +} + +function f1(): void { + let v = { + a: 42, + b: "hello", + c: true + }; + let b = boxify(v); + let x: number = b.a.value; +} + +function f2(): void { + let b = { + a: box(42), + b: box("hello"), + c: box(true) + }; + let v = unboxify(b); + let x: number = v.a; +} + +function f3(): void { + let b = { + a: box(42), + b: box("hello"), + c: box(true) + }; + assignBoxified(b, { c: false }); +} + +function f4(): void { + let b = { + a: box(42), + b: box("hello"), + c: box(true) + }; + b = boxify(unboxify(b)); + b = unboxify(boxify(b)); +} + +function makeRecord(obj: { [P in K]: T }): { + [P in K]: T; +} { + return obj; +} + +function f5(s: string): void { + let b = makeRecord({ + a: box(42), + b: box("hello"), + c: box(true) + }); + let v = unboxify(b); + let x: string | number | boolean = v.a; +} + +function makeDictionary(obj: { [x: string]: T }): { + [x: string]: T; +} { + return obj; +} + +function f6(s: string): void { + let b = makeDictionary({ + a: box(42), + b: box("hello"), + c: box(true) + }); + let v = unboxify(b); + let x: string | number | boolean = v[s]; +} + +declare function validate(obj: { [P in keyof T]?: T[P] }): T; +declare function clone(obj: { readonly [P in keyof T]: T[P] }): T; +declare function validateAndClone(obj: { readonly [P in keyof T]?: T[P] }): T; + +type Foo = { + a?: number; + readonly b: string; +} + +function f10(foo: Foo): void { + let x = validate(foo); // { a: number, readonly b: string } + let y = clone(foo); // { a?: number, b: string } + let z = validateAndClone(foo); // { a: number, b: string } +} + +// Repro from #12606 + +type Func = (...args: any[]) => T; +type Spec = { + [P in keyof T]: Func | Spec ; +}; + +/** + * Given a spec object recursively mapping properties to functions, creates a function + * producing an object of the same structure, by mapping each property to the result + * of calling its associated function with the supplied arguments. + */ +declare function applySpec(obj: Spec): (...args: any[]) => T; + +// Infers g1: (...args: any[]) => { sum: number, nested: { mul: string } } +var g1: (...args: any[]) => { + sum: number; + nested: { + mul: string; + }; +} = applySpec({ + sum: (a: any) => 3, + nested: { + mul: (b: any) => "n" + } +}); + +// Infers g2: (...args: any[]) => { foo: { bar: { baz: boolean } } } +var g2: (...args: any[]) => { + foo: { + bar: { + baz: boolean; + }; + }; +} = applySpec({ foo: { bar: { baz: (x: any) => true } } }); + +// Repro from #12633 + +const foo = (object: T, partial: Partial): T => object; +let o = {a: 5, b: 7}; +foo(o, {b: 9}); +o = foo(o, {b: 9}); + +// Inferring to { [P in K]: X }, where K extends keyof T, produces same inferences as +// inferring to { [P in keyof T]: X }. + +declare function f20(obj: Pick): T; +declare function f21(obj: Pick): K; +declare function f22(obj: Boxified>): T; +declare function f23(obj: Pick): T; +declare function f24(obj: Pick): T & U; + +let x0: { + foo: number; + bar: string; +} = f20({ foo: 42, bar: "hello" }); +let x1: "foo" | "bar" = f21({ foo: 42, bar: "hello" }); +let x2: { + foo: number; + bar: string; +} = f22({ foo: { value: 42} , bar: { value: "hello" } }); +let x3: { + foo: number; + bar: string; +} = f23({ foo: 42, bar: "hello" }); +let x4: { + foo: number; + bar: string; +} & { + foo: number; + bar: string; +} = f24({ foo: 42, bar: "hello" }); + +// Repro from #29765 + +function getProps(obj: T, list: K[]): Pick { + return {} as any; +} + +const myAny: any = {}; + +const o1: Pick = getProps(myAny, ['foo', 'bar']); + +const o2: { foo: any; bar: any } = getProps(myAny, ['foo', 'bar']); + + +/// [Declarations] //// + + + +//// [isomorphicMappedTypeInference.d.ts] +type Box = { + value: T; +}; +type Boxified = { + [P in keyof T]: Box; +}; +declare function box(x: T): Box; +declare function unbox(x: Box): T; +declare function boxify(obj: T): Boxified; +declare function unboxify(obj: Boxified): T; +declare function assignBoxified(obj: Boxified, values: T): void; +declare function f1(): void; +declare function f2(): void; +declare function f3(): void; +declare function f4(): void; +declare function makeRecord(obj: { + [P in K]: T; +}): { + [P in K]: T; +}; +declare function f5(s: string): void; +declare function makeDictionary(obj: { + [x: string]: T; +}): { + [x: string]: T; +}; +declare function f6(s: string): void; +declare function validate(obj: { + [P in keyof T]?: T[P]; +}): T; +declare function clone(obj: { + readonly [P in keyof T]: T[P]; +}): T; +declare function validateAndClone(obj: { + readonly [P in keyof T]?: T[P]; +}): T; +type Foo = { + a?: number; + readonly b: string; +}; +declare function f10(foo: Foo): void; +type Func = (...args: any[]) => T; +type Spec = { + [P in keyof T]: Func | Spec; +}; +/** + * Given a spec object recursively mapping properties to functions, creates a function + * producing an object of the same structure, by mapping each property to the result + * of calling its associated function with the supplied arguments. + */ +declare function applySpec(obj: Spec): (...args: any[]) => T; +declare var g1: (...args: any[]) => { + sum: number; + nested: { + mul: string; + }; +}; +declare var g2: (...args: any[]) => { + foo: { + bar: { + baz: boolean; + }; + }; +}; +declare const foo: (object: T, partial: Partial) => T; +declare let o: { + a: number; + b: number; +}; +declare function f20(obj: Pick): T; +declare function f21(obj: Pick): K; +declare function f22(obj: Boxified>): T; +declare function f23(obj: Pick): T; +declare function f24(obj: Pick): T & U; +declare let x0: { + foo: number; + bar: string; +}; +declare let x1: "foo" | "bar"; +declare let x2: { + foo: number; + bar: string; +}; +declare let x3: { + foo: number; + bar: string; +}; +declare let x4: { + foo: number; + bar: string; +} & { + foo: number; + bar: string; +}; +declare function getProps(obj: T, list: K[]): Pick; +declare const myAny: any; +declare const o1: Pick; +declare const o2: { + foo: any; + bar: any; +}; +//# sourceMappingURL=isomorphicMappedTypeInference.d.ts.map + +/// [Declarations Maps] //// + + +//// [isomorphicMappedTypeInference.d.ts.map] +{"version":3,"file":"isomorphicMappedTypeInference.d.ts","sourceRoot":"","sources":["isomorphicMappedTypeInference.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,CAAC,CAAC,IAAI;IACV,KAAK,EAAE,CAAC,CAAC;CACZ,CAAA;AAED,KAAK,QAAQ,CAAC,CAAC,IAAI;KACd,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5B,CAAA;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAE5B;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAE9B;AAED,iBAAS,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAMtC;AAED,iBAAS,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAMvD;AAED,iBAAS,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAI5D;AAED,iBAAS,EAAE,IAAI,IAAI,CAQlB;AAED,iBAAS,EAAE,IAAI,IAAI,CAQlB;AAED,iBAAS,EAAE,IAAI,IAAI,CAOlB;AAED,iBAAS,EAAE,IAAI,IAAI,CAQlB;AAED,iBAAS,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE;KAAG,CAAC,IAAI,CAAC,GAAG,CAAC;CAAE,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47CiAgICBmb3IgKGxldCBrIGluIG9iaikgewogICAgICAgIHJlc3VsdFtrXSA9IGJveChvYmpba10pOwogICAgfQogICAgcmV0dXJuIHJlc3VsdDsKfQoKZnVuY3Rpb24gdW5ib3hpZnk8VCBleHRlbmRzIG9iamVjdD4ob2JqOiBCb3hpZmllZDxUPik6IFQgewogICAgbGV0IHJlc3VsdCA9IHt9IGFzIFQ7CiAgICBmb3IgKGxldCBrIGluIG9iaikgewogICAgICAgIHJlc3VsdFtrXSA9IHVuYm94KG9ialtrXSk7CiAgICB9CiAgICByZXR1cm4gcmVzdWx0Owp9CgpmdW5jdGlvbiBhc3NpZ25Cb3hpZmllZDxUPihvYmo6IEJveGlmaWVkPFQ+LCB2YWx1ZXM6IFQpOiB2b2lkIHsKICAgIGZvciAobGV0IGsgaW4gdmFsdWVzKSB7CiAgICAgICAgb2JqW2tdLnZhbHVlID0gdmFsdWVzW2tdOwogICAgfQp9CgpmdW5jdGlvbiBmMSgpOiB2b2lkIHsKICAgIGxldCB2ID0gewogICAgICAgIGE6IDQyLAogICAgICAgIGI6ICJoZWxsbyIsCiAgICAgICAgYzogdHJ1ZQogICAgfTsKICAgIGxldCBiID0gYm94aWZ5KHYpOwogICAgbGV0IHg6IG51bWJlciA9IGIuYS52YWx1ZTsKfQoKZnVuY3Rpb24gZjIoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBsZXQgdiA9IHVuYm94aWZ5KGIpOwogICAgbGV0IHg6IG51bWJlciA9IHYuYTsKfQoKZnVuY3Rpb24gZjMoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBhc3NpZ25Cb3hpZmllZChiLCB7IGM6IG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TsKCi8vIFJlcHJvIGZyb20gIzI5NzY1CgpmdW5jdGlvbiBnZXRQcm9wczxULCBLIGV4dGVuZHMga2V5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+IHsKICAgIHJldHVybiB7fSBhcyBhbnk7Cn0KCmNvbnN0IG15QW55OiBhbnkgPSB7fTsKCmNvbnN0IG8xOiBQaWNrPGFueSwgImZvbyIgfCAiYmFyIj4gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwoKY29uc3QgbzI6IHsgZm9vOiBhbnk7IGJhcjogYW55IH0gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts new file mode 100644 index 0000000000000..cb9585b03ebc2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts] //// + +//// [a.ts] +class c { +} + +//// [a.d.ts] +declare function isC(): boolean; + +/// [Declarations] //// + + + +//// [a.d.ts] +declare class c { +} +//# sourceMappingURL=a.d.ts.map +/// [Errors] //// + +error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +==== a.ts (0 errors) ==== + class c { + } + +==== a.d.ts (0 errors) ==== + declare function isC(): boolean; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/keyofAndIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/keyofAndIndexedAccess.d.ts new file mode 100644 index 0000000000000..af2cfbe96a3e7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/keyofAndIndexedAccess.d.ts @@ -0,0 +1,1713 @@ +//// [tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts] //// + +//// [keyofAndIndexedAccess.ts] +class Shape { + name: string; + width: number; + height: number; + visible: boolean; +} + +class TaggedShape extends Shape { + tag: string; +} + +class Item { + name: string; + price: number; +} + +class Options { + visible: "yes" | "no"; +} + +type Dictionary = { [x: string]: T }; +type NumericallyIndexed = { [x: number]: T }; + +const enum E { A, B, C } + +type K00 = keyof any; // string +type K01 = keyof string; // "toString" | "charAt" | ... +type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ... +type K03 = keyof boolean; // "valueOf" +type K04 = keyof void; // never +type K05 = keyof undefined; // never +type K06 = keyof null; // never +type K07 = keyof never; // string | number | symbol +type K08 = keyof unknown; // never + +type K10 = keyof Shape; // "name" | "width" | "height" | "visible" +type K11 = keyof Shape[]; // "length" | "toString" | ... +type K12 = keyof Dictionary; // string +type K13 = keyof {}; // never +type K14 = keyof Object; // "constructor" | "toString" | ... +type K15 = keyof E; // "toString" | "toFixed" | "toExponential" | ... +type K16 = keyof [string, number]; // "0" | "1" | "length" | "toString" | ... +type K17 = keyof (Shape | Item); // "name" +type K18 = keyof (Shape & Item); // "name" | "width" | "height" | "visible" | "price" +type K19 = keyof NumericallyIndexed // never + +type KeyOf = keyof T; + +type K20 = KeyOf; // "name" | "width" | "height" | "visible" +type K21 = KeyOf>; // string + +type NAME = "name"; +type WIDTH_OR_HEIGHT = "width" | "height"; + +type Q10 = Shape["name"]; // string +type Q11 = Shape["width" | "height"]; // number +type Q12 = Shape["name" | "visible"]; // string | boolean + +type Q20 = Shape[NAME]; // string +type Q21 = Shape[WIDTH_OR_HEIGHT]; // number + +type Q30 = [string, number][0]; // string +type Q31 = [string, number][1]; // number +type Q32 = [string, number][number]; // string | number +type Q33 = [string, number][E.A]; // string +type Q34 = [string, number][E.B]; // number +type Q35 = [string, number]["0"]; // string +type Q36 = [string, number]["1"]; // string + +type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" +type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" + +type Q50 = Dictionary["howdy"]; // Shape +type Q51 = Dictionary[123]; // Shape +type Q52 = Dictionary[E.B]; // Shape + +declare let cond: boolean; + +function getProperty(obj: T, key: K): T[K] { + return obj[key]; +} + +function setProperty(obj: T, key: K, value: T[K]): void { + obj[key] = value; +} + +function f10(shape: Shape): void { + let name = getProperty(shape, "name"); // string + let widthOrHeight = getProperty(shape, cond ? "width" : "height"); // number + let nameOrVisible = getProperty(shape, cond ? "name" : "visible"); // string | boolean + setProperty(shape, "name", "rectangle"); + setProperty(shape, cond ? "width" : "height", 10); + setProperty(shape, cond ? "name" : "visible", true); // Technically not safe +} + +function f11(a: Shape[]): void { + let len = getProperty(a, "length"); // number + setProperty(a, "length", len); +} + +function f12(t: [Shape, boolean]): void { + let len = getProperty(t, "length"); + let s2 = getProperty(t, "0"); // Shape + let b2 = getProperty(t, "1"); // boolean +} + +function f13(foo: any, bar: any): void { + let x = getProperty(foo, "x"); // any + let y = getProperty(foo, "100"); // any + let z = getProperty(foo, bar); // any +} + +class Component { + props: PropType; + getProperty(key: K): PropType[K] { + return this.props[key]; + } + setProperty(key: K, value: PropType[K]): void { + this.props[key] = value; + } +} + +function f20(component: Component): void { + let name = component.getProperty("name"); // string + let widthOrHeight = component.getProperty(cond ? "width" : "height"); // number + let nameOrVisible = component.getProperty(cond ? "name" : "visible"); // string | boolean + component.setProperty("name", "rectangle"); + component.setProperty(cond ? "width" : "height", 10) + component.setProperty(cond ? "name" : "visible", true); // Technically not safe +} + +function pluck(array: T[], key: K): T[K][] { + return array.map(x => x[key]); +} + +function f30(shapes: Shape[]): void { + let names = pluck(shapes, "name"); // string[] + let widths = pluck(shapes, "width"); // number[] + let nameOrVisibles = pluck(shapes, cond ? "name" : "visible"); // (string | boolean)[] +} + +function f31(key: K): Shape[K] { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] +} + +function f32(key: K): Shape[K] { + const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; + return shape[key]; // Shape[K] +} + +function f33(shape: S, key: K): S[K] { + let name = getProperty(shape, "name"); + let prop = getProperty(shape, key); + return prop; +} + +function f34(ts: TaggedShape): void { + let tag1 = f33(ts, "tag"); + let tag2 = getProperty(ts, "tag"); +} + +class C { + public x: string; + protected y: string; + private z: string; +} + +// Indexed access expressions have always permitted access to private and protected members. +// For consistency we also permit such access in indexed access types. +function f40(c: C): void { + type X = C["x"]; + type Y = C["y"]; + type Z = C["z"]; + let x: X = c["x"]; + let y: Y = c["y"]; + let z: Z = c["z"]; +} + +function f50(k: keyof T, s: string): void { + const x1 = s as keyof T; + const x2 = k as string; +} + +function f51(k: K, s: string): void { + const x1 = s as keyof T; + const x2 = k as string; +} + +function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number): void { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; +} + +function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number): void { + const x1 = obj[s]; + const x2 = obj[n]; + const x3 = obj[k]; +} + +function f54(obj: T, key: keyof T): void { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; +} + +function f55(obj: T, key: K): void { + for (let s in obj[key]) { + } + const b = "foo" in obj[key]; +} + +function f60(source: T, target: T): void { + for (let k in source) { + target[k] = source[k]; + } +} + +function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void): void { + func<{ a: any, b: any }, { a: any, c: any }>('a', 'a'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'b'); + func<{ a: any, b: any }, { a: any, c: any }>('a', 'c'); +} + +function f71(func: (x: T, y: U) => Partial): void { + let x = func({ a: 1, b: "hello" }, { c: true }); + x.a; // number | undefined + x.b; // string | undefined + x.c; // boolean | undefined +} + +function f72(func: (x: T, y: U, k: K) => (T & U)[K]): void { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean +} + +function f73(func: (x: T, y: U, k: K) => (T & U)[K]): void { + let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean +} + +function f74(func: (x: T, y: U, k: K) => (T | U)[K]): void { + let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number + let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean +} + +function f80(obj: T): void { + let a1 = obj.a; // { x: any } + let a2 = obj['a']; // { x: any } + let a3 = obj['a'] as T['a']; // T["a"] + let x1 = obj.a.x; // any + let x2 = obj['a']['x']; // any + let x3 = obj['a']['x'] as T['a']['x']; // T["a"]["x"] +} + +function f81(obj: T): T["a"]["x"] { + return obj['a']['x'] as T['a']['x']; +} + +function f82(): void { + let x1 = f81({ a: { x: "hello" } }); // string + let x2 = f81({ a: { x: 42 } }); // number +} + +function f83(obj: T, key: K): T[K]["x"] { + return obj[key]['x'] as T[K]['x']; +} + +function f84(): void { + let x1 = f83({ foo: { x: "hello" } }, "foo"); // string + let x2 = f83({ bar: { x: 42 } }, "bar"); // number +} + +class C1 { + x: number; + get(key: K): this[K] { + return this[key]; + } + set(key: K, value: this[K]): void { + this[key] = value; + } + foo(): void { + let x1 = this.x; // number + let x2 = this["x"]; // number + let x3 = this.get("x"); // this["x"] + let x4 = getProperty(this, "x"); // this["x"] + this.x = 42; + this["x"] = 42; + this.set("x", 42); + setProperty(this, "x", 42); + } +} + +type S2 = { + a: string; + b: string; +}; + +function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]): void { + x1 = x2; + x1 = x3; + x2 = x1; + x2 = x3; + x3 = x1; + x3 = x2; + x1.length; + x2.length; + x3.length; +} + +function f91(x: T, y: T[keyof T], z: T[K]): void { + let a: {}; + a = x; + a = y; + a = z; +} + +function f92(x: T, y: T[keyof T], z: T[K]): void { + let a: {} | null | undefined; + a = x; + a = y; + a = z; +} + +// Repros from #12011 + +class Base { + get(prop: K): this[K] { + return this[prop]; + } + set(prop: K, value: this[K]): void { + this[prop] = value; + } +} + +class Person extends Base { + parts: number; + constructor(parts: number) { + super(); + this.set("parts", parts); + } + getParts(): this["parts"] { + return this.get("parts") + } +} + +class OtherPerson { + parts: number; + constructor(parts: number) { + setProperty(this, "parts", parts); + } + getParts(): this["parts"] { + return getProperty(this, "parts") + } +} + +// Modified repro from #12544 + +function path(obj: T, key1: K1): T[K1]; +function path(obj: T, key1: K1, key2: K2): T[K1][K2]; +function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; +function path(obj: any, ...keys: (string | number)[]): any; +function path(obj: any, ...keys: (string | number)[]): any { + let result = obj; + for (let k of keys) { + result = result[k]; + } + return result; +} + +type Thing = { + a: { x: number, y: string }, + b: boolean +}; + + +function f1(thing: Thing): void { + let x1 = path(thing, 'a'); // { x: number, y: string } + let x2 = path(thing, 'a', 'y'); // string + let x3 = path(thing, 'b'); // boolean + let x4 = path(thing, ...['a', 'x']); // any +} + +// Repro from comment in #12114 + +const assignTo2 = (object: T, key1: K1, key2: K2): (value: T[K1][K2]) => T[K1][K2] => + (value: T[K1][K2]) => object[key1][key2] = value; + +// Modified repro from #12573 + +declare function one(handler: (t: T) => void): T +var empty: unknown = one(() => {}) // inferred as {}, expected + +type Handlers = { [K in keyof T]: (t: T[K]) => void } +declare function on(handlerHash: Handlers): T +var hashOfEmpty1: { + test: unknown; +} = on({ test: () => {} }); // {} +var hashOfEmpty2: { + test: boolean; +} = on({ test: (x: boolean) => {} }); // { test: boolean } + +// Repro from #12624 + +interface Options1 { + data?: Data + computed?: Computed; +} + +declare class Component1 { + constructor(options: Options1); + get(key: K): (Data & Computed)[K]; +} + +let c1: Component1<{ + hello: string; +}, unknown> = new Component1({ + data: { + hello: "" + } +}); + +c1.get("hello"); + +// Repro from #12625 + +interface Options2 { + data?: Data + computed?: Computed; +} + +declare class Component2 { + constructor(options: Options2); + get(key: K): (Data & Computed)[K]; +} + +// Repro from #12641 + +interface R { + p: number; +} + +function f(p: K): void { + let a: any; + a[p].add; // any +} + +// Repro from #12651 + +type MethodDescriptor = { + name: string; + args: any[]; + returnValue: any; +} + +declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; + +type SomeMethodDescriptor = { + name: "someMethod"; + args: [string, number]; + returnValue: string[]; +} + +let result: string[] = dispatchMethod("someMethod", ["hello", 35]); + +// Repro from #13073 + +type KeyTypes = "a" | "b" +let MyThingy: { [key in KeyTypes]: string[] }; + +function addToMyThingy(key: S): void { + MyThingy[key].push("a"); +} + +// Repro from #13102 + +type Handler = { + onChange: (name: keyof T) => void; +}; + +function onChangeGenericFunction(handler: Handler): void { + handler.onChange('preset') +} + +// Repro from #13285 + +function updateIds, K extends string>( + obj: T, + idFields: K[], + idMapping: Partial> +): Record { + for (const idField of idFields) { + const newId: T[K] | undefined = idMapping[obj[idField]]; + if (newId) { + obj[idField] = newId; + } + } + return obj; +} + +// Repro from #13285 + +function updateIds2( + obj: T, + key: K, + stringMap: { [oldId: string]: string } +): void { + var x = obj[key]; + stringMap[x]; // Should be OK. +} + +// Repro from #13514 + +declare function head>(list: T): T[0]; + +// Repro from #13604 + +class A { + props: T & { foo: string }; +} + +class B extends A<{ x: number}> { + f(p: this["props"]): void { + p.x; + } +} + +// Repro from #13749 + +class Form { + private childFormFactories: {[K in keyof T]: (v: T[K]) => Form} + + public set(prop: K, value: T[K]): void { + this.childFormFactories[prop](value) + } +} + +// Repro from #13787 + +class SampleClass